emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [RFC] Could we get rid of Org specific "mark ring"
@ 2018-01-29 23:21 Nicolas Goaziou
  2018-01-30  5:06 ` Allen Li
                   ` (2 more replies)
  0 siblings, 3 replies; 35+ messages in thread
From: Nicolas Goaziou @ 2018-01-29 23:21 UTC (permalink / raw)
  To: Org Mode List

Hello,

As the title suggests, I'm wondering if we could remove Org's own
implementation of the mark ring, for some reasons :

- Emacs already provides two of them: the local one and the global one.
  This feels like re-inventing the wheel;

- Org mark ring and Emacs mark ring are sometimes out of sync, hence bug
  #23745;

- `org-mark-ring-goto' binding (C-c &) conflicts with some minor modes
  (e.g., Yasnippet).

So, could we simply remove this part of Org and use Emacs facilities,
with their standard bindings (C-u C-<SPC> and C-x C-<SPC>) and behaviour
instead?

For hard-core Org users, it might be possible to create a function that
cycles among Org buffers only in the Emacs' mark ring. I don't think
this is necessary, tho.

Thoughts?

Regards,

-- 
Nicolas Goaziou                                                0x80A93738

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  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 20:47 ` Samuel Wales
  2018-04-26 23:34 ` Bastien
  2 siblings, 1 reply; 35+ messages in thread
From: Allen Li @ 2018-01-30  5:06 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

I was not aware Org had its own mark ring, and I see no use for it
personally when Emacs's mark ring exists.

On Mon, Jan 29, 2018 at 3:21 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Hello,
>
> As the title suggests, I'm wondering if we could remove Org's own
> implementation of the mark ring, for some reasons :
>
> - Emacs already provides two of them: the local one and the global one.
>   This feels like re-inventing the wheel;
>
> - Org mark ring and Emacs mark ring are sometimes out of sync, hence bug
>   #23745;
>
> - `org-mark-ring-goto' binding (C-c &) conflicts with some minor modes
>   (e.g., Yasnippet).
>
> So, could we simply remove this part of Org and use Emacs facilities,
> with their standard bindings (C-u C-<SPC> and C-x C-<SPC>) and behaviour
> instead?
>
> For hard-core Org users, it might be possible to create a function that
> cycles among Org buffers only in the Emacs' mark ring. I don't think
> this is necessary, tho.
>
> Thoughts?
>
> Regards,
>
> --
> Nicolas Goaziou                                                0x80A93738
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  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
  0 siblings, 2 replies; 35+ messages in thread
From: Kaushal Modi @ 2018-01-30 11:35 UTC (permalink / raw)
  To: Allen Li; +Cc: emacs-org list, Nicolas Goaziou

[-- Attachment #1: Type: text/plain, Size: 304 bytes --]

On Tue, Jan 30, 2018, 12:07 AM Allen Li <vianchielfaura@gmail.com> wrote:

> I was not aware Org had its own mark ring, and I see no use for it
> personally when Emacs's mark ring exists.
>

Same here :)

So also I wouldn't miss out if that feature is removed, C-u SPC works
great.

>

-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-01-30 11:35   ` Kaushal Modi
@ 2018-01-30 12:02     ` Rasmus
  2018-01-30 12:36     ` Tim Cross
  1 sibling, 0 replies; 35+ messages in thread
From: Rasmus @ 2018-01-30 12:02 UTC (permalink / raw)
  To: emacs-orgmode

Kaushal Modi <kaushal.modi@gmail.com> writes:

> On Tue, Jan 30, 2018, 12:07 AM Allen Li <vianchielfaura@gmail.com> wrote:
>
>> I was not aware Org had its own mark ring, and I see no use for it
>> personally when Emacs's mark ring exists.
>>
>
> Same here :)
>
> So also I wouldn't miss out if that feature is removed, C-u SPC works
> great.

I was also not aware of this and thus wouldn’t miss it, if removed.

Rasmus

-- 
You people at the NSA are becoming my new best friends!

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-01-30 11:35   ` Kaushal Modi
  2018-01-30 12:02     ` Rasmus
@ 2018-01-30 12:36     ` Tim Cross
  1 sibling, 0 replies; 35+ messages in thread
From: Tim Cross @ 2018-01-30 12:36 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: Allen Li, emacs-org list, Nicolas Goaziou


Same here.

Tim

Kaushal Modi <kaushal.modi@gmail.com> writes:

