emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Allen Li <darkfeline@felesatra.moe>
To: Samuel Wales <samologist@gmail.com>
Cc: Org Mode List <emacs-orgmode@gnu.org>,
	Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: [RFC] Could we get rid of Org specific "mark ring"
Date: Tue, 27 Feb 2018 07:09:12 +0000	[thread overview]
Message-ID: <CAJr1M6e0_jiitbpkLPd-n9itSd0tw-cT_s-4JXNKyUQ=1LWz9Q@mail.gmail.com> (raw)
In-Reply-To: <CAJcAo8u5BDWtb4psTZU27GEmE2dAo2sjxd2eVRLFe=4ZziQBdA@mail.gmail.com>

On Mon, Feb 26, 2018 at 5:54 PM Samuel Wales <samologist@gmail.com> wrote:

> On 2/26/18, Nicolas Goaziou <mail@nicolasgoaziou.fr> 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’s not really useful for the
"follow link" type jumps that org or xref use.  I don’t 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’s true that emacs-devel is conservative (and slow),
but I think it’s worth asking at least.



> thank you for engaging.

  reply	other threads:[~2018-02-27  7:09 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29 23:21 [RFC] Could we get rid of Org specific "mark ring" Nicolas Goaziou
2018-01-30  5:06 ` Allen Li
2018-01-30 11:35   ` Kaushal Modi
2018-01-30 12:02     ` Rasmus
2018-01-30 12:36     ` Tim Cross
2018-01-30 20:47 ` Samuel Wales
2018-01-30 21:29   ` Nicolas Goaziou
2018-01-30 22:30     ` Samuel Wales
2018-01-30 22:33       ` Samuel Wales
2018-01-30 22:42       ` Nicolas Goaziou
2018-01-30 23:00         ` Samuel Wales
2018-01-30 23:06           ` Nicolas Goaziou
2018-01-30 23:15             ` Samuel Wales
2018-01-30 23:53               ` Allen Li
2018-01-31  2:02                 ` Samuel Wales
2018-01-31 11:40                   ` Nicolas Goaziou
2018-01-31 19:24                     ` Samuel Wales
2018-01-31 19:29                       ` Samuel Wales
2018-02-24 22:30                       ` Nicolas Goaziou
2018-02-24 23:50                         ` Samuel Wales
2018-02-25  8:08                           ` Nicolas Goaziou
2018-02-25 20:28                             ` Samuel Wales
2018-02-27  0:27                               ` Nicolas Goaziou
2018-02-27  1:54                                 ` Samuel Wales
2018-02-27  7:09                                   ` Allen Li [this message]
2018-02-27 15:53                                     ` Nicolas Goaziou
2018-02-27 20:40                                       ` Samuel Wales
2018-02-27 20:48                                         ` Samuel Wales
2018-02-25  0:02                         ` Samuel Wales
2018-04-26 23:34 ` Bastien
2018-04-27  0:32   ` Samuel Wales
2018-04-27  1:21     ` Bastien
2018-04-27  1:24       ` Samuel Wales
2018-04-27  1:56         ` Bastien
2018-05-03 22:04           ` Samuel Wales

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJr1M6e0_jiitbpkLPd-n9itSd0tw-cT_s-4JXNKyUQ=1LWz9Q@mail.gmail.com' \
    --to=darkfeline@felesatra.moe \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    --cc=samologist@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).