From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Li Subject: Re: [RFC] Could we get rid of Org specific "mark ring" Date: Tue, 27 Feb 2018 07:09:12 +0000 Message-ID: References: <87o9lcntdq.fsf@nicolasgoaziou.fr> <87po5rxcgq.fsf@nicolasgoaziou.fr> <87fu6nx93a.fsf@nicolasgoaziou.fr> <87bmhbx7z6.fsf@nicolasgoaziou.fr> <87lggew91v.fsf@nicolasgoaziou.fr> <87muzy10mg.fsf@nicolasgoaziou.fr> <87inal1og8.fsf@nicolasgoaziou.fr> <87po4rxomz.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqZOE-0002dn-Sl for emacs-orgmode@gnu.org; Tue, 27 Feb 2018 02:09:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eqZOA-0005kb-7P for emacs-orgmode@gnu.org; Tue, 27 Feb 2018 02:09:30 -0500 Received: from mail-qk0-x231.google.com ([2607:f8b0:400d:c09::231]:40384) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eqZOA-0005kR-1W for emacs-orgmode@gnu.org; Tue, 27 Feb 2018 02:09:26 -0500 Received: by mail-qk0-x231.google.com with SMTP id o25so16799914qkl.7 for ; Mon, 26 Feb 2018 23:09:25 -0800 (PST) Received: from mail-qk0-f178.google.com (mail-qk0-f178.google.com. [209.85.220.178]) by smtp.gmail.com with ESMTPSA id k67sm6723119qkh.95.2018.02.26.23.09.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Feb 2018 23:09:23 -0800 (PST) Received: by mail-qk0-f178.google.com with SMTP id w142so10498168qkb.8 for ; Mon, 26 Feb 2018 23:09:23 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Samuel Wales Cc: Org Mode List , Nicolas Goaziou On Mon, Feb 26, 2018 at 5:54 PM Samuel Wales wrote: > On 2/26/18, Nicolas Goaziou wrote: > > I guess these are rhetorical questions because I answered them above. > real questions, fyi, but never mind. > >> if not, then i will have to use local mark > >> ring. this means i have to think about whether the file i was in was > >> the same file or not. > > > > In practice, when I have no clue about where I was before, I first try > > a local ring jump. If it fails, I do a global ring jump. This is > > a no-brainer. > i see. but 1 step [current org pop behavior] is the only no brainer > to me. 2 steps could take me to a similar link in the same file and > really confuse me. > i actually don't care what file the previous link was in. or what > file i am in. org is a forest. > i care just what project i am in. > but even if i get used to the 2 steps, there are more issues: > 1] the local "try a local ring jump" jump will move me away from where > i was, which is undesirable. > 2] and it seems that the global jump will not be guaranteed to take me > to the actual link i did RET on. i might have forgotten what it was. > knowing i can get back to it can be reassuring. > > The current situation is worse. I have to know how I made it to the > > current location, i.e., with an Org command or not. It is harder to > > mitigate. > can't this be fixed by pushing to both emacs mark rings in addition to > the current org behavior? then you can just use emacs mark rings. > > I changed `org-mark-ring-push' to also push to Emacs mark ring. This is > > better, but, out of the 3 problems I stated at the beginning of this > > thread, it only solves the second one. > i presume you mean: > - Emacs already provides two of them: the local one and the global one. > This feels like re-inventing the wheel; > the solution seems to require a new command [such as a wrapper to > global mark pop to go to the exact location. i presume you will push > to it upon RET on a link. if not then we need that too.]. otherwise > behavior is changed significantly. > - Org mark ring and Emacs mark ring are sometimes out of sync, hence bug > #23745; > i never encountered the bug, but a push or two presumably fixes it. thank you. > - `org-mark-ring-goto' binding (C-c &) conflicts with some minor modes > (e.g., Yasnippet). > i'm ok with removing the binding. > am i really the only objector? if i knew what to do to get my > currently non-confusing behavior back i'd be ok with it of course. I retract my previous stance and think that we should keep the org-mark-ring for now. While I do not use the org-mark-ring, I do use xref's marker ring, and I appreciate the value of a "link ring" separate from mark-ring and global-mark-ring. I also do not find global-mark-ring very intuitive to use. The feature appears to date back to 1994 (with essentially no changes since then) with an unhelpful commit message, and the mailing list archives do not go back that far, so I cannot fathom what use case the author had for it. The fact that xref, org, and anaconda-mode, to name the three I am aware of, all have seen fit to invent their own "link ring" instead of using the standard mark, suggests that there is a real need for a kind of "link ring" built into Emacs proper. Marks make sense in a single file because they serve the dual purpose of delimiting the region and allowing the user to jump back to the previous location of point. However, it=E2=80=99s not really useful for th= e "follow link" type jumps that org or xref use. I don=E2=80=99t really see = a need to operate on the region between a link and the destination of the link, assuming the destination is in the same file, but that region is often useful for the other ways that mark is set (e.g., yank, isearch-forward). Furthermore, the semantics of hyperlinking have been established; users expect to be able to jump back after following a link, and it is a useful feature. My opinion is thus to keep org-mark-ring for now and discuss on emacs-devel. It=E2=80=99s true that emacs-devel is conservative (and slow)= , but I think it=E2=80=99s worth asking at least. > thank you for engaging.