> On Tue, Jan 30, 2018, 12:07 AM Allen Li <vianchielfaura@gmail.com> wrote:
>
>> I was not aware Org had its own mark ring, and I see no use for it
>> personally when Emacs's mark ring exists.
>>
>
> Same here :)
>
> So also I wouldn't miss out if that feature is removed, C-u SPC works
> great.
>
>>


-- 
Tim Cross

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  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 20:47 ` Samuel Wales
  2018-01-30 21:29   ` Nicolas Goaziou
  2018-04-26 23:34 ` Bastien
  2 siblings, 1 reply; 35+ messages in thread
From: Samuel Wales @ 2018-01-30 20:47 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

On 1/29/18, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> So, could we simply remove this part of Org and use Emacs facilities,
> with their standard bindings (C-u C-<SPC> and C-x C-<SPC>) and behaviour
> instead?

org would have to push to both local and global it seems.  sounds good to me.

===

note also that for single buffers there is marker-visit.el.

also this from se could be modified to work for global mark ring --
every ring in emacs should have both next and prev.  i never
understood the point of rings in emacs except to save memory.

(defun se-unpop-to-mark-command ()
  "Unpop off mark ring. Does nothing if mark ring is empty."
  (interactive)
  (when mark-ring
    (setq mark-ring (cons (copy-marker (mark-marker)) mark-ring))
    (set-marker (mark-marker) (car (last mark-ring)) (current-buffer))
    (when (null (mark t)) (ding))
    (setq mark-ring (nbutlast mark-ring))
    (goto-char (marker-position (car (last mark-ring))))))

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-01-30 20:47 ` Samuel Wales
@ 2018-01-30 21:29   ` Nicolas Goaziou
  2018-01-30 22:30     ` Samuel Wales
  0 siblings, 1 reply; 35+ messages in thread
From: Nicolas Goaziou @ 2018-01-30 21:29 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org Mode List

Hello,

Samuel Wales <samologist@gmail.com> writes:

> On 1/29/18, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> So, could we simply remove this part of Org and use Emacs facilities,
>> with their standard bindings (C-u C-<SPC> and C-x C-<SPC>) and behaviour
>> instead?
>
> org would have to push to both local and global it seems.

`push-mark' would take care of this. So Org wouldn't need to.

> also this from se could be modified to work for global mark ring --
> every ring in emacs should have both next and prev.  i never
> understood the point of rings in emacs except to save memory.
>
> (defun se-unpop-to-mark-command ()
>   "Unpop off mark ring. Does nothing if mark ring is empty."
>   (interactive)
>   (when mark-ring
>     (setq mark-ring (cons (copy-marker (mark-marker)) mark-ring))
>     (set-marker (mark-marker) (car (last mark-ring)) (current-buffer))
>     (when (null (mark t)) (ding))
>     (setq mark-ring (nbutlast mark-ring))
>     (goto-char (marker-position (car (last mark-ring))))))

You could suggest it to Emacs developers (i.e., file a bug report.)

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  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
  0 siblings, 2 replies; 35+ messages in thread
From: Samuel Wales @ 2018-01-30 22:30 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

On 1/30/18, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> org would have to push to both local and global it seems.
>
> `push-mark' would take care of this. So Org wouldn't need to.

iiuc, i can't agree with you.  org pushes marks onto the org mark ring
in various places [and imo even misses at least one place -- going to
outline from agenda].  i assumed org would continue to do so, except
to the local and global mark rings.

will all those good automatic mark pushing events be removed?  i do
not get the point of that.  that's potentially a lot of programming
work to put onto the user just to get back the functionality we have
now.

