all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Pierre Neidhardt <ambrevar@gmail.com>
Cc: 29110@debbugs.gnu.org
Subject: bug#29110: 25.2; Should push-mark allow duplicates?
Date: Wed, 1 Nov 2017 17:53:44 -0700 (PDT)	[thread overview]
Message-ID: <4c91d163-4d9b-4b0f-9592-264048dc77e5@default> (raw)
In-Reply-To: <87fu9xioo6.fsf@gmail.com>

> I understand there might be some use cases, I just don't see which one.
> 
> > Consider the simple case of someone using vanilla `C-u C-SPC'.
> > Someone might want to have duplicates at different positions
> > in the ring, visiting them in order.
> 
> Hmm, I'm tempted to say "bof" too here :)  You are not saying 
>_why_ the user would like to see duplicates.

What part of "visiting them in order" wasn't clear?

That's the point of having a sequence (or ring): order
and (possibly) duplicates.

> >> - Functions working with rings will probably want to remove the
> >> duplicates, so they end up calling `remove' and the like over and over
> >> again.
> >
> > Why "over and over again"?  You can prevent adding duplicates, no?
> 
> In every function calling push-mark, yes.  That's what I mean with "over
> and over again".  How do you prevent this without advising push-mark?

Advising `push-mark' is fine, if that's what you always want,
everywhere.  If not, define your own `my-push-mark` for the
use cases you have.

> But consider this: with Evil, jumping between two marks (so just
> navigating between them) will duplicate each mark every time.

Then there is something wrong with Evil, perhaps.
With vanilla Emacs, jumping to a marker does not push
another marker there.

> You might argue that this is bad code on Evil's side.

I might, if I understood it more.  I really have no idea.

> But then high-level functions might call the jumping
> functions in loops...  And so on.

And so on sounds like compounding a problem.  Is it a problem
of Evil's own making?  Why would it push a mark each time it
jumps to a marker.  Vanilla Emacs doesn't do that.





  parent reply	other threads:[~2017-11-02  0:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01 22:19 bug#29110: 25.2; Should push-mark allow duplicates? Pierre Neidhardt
2017-11-01 22:43 ` Drew Adams
2017-11-01 23:07   ` Pierre Neidhardt
2017-11-01 23:30     ` Noam Postavsky
2017-11-02  6:43       ` Pierre Neidhardt
2017-11-02  0:53     ` Drew Adams [this message]
2017-11-02  6:40       ` Pierre Neidhardt
2017-11-02 13:34         ` Drew Adams
2017-11-05 14:59           ` Pierre Neidhardt
2017-11-05 18:41             ` Drew Adams
2022-02-08  6:24 ` Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=4c91d163-4d9b-4b0f-9592-264048dc77e5@default \
    --to=drew.adams@oracle.com \
    --cc=29110@debbugs.gnu.org \
    --cc=ambrevar@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.