all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Pierre Neidhardt <ambrevar@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: 29110@debbugs.gnu.org
Subject: bug#29110: 25.2; Should push-mark allow duplicates?
Date: Thu, 02 Nov 2017 00:07:05 +0100	[thread overview]
Message-ID: <87fu9xioo6.fsf@gmail.com> (raw)
In-Reply-To: <de246820-57f4-4794-84a3-2342cd550fe2@default>


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.



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



>> - It eats up more memory.
>
> Seriously?  Bof.

Indeed, bof, that was more of a wink.  I do not know the Emacs standard
in memory consumption though.

But consider this: with Evil, jumping between two marks (so just
navigating between them) will duplicate each mark every time.  You might
argue that this is bad code on Evil's side.  But then high-level
functions might call the jumping functions in loops...  And so on.

The point is that for somebody writing some fairly high level code, it
gets quite obscur as to why the mark-ring blows up.

I know, none of this is a valid reason.



Regardless, I realize that I failed to formulate a proper query in my
initial report: Does anybody have a hunch as for why duplicate marks
could potentially interfere with code manipulating the mark-ring?  See
the issues on Helm and Evil.

--
Pierre Neidhardt





  reply	other threads:[~2017-11-01 23:07 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 [this message]
2017-11-01 23:30     ` Noam Postavsky
2017-11-02  6:43       ` Pierre Neidhardt
2017-11-02  0:53     ` Drew Adams
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=87fu9xioo6.fsf@gmail.com \
    --to=ambrevar@gmail.com \
    --cc=29110@debbugs.gnu.org \
    --cc=drew.adams@oracle.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.