so i probably misunderstand your meaning.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-01-30 22:30     ` Samuel Wales
@ 2018-01-30 22:33       ` Samuel Wales
  2018-01-30 22:42       ` Nicolas Goaziou
  1 sibling, 0 replies; 35+ messages in thread
From: Samuel Wales @ 2018-01-30 22:33 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

minor followup to prev post.

here is a place where org does not but ime is useful to push the mark.
org does similarly when you follow a link, for example.

i believe this should be done to the local and global mark rings.

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 98f6034..d410d3a 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -8640,6 +8640,7 @@ displayed Org file fills the frame."
       (pop-to-buffer-same-window buffer)
       (when delete-other-windows (delete-other-windows))
       (widen)
+      (org-mark-ring-push)
       (goto-char pos)
       (when (derived-mode-p 'org-mode)
 	(org-show-context 'agenda)

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  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
  1 sibling, 1 reply; 35+ messages in thread
From: Nicolas Goaziou @ 2018-01-30 22:42 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org Mode List

Samuel Wales <samologist@gmail.com> writes:

> On 1/30/18, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>>> org would have to push to both local and global it seems.
>>
>> `push-mark' would take care of this. So Org wouldn't need to.
>
> iiuc, i can't agree with you.  org pushes marks onto the org mark ring
> in various places [and imo even misses at least one place -- going to
> outline from agenda].  i assumed org would continue to do so, except
> to the local and global mark rings.
>
> will all those good automatic mark pushing events be removed?  i do
> not get the point of that.  that's potentially a lot of programming
> work to put onto the user just to get back the functionality we have
> now.
>
> so i probably misunderstand your meaning.

Let me clarify. I just want to replace `org-mark-ring-push' with
`push-mark'. The distinction between local and global mark rings are
taken care of in the latter. Org doesn't need to mess with it.

I hope that's clearer now.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-01-30 22:42       ` Nicolas Goaziou
@ 2018-01-30 23:00         ` Samuel Wales
  2018-01-30 23:06           ` Nicolas Goaziou
  0 siblings, 1 reply; 35+ messages in thread
From: Samuel Wales @ 2018-01-30 23:00 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

On 1/30/18, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Let me clarify. I just want to replace `org-mark-ring-push' with
> `push-mark'. The distinction between local and global mark rings are
> taken care of in the latter. Org doesn't need to mess with it.
>
> I hope that's clearer now.

yes, thanks.

do we really want "If the last global mark pushed was not in the current buffer,
also push LOCATION on the global mark ring."?  if it was in the
current buffer then we don't go to the exact location?

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-01-30 23:00         ` Samuel Wales
@ 2018-01-30 23:06           ` Nicolas Goaziou
  2018-01-30 23:15             ` Samuel Wales
  0 siblings, 1 reply; 35+ messages in thread
From: Nicolas Goaziou @ 2018-01-30 23:06 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org Mode List

Samuel Wales <samologist@gmail.com> writes:

> do we really want "If the last global mark pushed was not in the current buffer,
> also push LOCATION on the global mark ring."?  if it was in the
> current buffer then we don't go to the exact location?

With local ring, you do, not with global one. That is standard Emacs behaviour.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-01-30 23:06           ` Nicolas Goaziou
@ 2018-01-30 23:15             ` Samuel Wales
  2018-01-30 23:53               ` Allen Li
  0 siblings, 1 reply; 35+ messages in thread
From: Samuel Wales @ 2018-01-30 23:15 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

On 1/30/18, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> With local ring, you do, not with global one. That is standard Emacs
> behaviour.

does this constitute a change in org behavior?  i'd want the same
behavior as now.  it would be confusing to follow a link, then follow
another link in the same buffer, then go back globally, and end up not
in the original place [or even the same buffer].

probably i have the wrong end of the stick.  but i find that asking
weird questions like this can lead to people being on the same page
where they were not.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-01-30 23:15             ` Samuel Wales
@ 2018-01-30 23:53               ` Allen Li
  2018-01-31  2:02                 ` Samuel Wales
  0 siblings, 1 reply; 35+ messages in thread
From: Allen Li @ 2018-01-30 23:53 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org Mode List, Nicolas Goaziou

On Tue, Jan 30, 2018 at 3:15 PM, Samuel Wales <samologist@gmail.com> wrote:
> On 1/30/18, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> With local ring, you do, not with global one. That is standard Emacs
>> behaviour.
>
> does this constitute a change in org behavior?  i'd want the same
> behavior as now.  it would be confusing to follow a link, then follow
> another link in the same buffer, then go back globally, and end up not
> in the original place [or even the same buffer].

It does change org behavior, since the native mark ring
distinguishes local from global, whereas org-mark-ring does not.
With the proposed change, there won't be a single
org-mark-ring-goto, you would have to make sure you call the
right command out of pop-to-mark-command or pop-global-mark.

As a counterpoint, it is not entirely without precedent to
implement our own mark ring. xref.el also has its own "marker"
ring.

Maybe there should be a standard specialized marker ring macro in
Emacs, then org and xref (and others) can use it.

>
> probably i have the wrong end of the stick.  but i find that asking
> weird questions like this can lead to people being on the same page
> where they were not.
>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-01-30 23:53               ` Allen Li
@ 2018-01-31  2:02                 ` Samuel Wales
  2018-01-31 11:40                   ` Nicolas Goaziou
  0 siblings, 1 reply; 35+ messages in thread
