reddit / emacs

Quickly jump to previous location after a search jump

cherlobyle · 2022-04-04 07:28
I am using Ivy/Swiper for search. Is there any function doing the bold text? searched something and jumped -> finished browsing the searching content -> **quickly jump to the location before the searching** My current solution: bookmark the location before searching Problem: redundant. I won't use the bookmark after jumping back. Thanks!
wargxs · 2022-04-04 07:34
pop mark : https://www.gnu.org/software/emacs/manual/html_node/emacs/Mark-Ring.html. C-u C-Space Also ivy has this with completion: counsel-mark-ring
cherlobyle · 2022-04-04 07:35
thanks, perfect
holgerschurig · 2022-04-04 09:45
Beside counsel or helm, it's also in consult (which you can use with selectrum, vertico and probably others). consult-mark and consult-global-mark are the commands.
holgerschurig · 2022-04-04 09:46
https://old.reddit.com/r/emacs/comments/tvw3za/quickly_jump_to_previous_location_after_a_search/i3c06q2/
wargxs · 2022-04-04 10:26
Why is it important to use consult instead of ivy? Strange comment to be honest … ivy can already do that
holgerschurig · 2022-04-04 11:17
> Why is it important to use consult instead of ivy I never said that something is important. You presented (beside the keyboard sequence) an ivy-only method of doing it interactive. And I simply pointed out ways to do that with consult, which is used by several completion frameworks. Nothing more. But now that you ask: i never liked ivy's name-spacing. Some parts of Ivy aren't in Ivy, but in Swiper. And some parts integral to ivy are in counsel. And then counsel, despite it's own name-space, isn't completion-frame-agnostic, but really needs ivy. For me, this somehow looks disorganized, but YMMV. It is however nothing that I would tag with the attribute "important". > ivy can already do that Yeah, and Helm could do it before Ivy. And Icicles (probably) could do it before Helm. So what?
wargxs · 2022-04-04 13:07
He / she already uses ivy hence it is natural to suggest an ivy way of doing that in addition I also suggested the plain emacs way. You are completely right, before ivy there was Helm and ido and icomplete. I found it already ridiculous at the time when ivy came up that for each Helm related question and solution there was a post „ivy does it this way“; now history repeats itself and now we get for each such post „vertico etc“ does it this way. Why do people feel the need to convert others to their completion framework of choice? Be happy with what you use and leave others alone ;-) For the average user there is zero benefit of switching from ivy to something else … and for many things ivy can do more (tramp completion) or is faster.
ntrysii · 2022-04-04 13:37
maybe [back-button](https://github.com/rolandwalker/back-button) could help, you could add advice to swiper search to set mark to the location you're in if it isn't saved by default.
[deleted] · 2022-04-04 18:17
[deleted]
onetom · 2022-04-05 02:42
I read the criticized message a few times, but I fail to see how would it suggest any importance of using consult over ivy. but I see how you take even a mention of newer incarnations of ideas implemented by ivy, as act of encouraging people to chase the "latest-greatest, shiny new, completion framework of the day". many people despise such behavior in the JavaScript world too. often it feels strait insane, how quickly very similar UI frameworks are popping up. so it's important to ask the question, why is it happening, but ask it honestly, with an open mind. maybe there are some legit reasons... but we can also ask the opposite of the question: why are you sticking to ivy that much? in my short, ~3 years, experience of being exposed to my colleagues using Emacs and Im trying to get into Emacs, I've seen quite a lot of issues with ivy. Some issues were heisenbugs, which they couldn't fix, so they just put up with it. They also struggled with understanding the dependency graph of the various ivy-related packages. I think this kind of user experience drives the development of the newer, completion related packages. and people, who tried the newer generation of packages, are inclined to mention them, because that can save others from stumbling over ivy issues. I can imagine, that you haven't experienced such issues, so my claims sound dubious. but let's not forget the number of variables, which might affect the ivy experience: * which ivy packages are installed? * which features are activated? * what is your Emacs version? * which OS are you on? * which window manager are you using? * what other packages might interfere with ivy via hooks or advices? * are there any fundamental tweaks to you Emacs, or extra layers added by eg by Spacemacs or Doom Emacs on top of ivy? I think minad's approach of decomplecting this completion problem domain into a small set of orthogonal packages, helps a lot to avoid, diagnose and fix problems, even by less experienced Elisp programmers.
wargxs · 2022-04-05 05:58
How is this all relevant to the original question? My worry is that you simply add noise / question peoples decisions without any benefit to the Individuum or the community as a whole.
holgerschurig · 2022-04-05 19:17
> He / she already uses ivy Ah, now I understand you. This escaped me ... I mean, it's written there, but I "over-read" it.