From: Samuel Wales @ 2018-01-31  2:02 UTC (permalink / raw)
  To: Allen Li; +Cc: Org Mode List, Nicolas Goaziou

On 1/30/18, Allen Li <vianchielfaura@gmail.com> wrote:
> It does change org behavior, since the native mark ring
> distinguishes local from global, whereas org-mark-ring does not.
> With the proposed change, there won't be a single
> org-mark-ring-goto, you would have to make sure you call the
> right command out of pop-to-mark-command or pop-global-mark.

thanks.  then i oppose this change.

it seems crazy to have to think about whether where you will be going
is in the same buffer or not.  if that is what you mean.

i would be ok with it only if the global mark ring worked like the org
mark ring.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-01-31  2:02                 ` Samuel Wales
@ 2018-01-31 11:40                   ` Nicolas Goaziou
  2018-01-31 19:24                     ` Samuel Wales
  0 siblings, 1 reply; 35+ messages in thread
From: Nicolas Goaziou @ 2018-01-31 11:40 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Allen Li, Org Mode List

Hello,

Samuel Wales <samologist@gmail.com> writes:

> On 1/30/18, Allen Li <vianchielfaura@gmail.com> wrote:
>> It does change org behavior, since the native mark ring
>> distinguishes local from global, whereas org-mark-ring does not.
>> With the proposed change, there won't be a single
>> org-mark-ring-goto, you would have to make sure you call the
>> right command out of pop-to-mark-command or pop-global-mark.
>
> thanks.  then i oppose this change.
>
> it seems crazy to have to think about whether where you will be going
> is in the same buffer or not.  if that is what you mean.

It isn't crazy at all, and works surprising well in practice. Mark ring
is about finding some place you were before. Usually, at least for me,
the document where that place was is known. Once you are there, the
local ring can probably get you back to the desired location. Have you
tried regular Emacs mark ring?

In the current situation, you have to answer a more difficult question:
"Did I move to the desired location using Org tools or other Emacs
tools?". In the former case, I have to use Org specific ring (C-c &,
assuming it is accessible), otherwise, this is Emacs mark ring. So,
e.g., if I follow a link, this is C-c &, if I do an isearch, this is C-u
C-<SPC>. This is exactly what bug #23745 is about. A user is following
an Org internal link and is surprised, rightfully IMO, that C-u C-<SPC>
doesn't get it back to where it was before.

The crazier situation may not be the one you think.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  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
  0 siblings, 2 replies; 35+ messages in thread
From: Samuel Wales @ 2018-01-31 19:24 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Allen Li, Org Mode List

in my usage, the current distinction between org-mark-ring and
mark-ring does not disturb me at all.  i agree that it would be good
to be able to use global-mark-ring as a substitute for both
global-mark-ring and org-mark-ring, but ONLY if it takes me to the
exact location just like org-mark-ring does.

i use mark-ring extensively.  this is when i mark manually, or in
cases like isearch or bob.  it is intuitive and i never have to think
about the distinction from org-mark-ring.  i agree that some users
would expect the mark to be set also.  which i think is a good idea,
for both global and local mark rings.  but ONLY if the global one goes
to the exact spot.

i do not use global-mark-ring.  this is because [1] nonergo binding
[fixable] [2] i haven't made prev and next for it [fixable] [3] it
makes ZERO sense to me why it behaves so strangely.

i expect global-mark-ring to take me to the exact spot.  period.  when
it doesn't, i get so confused that i just stop using it.  i don't
understand why anybody finds it intuitive.  do a lot of people use it?
 unlike the local mark ring, i have never seen actual use of it
mentioned in the community.  perhaps its users have tiny files.

-- 
The Kafka Pandemic: <http://thekafkapandemic.blogspot.com>

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
<http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-01-31 19:24                     ` Samuel Wales
@ 2018-01-31 19:29                       ` Samuel Wales
  2018-02-24 22:30                       ` Nicolas Goaziou
  1 sibling, 0 replies; 35+ messages in thread
From: Samuel Wales @ 2018-01-31 19:29 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Allen Li, Org Mode List

this is ot but another bit of over-fancification is that iirc you
can't set the mark twice successively in the same location.  you might
not think there is a need for that, but there is [marking contiguous
regions], but even if there were not, the value of predictable
behavior with no special cases is high.  special cases require callers
to special case the special cases.  i don't know why emacs special
cases global-mark-ring.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  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  0:02                         ` Samuel Wales
  1 sibling, 2 replies; 35+ messages in thread
From: Nicolas Goaziou @ 2018-02-24 22:30 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Allen Li, Org Mode List

Hello,

Samuel Wales <samologist@gmail.com> writes:

> in my usage, the current distinction between org-mark-ring and
> mark-ring does not disturb me at all.  i agree that it would be good
> to be able to use global-mark-ring as a substitute for both
> global-mark-ring and org-mark-ring, but ONLY if it takes me to the
> exact location just like org-mark-ring does.
>
> i use mark-ring extensively.  this is when i mark manually, or in
> cases like isearch or bob.  it is intuitive and i never have to think
> about the distinction from org-mark-ring.  i agree that some users
> would expect the mark to be set also.  which i think is a good idea,
> for both global and local mark rings.  but ONLY if the global one goes
> to the exact spot.

I do not discuss your needs. My concern is about common use of the mark
ring. A dedicated mark ring for Org buffers sounds overkill.

Note that, in order to get back old behaviour once `org-mark-ring' is an
alias for `push-mark', you could do the following (untested, but you get
the idea):

     (setq my-org-places (make-ring 16))
     (setq my--org-places-count 0)

     (defun my-push-org-location (&optional location &rest _)
       (when (eq major-mode 'org-mode)
         (ring-insert my-org-places (copy-marker (or location (point))))))

     (advice-add 'push-mark :before #'my-push-org-location)

     (defun my-jump-org-location ()
       (interactive)
       (when (ring-empty-p my-org-places)
         (error "No Org location stored"))
       (if (eq last-command 'my-jump-org-location)
           (cl-incf my--org-places-count)
         (setq my--org-places-count 0))
       (let* ((m (ring-ref my-org-places))
              (buffer (marker-buffer m))
              (positon (marker-position m)))
         (set-buffer buffer)
         (or (and (>= position (point-min))
                  (<= position (point-max)))
             (if widen-automatically (widen)
               (error "Org location is outside accessible part of buffer")))
         (goto-char position)
         (switch-to-buffer buffer)))

     (global-set-key (kbd "C-c &") #'my-jump-org-location)

> i do not use global-mark-ring.  this is because [1] nonergo binding
> [fixable] [2] i haven't made prev and next for it [fixable] [3] it
> makes ZERO sense to me why it behaves so strangely.
>
> i expect global-mark-ring to take me to the exact spot.  period.  when
> it doesn't, i get so confused that i just stop using it.  i don't
> understand why anybody finds it intuitive.  do a lot of people use it?
>  unlike the local mark ring, i have never seen actual use of it
> mentioned in the community.  perhaps its users have tiny files.

You could file an Emacs bug report about it.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-02-24 22:30                       ` Nicolas Goaziou
@ 2018-02-24 23:50                         ` Samuel Wales
  2018-02-25  8:08                           ` Nicolas Goaziou
  2018-02-25  0:02                         ` Samuel Wales
  1 sibling, 1 reply; 35+ messages in thread
From: Samuel Wales @ 2018-02-24 23:50 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Allen Li, Org Mode List

On 2/24/18, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> I do not discuss your needs.

not sure what you mean by this.  i was replying to your statements
about your usage and the global mark ring.

>It isn't crazy at all, and works surprising well in practice.

to make sure we are on the same page:

we seem to be discussing the removal of a feature.  this feature is
not redundant.

key example:

in org maint, i can click on a link and, without any cognitive
overhead, and with certainty, run a command to get back to the link i
clicked on.  to me this seems like basic hypertext ability, such as
you might find in info or the back button on firefox.

i think your change will make this "back button" behavior as stated in
the previous paragraph impossible.  please correct me if that is not
true.

[for the bug that seems to have prompted your proposal, we could be
discussing pushing to the global and local mark rings.  but this does
not seem to be what we are discussing.]

you have suggested filing a bug report against emacs.  but the emacs
behavior is ancient.  emacs-devel is conservative.  emacs changing
does not seem much more likely than every nation on earth switching to
english as its official language tomorrow.

a wrapper to the global mark ring that makes you go to the exact
location, plus a backward and forward ability, would be good.
however, i am not aware of such a thing.

thank you for engaging.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-02-24 22:30                       ` Nicolas Goaziou
  2018-02-24 23:50                         ` Samuel Wales
@ 2018-02-25  0:02                         ` Samuel Wales
  1 sibling, 0 replies; 35+ messages in thread
From: Samuel Wales @ 2018-02-25  0:02 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Allen Li, Org Mode List

after fixing a typo i get "Warning: ring-ref called with 1 argument,
but requires
    2"

i am limited in computer use.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-02-24 23:50                         ` Samuel Wales
@ 2018-02-25  8:08                           ` Nicolas Goaziou
  2018-02-25 20:28                             ` Samuel Wales
  0 siblings, 1 reply; 35+ messages in thread
From: Nicolas Goaziou @ 2018-02-25  8:08 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Allen Li, Org Mode List

Hello,

Samuel Wales <samologist@gmail.com> writes:

> in org maint, i can click on a link and, without any cognitive
> overhead, and with certainty, run a command to get back to the link i
> clicked on.  to me this seems like basic hypertext ability, such as
> you might find in info or the back button on firefox.
>
> i think your change will make this "back button" behavior as stated in
> the previous paragraph impossible.  please correct me if that is not
> true.

That is not true.

If you're still in the same document, the local mark ring moves you back
to the previous location. If you are not in the same document anymore,
the global mark ring brings you back to the previous location.

> [for the bug that seems to have prompted your proposal, we could be
> discussing pushing to the global and local mark rings.  but this does
> not seem to be what we are discussing.]

I don't want to alter the Emacs mark ring behaviour.
>
> you have suggested filing a bug report against emacs.  but the emacs
> behavior is ancient.  emacs-devel is conservative.  emacs changing
> does not seem much more likely than every nation on earth switching to
> english as its official language tomorrow.

You are complaining about the global mark ring, which is an Emacs
feature. So, this complaint should reach Emacs devel.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-02-25  8:08                           ` Nicolas Goaziou
@ 2018-02-25 20:28                             ` Samuel Wales
  2018-02-27  0:27                               ` Nicolas Goaziou
  0 siblings, 1 reply; 35+ messages in thread
From: Samuel Wales @ 2018-02-25 20:28 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Allen Li, Org Mode List

On 2/25/18, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Hello,
>
> Samuel Wales <samologist@gmail.com> writes:
>
>> in org maint, i can click on a link and, without any cognitive
>> overhead, and with certainty, run a command to get back to the link i
>> clicked on.  to me this seems like basic hypertext ability, such as
>> you might find in info or the back button on firefox.
>>
>> i think your change will make this "back button" behavior as stated in
>> the previous paragraph impossible.  please correct me if that is not
>> true.
>
> That is not true.
>
> If you're still in the same document, the local mark ring moves you back
> to the previous location. If you are not in the same document anymore,
> the global mark ring brings you back to the previous location.

i am at a link in file a that sends me to file b.  i click on it
[actually ret on it].  i pop the global mark ring.

you are saying i will always get back to the link in file a always?

now same example with the link pointing to file a.  will the global
mark ring take me there?  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.  almost always, by the time i have done whatever
i was doing at target, that is totally forgotten.  the cognitive
overhead criterion in my first paragraph is violated.  so i /think/ my
statement about the back button behavior being broken with your change
is true.  please correct if that is wrong.

>> [for the bug that seems to have prompted your proposal, we could be
>> discussing pushing to the global and local mark rings.  but this does
>> not seem to be what we are discussing.]
>
> I don't want to alter the Emacs mark ring behaviour.

not asking you to.  my imperssion was that you could fix the bug by
having org mark ring push push to both rings.  you would keep the
current behavior of the org mark ring.  perhaps i misremember the bug.

> You are complaining about the global mark ring, which is an Emacs
> feature. So, this complaint should reach Emacs devel.

i am saying that it's not a substitute for the current org behavior.

iiuc, of course.

i don't want to have to care about the global mark ring.  i don't use
it, but if i am forced to by your change, then and only then do i
think it's a problem that its behavior is too fancy.  i don't think
emacs devs will fix it.  it has a mysterious value to its users.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-02-25 20:28                             ` Samuel Wales
@ 2018-02-27  0:27                               ` Nicolas Goaziou
  2018-02-27  1:54                                 ` Samuel Wales
  0 siblings, 1 reply; 35+ messages in thread
From: Nicolas Goaziou @ 2018-02-27  0:27 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Allen Li, Org Mode List

Hello,

Samuel Wales <samologist@gmail.com> writes:

> On 2/25/18, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

>> If you're still in the same document, the local mark ring moves you back
>> to the previous location. If you are not in the same document anymore,
>> the global mark ring brings you back to the previous location.

> i am at a link in file a that sends me to file b.  i click on it
> [actually ret on it].  i pop the global mark ring.
>
> you are saying i will always get back to the link in file a always?
>
> now same example with the link pointing to file a.  will the global
> mark ring take me there?

I guess these are rhetorical questions because I answered them above.

> 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.

> almost always, by the time i have done whatever
> i was doing at target, that is totally forgotten.  the cognitive
> overhead criterion in my first paragraph is violated.  so i /think/ my
> statement about the back button behavior being broken with your change
> is true.  please correct if that is wrong.

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.

>>> [for the bug that seems to have prompted your proposal, we could be
>>> discussing pushing to the global and local mark rings.  but this does
>>> not seem to be what we are discussing.]

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 am saying that it's not a substitute for the current org behavior.

My proposal is slightly different than the current Org behaviour, but
the features are the same. I don't think Org own mark ring is really
needed. It makes Org less integrated in the Emacs ecosystem.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-02-27  0:27                               ` Nicolas Goaziou
@ 2018-02-27  1:54                                 ` Samuel Wales
  2018-02-27  7:09                                   ` Allen Li
  0 siblings, 1 reply; 35+ messages in thread
From: Samuel Wales @ 2018-02-27  1:54 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Allen Li, Org Mode List

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.

thank you for engaging.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-02-27  1:54                                 ` Samuel Wales
@ 2018-02-27  7:09                                   ` Allen Li
  2018-02-27 15:53                                     ` Nicolas Goaziou
  0 siblings, 1 reply; 35+ messages in thread
From: Allen Li @ 2018-02-27  7:09 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org Mode List, Nicolas Goaziou

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.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-02-27  7:09                                   ` Allen Li
@ 2018-02-27 15:53                                     ` Nicolas Goaziou
  2018-02-27 20:40                                       ` Samuel Wales
  0 siblings, 1 reply; 35+ messages in thread
From: Nicolas Goaziou @ 2018-02-27 15:53 UTC (permalink / raw)
  To: Allen Li; +Cc: Org Mode List

Hello,

Allen Li <darkfeline@felesatra.moe> writes:

> 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.

[...]

> 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.

Then I suggest to bind `org-mark-ring-push' to `M-.' and
`org-mark-ring-goto' to `M-,', i.e., replace xref global bindings for
Org buffers. This will at least solve the third issue I pointed out.

Any objection?

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-02-27 15:53                                     ` Nicolas Goaziou
@ 2018-02-27 20:40                                       ` Samuel Wales
  2018-02-27 20:48                                         ` Samuel Wales
  0 siblings, 1 reply; 35+ messages in thread
From: Samuel Wales @ 2018-02-27 20:40 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List, Allen Li

no objections, assuming tags users don't need those bindings?

no objections to anything allen said.

other things that can be useful in org mark ring imo are refile-goto
and going to outline from agenda.

===

off topic question:

  - why are any mark rings rings?  why are they not queues?  do users
prefer to cycle around 16, 32, or whatever number of times instead of
using next and prev?

same questions about kill ring.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-02-27 20:40                                       ` Samuel Wales
@ 2018-02-27 20:48                                         ` Samuel Wales
  0 siblings, 0 replies; 35+ messages in thread
From: Samuel Wales @ 2018-02-27 20:48 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List, Allen Li

oh, oops, didn't notice the replace xref bindings part.  that's up to
xref users.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  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 20:47 ` Samuel Wales
@ 2018-04-26 23:34 ` Bastien
  2018-04-27  0:32   ` Samuel Wales
  2 siblings, 1 reply; 35+ messages in thread
From: Bastien @ 2018-04-26 23:34 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

Hi Nicolas,

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> As the title suggests, I'm wondering if we could remove Org's own
> implementation of the mark ring

Good idea, +1 for me.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-04-26 23:34 ` Bastien
@ 2018-04-27  0:32   ` Samuel Wales
  2018-04-27  1:21     ` Bastien
  0 siblings, 1 reply; 35+ messages in thread
From: Samuel Wales @ 2018-04-27  0:32 UTC (permalink / raw)
  To: Bastien; +Cc: Org Mode List, Nicolas Goaziou

On 4/26/18, Bastien <bzg@gnu.org> wrote:
> Good idea, +1 for me.

i'd actually stay on an old version of org forever just to avoid the
org mark ring being removed.  when i click on a link [or similar], i
want a single command that is guaranteed to go back to the exact
location.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-04-27  0:32   ` Samuel Wales
@ 2018-04-27  1:21     ` Bastien
  2018-04-27  1:24       ` Samuel Wales
  0 siblings, 1 reply; 35+ messages in thread
From: Bastien @ 2018-04-27  1:21 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org Mode List, Nicolas Goaziou

Hi Samuel,

Samuel Wales <samologist@gmail.com> writes:

> On 4/26/18, Bastien <bzg@gnu.org> wrote:
>> Good idea, +1 for me.
>
> i'd actually stay on an old version of org forever just to avoid the
> org mark ring being removed.  when i click on a link [or similar], i
> want a single command that is guaranteed to go back to the exact
> location.

Why would that be impossible to achieve with emacs mark?

-- 
 Bastien

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-04-27  1:21     ` Bastien
@ 2018-04-27  1:24       ` Samuel Wales
  2018-04-27  1:56         ` Bastien
  0 siblings, 1 reply; 35+ messages in thread
From: Samuel Wales @ 2018-04-27  1:24 UTC (permalink / raw)
  To: Bastien; +Cc: Org Mode List, Nicolas Goaziou

hi bastien,

did you read the entire thread?  it goes into detail that i cannot redo.

if you did, do you have specific questions?

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-04-27  1:24       ` Samuel Wales
@ 2018-04-27  1:56         ` Bastien
  2018-05-03 22:04           ` Samuel Wales
  0 siblings, 1 reply; 35+ messages in thread
From: Bastien @ 2018-04-27  1:56 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Org Mode List, Nicolas Goaziou

Hi Samuel,

Samuel Wales <samologist@gmail.com> writes:

> did you read the entire thread?  it goes into detail that i cannot
> redo.

yes, I read the thread.  I understand your position and that of Allen,
and there is absolutely no rush about this change.

But the fact that the Global Mark Ring does not fit several uses is
not a reason for not moving forward - I like the idea of a "link ring"
and I think we can implement it.

> if you did, do you have specific questions?

Yes: I'm wondering what precise use-case of `org-mark-push-ring' is
not covered by either the emacs local mark ring or global one?

Also, xref calls it a "stack", which I find more intuitive.

If xref implements what users expect from a global ring, then
let's fix the global ring that way.  And make "link rings" based
on a more generic global ring.

In any case, there is no rush, but I think the effort is worth it.

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [RFC] Could we get rid of Org specific "mark ring"
  2018-04-27  1:56         ` Bastien
@ 2018-05-03 22:04           ` Samuel Wales
  0 siblings, 0 replies; 35+ messages in thread
From: Samuel Wales @ 2018-05-03 22:04 UTC (permalink / raw)
  To: Bastien; +Cc: Org Mode List, Nicolas Goaziou

hi bastien,

On 4/26/18, Bastien <bzg@gnu.org> wrote:
> yes, I read the thread.  I understand your position and that of Allen,
> and there is absolutely no rush about this change.
>
> But the fact that the Global Mark Ring does not fit several uses is
> not a reason for not moving forward - I like the idea of a "link ring"
> and I think we can implement it.

are you saying that we keep the same functionality but limit it to links?

> Yes: I'm wondering what precise use-case of `org-mark-push-ring' is
> not covered by either the emacs local mark ring or global one?

i thought we discussed that in detail.

> Also, xref calls it a "stack", which I find more intuitive.

imo stack or tree [have you ever tried undo-tree's graphical tree?]
make more sense than ring.

> If xref implements what users expect from a global ring, then
> let's fix the global ring that way.  And make "link rings" based
> on a more generic global ring.

do you mean fix emacs global mark ring?  sounds good, but [politics,
new version does not come out until years later].

probably org should keep its own until emacs has had it fixed for a
few major versions, so fewer people need to install emacs just to get
the org version to work properly.  debian oldstable currently uses
emacs 24.4.1.

i'd want the local mark ring to allow double marking the same location.

if there are people who don't want to fix emacs, then there could be a
new, generic, improved global and local mark stack or tree as a
package.

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2018-05-03 22:04 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).