GNU bug report logs - #29110
25.2; Should push-mark allow duplicates?

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Pierre Neidhardt <ambrevar@HIDDEN>; dated Wed, 1 Nov 2017 22:21:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 29110 <at> debbugs.gnu.org:


Received: (at 29110) by debbugs.gnu.org; 5 Nov 2017 18:41:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 05 13:41:54 2017
Received: from localhost ([127.0.0.1]:52606 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eBPrl-0003k2-Na
	for submit <at> debbugs.gnu.org; Sun, 05 Nov 2017 13:41:53 -0500
Received: from aserp1040.oracle.com ([141.146.126.69]:19816)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1eBPrk-0003jo-Oh
 for 29110 <at> debbugs.gnu.org; Sun, 05 Nov 2017 13:41:53 -0500
Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 vA5IfiXw030772
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sun, 5 Nov 2017 18:41:45 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id vA5Ifi2J012745
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sun, 5 Nov 2017 18:41:44 GMT
Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15])
 by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vA5Ifi2c002853;
 Sun, 5 Nov 2017 18:41:44 GMT
MIME-Version: 1.0
Message-ID: <cffb4dae-c32b-465b-adcf-9efafc25cdc1@default>
Date: Sun, 5 Nov 2017 10:41:44 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Pierre Neidhardt <ambrevar@HIDDEN>
Subject: RE: bug#29110: 25.2; Should push-mark allow duplicates?
References: <87h8udiqv3.fsf@HIDDEN>
 <de246820-57f4-4794-84a3-2342cd550fe2@default> <87fu9xioo6.fsf@HIDDEN>
 <4c91d163-4d9b-4b0f-9592-264048dc77e5@default> <87efphi3oo.fsf@HIDDEN>
 <290699e2-2140-4091-97ed-b2d5ef4dbf29@default> <87ineoojpc.fsf@HIDDEN>
In-Reply-To: <87ineoojpc.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4600.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: userv0021.oracle.com [156.151.31.71]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 29110
Cc: 29110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> >> Maybe the problem is that I see marks as "bookmarked
> >> position in text", and in this case it makes little
> >> sense to have a bookmark order.
> >
> > I too see them that way.  And there is every reason
> > to have a bookmark order - that can be very useful.
>=20
> I'm still skeptical about that one.  That being said,
> that's not a reason to remove the feature, you are right.

Yes, you don't need to be convinced, as long as the
proposal is abandoned.

But FWIW, cycling order can be quite important for
users, particularly for a situation, such as with
vanilla Emacs cycling, where you have _no alternative_,
where you cannot act on candidates (in this case visit
bookmarks/marks) _selectively_, using direct access.

For bookmarks - and the same goes for Emacs markers,
two cycle orders that can be _particularly_ useful
are: (1) order on the page, i.e., in the buffer, and
(2) time order: of creation or last modification or
last access.

If you don't get that then I can only guess that you
don't cycle among such marks very often.  Or you might
not get it if you use something (e.g. Helm?) that _does_
let you access candidates other than only by cycling,
drone-like, through a huge list of candidates, in order.

Another possibility is that the lists that you cycle
through are relatively short.  In that case, the order
has little or no importance.

For example, with vanilla Emacs Info `i' (`Info-index'),=20
it's not very bothersome that one can only cycle through
multiple matches in a single, predefined order, using `,',
because there are only a very few candidates (e.g. less
than 5) to cycle among.

Being limited to cycling becomes problematic when there
are many candidates to choose from.  UIs such as Icicles
and Helm let you pare down the set of matching candidates,
incrementally, and they (at least Icicles does) also let
you access any number of them directly (e.g. click or hit
a key).

> Enough bike-shedding :)

This isn't bike-shedding.  It's more like discussing
a proposal to remove the kitchen altogether because
some users always eat out and no longer cook at home.=20

The epithet "bike-shedding" can be, BTW, a facile
put-down, tossed out when one has nothing useful to
add further to a discussion.

It dismisses the discussion itself as unimportant,
as a substitute for acknowledging a weak or abandoned
argument.  It confuses personally wanting to drop a
discussion with the relative importance of the
discussion.

Whether you really care about your proposal is not
so relevant, once it has been dropped, as whether it
raises an important or useful question, i.e., whether
the discussion of the proposal serves a purpose.

The question of duplicate candidates, and more
generally of cycling, and even more generally of how
to choose and access candidates, is an important one.

Removing duplicates _can_ be very useful.  What we
should avoid, IMO, is removing duplicates willy nilly,
or in all cases.  Less generally, systematically=20
removing duplicates for marker navigaion would be a
mistake, IMO.

But this general question is worth considering: How
can Emacs provide users with the ability to remove
duplicates when they want to, either on the fly (e.g.
hit a key) or by configuration for a given feature.

I don't think that vanilla Emacs has a good answer for
that question.  Icicles (and I assume other UIs that
have since adopted a similar approach) lets users hit
`C-$' to toggle the removal of duplicate candidates on
the fly.  You can also configure a given command, to
have it remove duplicates from the get-go.

Vanilla Emacs provides no on-the-fly user modification
of the set of candidates or their order of access.
That's really the rub scratched by the question in the
Subject line here.  A bug thread is not the main place
to discuss such a problem thoroughly, but it can be a
place to raise the question.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29110; Package emacs. Full text available.

Message received at 29110 <at> debbugs.gnu.org:


Received: (at 29110) by debbugs.gnu.org; 5 Nov 2017 14:59:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 05 09:59:21 2017
Received: from localhost ([127.0.0.1]:52285 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eBMOP-0000lD-8j
	for submit <at> debbugs.gnu.org; Sun, 05 Nov 2017 09:59:21 -0500
Received: from mail-wr0-f179.google.com ([209.85.128.179]:45545)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ambrevar@HIDDEN>) id 1eBMON-0000l0-GH
 for 29110 <at> debbugs.gnu.org; Sun, 05 Nov 2017 09:59:19 -0500
Received: by mail-wr0-f179.google.com with SMTP id y9so6316581wrb.2
 for <29110 <at> debbugs.gnu.org>; Sun, 05 Nov 2017 06:59:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=references:user-agent:from:to:cc:subject:in-reply-to:date
 :message-id:mime-version;
 bh=ut6LROfjc0KvBHVIcmetnWjPJ5YqJlaoP3/GBxEtbjI=;
 b=ILpsviW5l1NWRzgQyogyoc6Bj4w0x/lB0nbhZfBdBCiRc8U/WaVVtXleZ+KvnbE5+Y
 cXqI744LlBxGjl3HcxsNXBTdaWhtoTf8DhZHa3JjSwkCaeXYv1cKHFydEihLBt+onQqu
 zRy3L+xQ4hqH80NU1XaqTSGVVATHDLE0vLiTSlkAU0wCTyfBgd3kIQGL8O+ViOxQ+cip
 KRxDWdLLNVIxBaB68CM5hXBqf8nft48De0TgOjKxSt21JE9xEOJxO1yfvhHhedJ+Xd5x
 kPz/HgbmAZ67DIMzJxwDY0neS4CPZTqvMQf+EexaZ7xs+BsZFRd5+VhmHr/FTT5ogkwA
 G2/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:references:user-agent:from:to:cc:subject
 :in-reply-to:date:message-id:mime-version;
 bh=ut6LROfjc0KvBHVIcmetnWjPJ5YqJlaoP3/GBxEtbjI=;
 b=QMQOKXHT4WCTKxPK9Q9dRaYaotkT1CT7fR/zoxfKlNOw4MSD7Nky69E8iUZ1iR2rqu
 9WQ2JipP/7+75YC12J7UAaF+V1wgiPnkJlBy5/7ZYKwpUKZGSY6+FxLAEfDfe9E2v6QY
 Z0BR3xPM1vBdNhu//vXvpZ1tRL7prTgH7F1RI0iqfVLFjhlI6eAB4ty/ZnrnnSlYtlgY
 DHj5llNMWc1iqV6v5GcDeAwEvkZrpzm9S+h6XGX15ircJDMvIZYiX7koFUzePMfpgyDf
 PbeS4lIXzjHjb9bsuFcuobb9HGCTIR6SdeyfvDvoXjKJSTp42swupnsBYnFmvThMyGhD
 ++tA==
X-Gm-Message-State: AJaThX73zQG4i5RTt7XJh27aVQl1401eb2vf3yFE0weAdqmt/vtxy006
 kq7G0Vf0aXXmo5kHroahP/SKa0Zh
X-Google-Smtp-Source: ABhQp+QZMDyFBLbXHplp+3ilCnwwpItQygtp6X2tvBhMr31hw6ZUZ1meZkdVgglTtLOPsROKVsTb2w==
X-Received: by 10.223.168.23 with SMTP id l23mr1368378wrc.15.1509893953510;
 Sun, 05 Nov 2017 06:59:13 -0800 (PST)
Received: from dhiov23k ([197.0.145.22])
 by smtp.gmail.com with ESMTPSA id p23sm24551881wrb.76.2017.11.05.06.59.12
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sun, 05 Nov 2017 06:59:12 -0800 (PST)
References: <87h8udiqv3.fsf@HIDDEN>
 <de246820-57f4-4794-84a3-2342cd550fe2@default> <87fu9xioo6.fsf@HIDDEN>
 <4c91d163-4d9b-4b0f-9592-264048dc77e5@default> <87efphi3oo.fsf@HIDDEN>
 <290699e2-2140-4091-97ed-b2d5ef4dbf29@default>
User-agent: mu4e 0.9.18; emacs 25.3.1
From: Pierre Neidhardt <ambrevar@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#29110: 25.2; Should push-mark allow duplicates?
In-reply-to: <290699e2-2140-4091-97ed-b2d5ef4dbf29@default>
Date: Sun, 05 Nov 2017 15:59:11 +0100
Message-ID: <87ineoojpc.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.8 (--)
X-Debbugs-Envelope-To: 29110
Cc: 29110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.8 (--)


>> Maybe the problem is that I see marks as "bookmarked
>> position in text", and in this case it makes little
>> sense to have a bookmark order.
>
> I too see them that way.  And there is every reason
> to have a bookmark order - that can be very useful.

I'm still skeptical about that one.  That being said, that's not a
reason to remove the feature, you are right.

Enough bike-shedding :)

--
Pierre Neidhardt

To err is human -- to blame it on a computer is even more so.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29110; Package emacs. Full text available.

Message received at 29110 <at> debbugs.gnu.org:


Received: (at 29110) by debbugs.gnu.org; 2 Nov 2017 13:34:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 02 09:34:46 2017
Received: from localhost ([127.0.0.1]:47020 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eAFdt-0003gw-Qq
	for submit <at> debbugs.gnu.org; Thu, 02 Nov 2017 09:34:46 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:46012)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1eAFds-0003gj-34
 for 29110 <at> debbugs.gnu.org; Thu, 02 Nov 2017 09:34:44 -0400
Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 vA2DYbss013810
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 2 Nov 2017 13:34:37 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vA2DYa5w028425
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 2 Nov 2017 13:34:37 GMT
Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16])
 by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vA2DYaXa004984;
 Thu, 2 Nov 2017 13:34:36 GMT
MIME-Version: 1.0
Message-ID: <290699e2-2140-4091-97ed-b2d5ef4dbf29@default>
Date: Thu, 2 Nov 2017 06:34:35 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Pierre Neidhardt <ambrevar@HIDDEN>
Subject: RE: bug#29110: 25.2; Should push-mark allow duplicates?
References: <87h8udiqv3.fsf@HIDDEN>
 <de246820-57f4-4794-84a3-2342cd550fe2@default> <87fu9xioo6.fsf@HIDDEN>
 <4c91d163-4d9b-4b0f-9592-264048dc77e5@default> <87efphi3oo.fsf@HIDDEN>
In-Reply-To: <87efphi3oo.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4600.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: userv0022.oracle.com [156.151.31.74]
X-Spam-Score: -5.1 (-----)
X-Debbugs-Envelope-To: 29110
Cc: 29110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.1 (-----)

> > What part of "visiting them in order" wasn't clear?
>=20
> Why visiting in order?

Why not?  You asked for a possible use case.  To me that
is one.  You mark spots to visit, then you cycle among
them.  The order of marking determines the (default)
order of cycling.  Duplicates determine when and how
often you visit a particular node in the cycle.

The point is this: If Emacs automatically always removes
duplicates then, well, you cannot take advantage of
anything that duplicates can give you.  But if Emacs
does not remove duplicates then you can - and you can
always remove/prevent duplicates.

A sequence with duplicates gives you more possibilities
than a sequence without duplicates, simply because you
can always remove duplicates but you cannot easily add
them.  That is, you cannot add them if Emacs keeps
automatically removing/preventing them.  Why impose that?

> I understand why rings should preserve the order in general, but what is
> the user's intention when visiting marks in order?  Why does order
> matter in this specific case?  Why going A-B-A?

T-U-V-a-B-C-D-a-E-F-G-H-I lets you visit `a' more
easily, more often, and quicker.  Whatever.  Whatever
use someone or some code might put duplicates to.  Why
should Emacs prevent such a possibility out of the box,
especially since it is so easy for anyone or any code
to not allow duplicates.

> Maybe the problem is that I see marks as "bookmarked
> position in text", and in this case it makes little
> sense to have a bookmark order.

I too see them that way.  And there is every reason
to have a bookmark order - that can be very useful.

Multiple bookmarks in a buffer, in buffer order,
let you cycle among them in buffer order.  In alpha
order by, say, the thingie definitions that they
mark gives you alpha-order navigation.  Any number
of orders are possible.  Different orders for
different purposes and different users.

Isn't that what Helm & Ivy give you: easy ways to
navigate among the markers in different orders?
If they don't let you easily switch navigation
orders then they should (IMHO).  (In Icicles, at
lease, it it is simple and immediate to change to
a different order.)

_Cycling_ navigation is in fact largely about
_order_.  Put differently: order makes a big
difference if you need to cycle to get to something.

Order can impose inconvenience.  Imagine cycling
through every name in the phone book (remember
phone books?), in alphabetic order starting at A,
just to get to the name Neidhardt.  Not fun,
especially if it is a large phone book.

That's why interfaces such as Icicles, Helm, etc.
also let you _filter_, to reduce the sequence to
cycle through.  And it's why they also let you
go _directly_ to a given element in the
navigation list, e.g., by name.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29110; Package emacs. Full text available.

Message received at 29110 <at> debbugs.gnu.org:


Received: (at 29110) by debbugs.gnu.org; 2 Nov 2017 06:43:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 02 02:43:36 2017
Received: from localhost ([127.0.0.1]:46766 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eA9Dz-0006U6-SW
	for submit <at> debbugs.gnu.org; Thu, 02 Nov 2017 02:43:36 -0400
Received: from mail-wr0-f180.google.com ([209.85.128.180]:46283)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ambrevar@HIDDEN>) id 1eA9Dy-0006Tq-2U
 for 29110 <at> debbugs.gnu.org; Thu, 02 Nov 2017 02:43:34 -0400
Received: by mail-wr0-f180.google.com with SMTP id l1so3990367wrc.3
 for <29110 <at> debbugs.gnu.org>; Wed, 01 Nov 2017 23:43:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=references:user-agent:from:to:cc:subject:in-reply-to:date
 :message-id:mime-version:content-transfer-encoding;
 bh=VCBsUhkeYN0/EEL1BSDm/FVVCxeQVE+TBvKYiEsW6y4=;
 b=E6ifRTqRO+fMRciw4sr+5ST4P7Ct7VF1d3A0oy0OeX+lF1NDo10/wvtayNDH2yxDD9
 kMYoowQnt1ayBozu8VN4e6/pUU1p3orh2JLzOYvFK0wsbDQuN6FQMBsyPpUiQCbVlq2X
 +Vk+bKcvesQgdWOv+PLRbScz+hYFCS2j3FwIM+s77kwEJ8DaHUCk2eu5WrrcmQha23mu
 ad4WdiShwqLk7AsVVS+XGH7AXEJMVq3uXDkdeCZt0GyLzSSnblYdqZeVrBoAAgc1w97v
 oaxWihznx4w5i6TEywbG390SHZ5d3HIzplHEmV4KeEWbmBCf7UEwnb2nANtb+pQd2dWu
 pWkA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:references:user-agent:from:to:cc:subject
 :in-reply-to:date:message-id:mime-version:content-transfer-encoding;
 bh=VCBsUhkeYN0/EEL1BSDm/FVVCxeQVE+TBvKYiEsW6y4=;
 b=NKVlTQA97/5/hhoHtuJDjekZiV9oEjPiQKCMZvtz4bl7DupudSjxgwcpkUWjbRzn07
 BA9JHWq+gd9vWEGxMxvNGWeUWIXOAjXUOGhG9zaP2X9apdAJqgKSXObYEePRZvXyd8c3
 upMNF3a9fYIbZsmrpjySv6sMrFyg963l2uPIMeHx3YTS6a6+ynl3BvhJU7mU8h2V6vc3
 AVK3t7w7SGpF2x4GcCofzVvYbvuKxrPQGi5hKZMUNp2BTgeEq5Y5gv3UYQinhPrjVG89
 wYQjIn8RiinrVlEQzKO/xKO7P7lZ6L3mZxFsv/45HCKCf6VEls3n211Wt2Pyt4IBKLdW
 +mPA==
X-Gm-Message-State: AMCzsaV0/8JeEFhRKIs0SrIDFgoWBWELzKFD47LzoDc943iLJNOkEw3x
 zfHCzKZMj6eERY7mgXrIZaJr2BeD
X-Google-Smtp-Source: ABhQp+QsNhdD1Nrq5pN2AuswljSVhqlCYXgJapZoHqXPkvb0oiVm0bVxMyzQlojdFdYDfn4P5VboIw==
X-Received: by 10.223.170.67 with SMTP id q3mr1622588wrd.193.1509605007779;
 Wed, 01 Nov 2017 23:43:27 -0700 (PDT)
Received: from dhiov23k ([197.3.194.77])
 by smtp.gmail.com with ESMTPSA id 141sm3355787wmr.45.2017.11.01.23.43.26
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 01 Nov 2017 23:43:27 -0700 (PDT)
References: <87h8udiqv3.fsf@HIDDEN>
 <de246820-57f4-4794-84a3-2342cd550fe2@default> <87fu9xioo6.fsf@HIDDEN>
 <8760ata86n.fsf@HIDDEN>
User-agent: mu4e 0.9.18; emacs 25.2.1
From: Pierre Neidhardt <ambrevar@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Subject: Re: bug#29110: 25.2; Should push-mark allow duplicates?
In-reply-to: <8760ata86n.fsf@HIDDEN>
Date: Thu, 02 Nov 2017 07:43:25 +0100
Message-ID: <87d151i3jm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 29110
Cc: 29110 <at> debbugs.gnu.org, Drew Adams <drew.adams@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


> Consider this:
>
>     mark-ring-max is a variable defined in ‘simple.el’.
>     Its value is 16
>
>     Documentation:
>     Maximum size of mark ring.  Start discarding off end if gets this big.
>
>     You can customize this variable.
>
> global-mark-ring-max is the same idea.

Damn, I had no clue about that one.  Thank you for shattering my
ignorant concern to pieces! :D

That being said, it raises another problem (sorry for being so
annoying): if we have a limit _and_ we allow duplicates, it means that a
lot of duplicates will discard old entries more quickly.

> One thing to note is that push-mark resets markers before discarding
> (so that they no longer point to any buffer).

Thanks a lot, that's an excellent lead.  Indeed, that might be the root
of the issue.  We will investigate further.

Thanks for all!

--
Pierre Neidhardt

Here is a test to find whether your mission on earth is finished:
if you're alive, it isn't.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29110; Package emacs. Full text available.

Message received at 29110 <at> debbugs.gnu.org:


Received: (at 29110) by debbugs.gnu.org; 2 Nov 2017 06:40:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 02 02:40:34 2017
Received: from localhost ([127.0.0.1]:46760 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eA9B4-0006PJ-Ez
	for submit <at> debbugs.gnu.org; Thu, 02 Nov 2017 02:40:34 -0400
Received: from mail-wm0-f47.google.com ([74.125.82.47]:52207)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ambrevar@HIDDEN>) id 1eA9B2-0006P6-CY
 for 29110 <at> debbugs.gnu.org; Thu, 02 Nov 2017 02:40:32 -0400
Received: by mail-wm0-f47.google.com with SMTP id b9so8957330wmh.0
 for <29110 <at> debbugs.gnu.org>; Wed, 01 Nov 2017 23:40:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=references:user-agent:from:to:cc:subject:in-reply-to:date
 :message-id:mime-version;
 bh=GIGG0C+GqhS1imIo49NxJAnNCZFjk0mpCkDlxOQTZqQ=;
 b=GE9gtev32d4xoayO78pL/1ZZNIHGplwYjz1xE3p/q9/3rhcbc+0Uacowj3lxj6MZR5
 QIrdQIZXk1ErZGwzpoaUyBOrQg6CPrJ4J0iZtBZD++Odh3gGZuBj/ZE7Sj/b6VG1YH5r
 C2qXq98ILt4VqRUQMr4driwk7bv2exkHHWVX3h6QJ2BCguoRP0lUPC1BmVE5EcqimFWK
 jk6W0TSMq6FDeL+KqJ+3ifldhD2n6t+tpGVemc7obYeAXrZEB9erv8Tx3j9xzGs8Kq8f
 de3RKwOFf8iQL+6u3rbHSVCKuuwufnpXe6PDdzAHmVNEjEZ1eBEelG33ESOKe3z7d37M
 T/bw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:references:user-agent:from:to:cc:subject
 :in-reply-to:date:message-id:mime-version;
 bh=GIGG0C+GqhS1imIo49NxJAnNCZFjk0mpCkDlxOQTZqQ=;
 b=tREmTiUyagk98MKBSuNm7l/typU5fUUnPi0K63UdJwOK2PE92VOZJrQoBR6Ed3luXz
 xXlnZX2Tgf8W93bT6ydvl0kFCxbiwgRHIWqsn0l954xawpDHuBADC5uKegwxx/kmZyef
 t7w60day3pyHMXIgC/CEddQqskDR3+H+nvobraJoXBTRlc5iD6p+9jYzEyCh//tOkziX
 HtWQ+ka+OykzWu6wxhXm7K8HoOzTNq5PyvVWyBMft4PIU1g87A9bpg17pdgiiFScfktn
 6tpt856ILnqA/fvaxfXOKWWrIG3v/cwH6HgmcfW5xfw8Mk3KEwbd3nSOvj9Nllvl1d6o
 KVJA==
X-Gm-Message-State: AMCzsaVJmrXK2xsfiv4q50xCT2TwtCoRvprrc536h8opvdm3SSJTU0ue
 /z3JFDuKlG5cMOMQJJTFxM5r8j36
X-Google-Smtp-Source: ABhQp+QF8gioo5U0ohYLebALeDGqgR7IatSl5hUAI+PXYMyPzHIxIAcjgRQ96lKNOS2dBAZdGwU+sw==
X-Received: by 10.28.241.10 with SMTP id p10mr546949wmh.113.1509604826142;
 Wed, 01 Nov 2017 23:40:26 -0700 (PDT)
Received: from dhiov23k ([197.3.194.77])
 by smtp.gmail.com with ESMTPSA id l96sm3811625wrc.21.2017.11.01.23.40.24
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 01 Nov 2017 23:40:25 -0700 (PDT)
References: <87h8udiqv3.fsf@HIDDEN>
 <de246820-57f4-4794-84a3-2342cd550fe2@default> <87fu9xioo6.fsf@HIDDEN>
 <4c91d163-4d9b-4b0f-9592-264048dc77e5@default>
User-agent: mu4e 0.9.18; emacs 25.2.1
From: Pierre Neidhardt <ambrevar@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#29110: 25.2; Should push-mark allow duplicates?
In-reply-to: <4c91d163-4d9b-4b0f-9592-264048dc77e5@default>
Date: Thu, 02 Nov 2017 07:40:23 +0100
Message-ID: <87efphi3oo.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 29110
Cc: 29110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)


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

Why visiting in order?
I understand why rings should preserve the order in general, but what is
the user's intention when visiting marks in order?  Why does order
matter in this specific case?  Why going A-B-A?

Maybe the problem is that I see marks as "bookmarked position in text", and in
this case it makes little sense to have a bookmark order.

-- 
Pierre Neidhardt

Preserve Wildlife!  Throw a party today!




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29110; Package emacs. Full text available.

Message received at 29110 <at> debbugs.gnu.org:


Received: (at 29110) by debbugs.gnu.org; 2 Nov 2017 00:53:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 01 20:53:54 2017
Received: from localhost ([127.0.0.1]:46627 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eA3la-0006GH-7w
	for submit <at> debbugs.gnu.org; Wed, 01 Nov 2017 20:53:54 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:49288)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1eA3lY-0006G3-OM
 for 29110 <at> debbugs.gnu.org; Wed, 01 Nov 2017 20:53:53 -0400
Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 vA20rkAI005709
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 2 Nov 2017 00:53:46 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id vA20rjSA008326
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 2 Nov 2017 00:53:46 GMT
Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16])
 by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vA20rjeX018361;
 Thu, 2 Nov 2017 00:53:45 GMT
MIME-Version: 1.0
Message-ID: <4c91d163-4d9b-4b0f-9592-264048dc77e5@default>
Date: Wed, 1 Nov 2017 17:53:44 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Pierre Neidhardt <ambrevar@HIDDEN>
Subject: RE: bug#29110: 25.2; Should push-mark allow duplicates?
References: <87h8udiqv3.fsf@HIDDEN>
 <de246820-57f4-4794-84a3-2342cd550fe2@default> <87fu9xioo6.fsf@HIDDEN>
In-Reply-To: <87fu9xioo6.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4600.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: userv0021.oracle.com [156.151.31.71]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 29110
Cc: 29110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> I understand there might be some use cases, I just don't see which one.
>=20
> > 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.
>=20
> Hmm, I'm tempted to say "bof" too here :)  You are not saying=20
>_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?
>=20
> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29110; Package emacs. Full text available.

Message received at 29110 <at> debbugs.gnu.org:


Received: (at 29110) by debbugs.gnu.org; 1 Nov 2017 23:30:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 01 19:30:36 2017
Received: from localhost ([127.0.0.1]:46594 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eA2Sw-0002ta-GT
	for submit <at> debbugs.gnu.org; Wed, 01 Nov 2017 19:30:36 -0400
Received: from mail-io0-f178.google.com ([209.85.223.178]:54627)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1eA2Su-0002m2-T9
 for 29110 <at> debbugs.gnu.org; Wed, 01 Nov 2017 19:30:33 -0400
Received: by mail-io0-f178.google.com with SMTP id e89so9786785ioi.11
 for <29110 <at> debbugs.gnu.org>; Wed, 01 Nov 2017 16:30:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=KozKx+oEk7sPGQ7+AqXrt2aQwmdLudXhADwxGEEO+5I=;
 b=bV8BmyuvY+Skb2HPZgjUP70ELe2pYMWU9cLqH8rjyTAxhjl7v6r196X57EIkHsLQ4C
 uWnYyPpjoKecM4dnlnELpeErh2T103mR67n7XHy+knNxYg2QraYew12B4eq6l5fhlrmE
 7QcrLX3tsqoumV+SuDvKWGUW57hzduGhaTNxgWnZC8E3p/tQ79X0RH1vNLQW5GFOVZHY
 1SM9YBhvBww5w34qafJ9FCzMYzgOwAfjZh4UN4E6r3wJRDwYPZxynxr4cpYzzpHr+PP1
 IKZ60ccF4e6cJWE/4fa+l3HexR5VS+9m1XGEjpsdD1c2VoGZ9UdmXXqprH/0pq/MAzGc
 Rl/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version
 :content-transfer-encoding;
 bh=KozKx+oEk7sPGQ7+AqXrt2aQwmdLudXhADwxGEEO+5I=;
 b=JWe/wBGazBBA+mQF0wYENk5/9RkJ8fqLbUR1k8MbZqQrjKh5XUe1LEhK+mhZ2taYW+
 X6GCReHqxk2jLEdE8nGdgGOz4g+p95Hqri3iCNZIYuYh7Y2XSW95LhcrGVbX1qXHfwcb
 N3rZvwqhw0mvUCva+jVxkVYbMeFYC11jTal6FYuWoP0L6e4tielHJ9QPeHcxxOtOYUul
 gna3A2nbdQ1/ywgujRzdljDJQjtu0cjZP2I2bEhDceenEzsRoECaBifkpJ/6tiQUKt36
 upMQbZ0tb5LA8Fc8oK1TkThMiHtSz7/EGKP14WF/BLwHP/uIen3E0IAYDhYPOs/cTs77
 MDLQ==
X-Gm-Message-State: AMCzsaX9zSaVA7I5jvR1xYGmlT/iNobnmGKgbSgdA+8Sh/uljt+o/ySl
 aDskIkJM1oTh4DVsCR4tnkeguw==
X-Google-Smtp-Source: ABhQp+TT5RJ9VG+GT4vWD/ugGxc+QOAndJWzQ8WttJWIxV32/A2WQOv7wf5MGS2/wRp0ZgqP+lcmbA==
X-Received: by 10.36.141.65 with SMTP id w62mr44548itd.152.1509579026927;
 Wed, 01 Nov 2017 16:30:26 -0700 (PDT)
Received: from zebian ([45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id q191sm217649itb.1.2017.11.01.16.30.25
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 01 Nov 2017 16:30:26 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: Pierre Neidhardt <ambrevar@HIDDEN>
Subject: Re: bug#29110: 25.2; Should push-mark allow duplicates?
References: <87h8udiqv3.fsf@HIDDEN>
 <de246820-57f4-4794-84a3-2342cd550fe2@default> <87fu9xioo6.fsf@HIDDEN>
Date: Wed, 01 Nov 2017 19:30:24 -0400
In-Reply-To: <87fu9xioo6.fsf@HIDDEN> (Pierre Neidhardt's message of "Thu,
 02 Nov 2017 00:07:05 +0100")
Message-ID: <8760ata86n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.1 (--)
X-Debbugs-Envelope-To: 29110
Cc: 29110 <at> debbugs.gnu.org, Drew Adams <drew.adams@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

Pierre Neidhardt <ambrevar@HIDDEN> writes:

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

Consider this:

    mark-ring-max is a variable defined in =E2=80=98simple.el=E2=80=99.
    Its value is 16

    Documentation:
    Maximum size of mark ring.  Start discarding off end if gets this big.

    You can customize this variable.

global-mark-ring-max is the same idea.

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

Both threads seem pretty hard to follow.  One thing to note is that
push-mark resets markers before discarding (so that they no longer point
to any buffer).  Maybe Helm or Evil keep another reference to a
discarded marker, and try to use it without checking?  If you have a way
to reproduce the problem, you can check if bumping up mark-ring-max to a
very large number has any effect.

    (defun push-mark (&optional location nomsg activate)
       ...
        (when (> (length mark-ring) mark-ring-max)
          (move-marker (car (nthcdr mark-ring-max mark-ring)) nil)
          (setcdr (nthcdr (1- mark-ring-max) mark-ring) nil)))
       ...
        (when (> (length global-mark-ring) global-mark-ring-max)
          (move-marker (car (nthcdr global-mark-ring-max global-mark-ring))=
 nil)
          (setcdr (nthcdr (1- global-mark-ring-max) global-mark-ring) nil)))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29110; Package emacs. Full text available.

Message received at 29110 <at> debbugs.gnu.org:


Received: (at 29110) by debbugs.gnu.org; 1 Nov 2017 23:07:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 01 19:07:17 2017
Received: from localhost ([127.0.0.1]:46569 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eA26P-0008Iz-Jt
	for submit <at> debbugs.gnu.org; Wed, 01 Nov 2017 19:07:17 -0400
Received: from mail-wr0-f182.google.com ([209.85.128.182]:48787)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ambrevar@HIDDEN>) id 1eA26M-0008Ik-Ev
 for 29110 <at> debbugs.gnu.org; Wed, 01 Nov 2017 19:07:14 -0400
Received: by mail-wr0-f182.google.com with SMTP id 15so3325056wrb.5
 for <29110 <at> debbugs.gnu.org>; Wed, 01 Nov 2017 16:07:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=references:user-agent:from:to:cc:subject:in-reply-to:date
 :message-id:mime-version;
 bh=YMYIiSdsiDi6U3W1FoCK3zTTjMWfNNJG7V3qYtuZedA=;
 b=LV8PGSUBa0bx1x2Bo4UTabsTXAko1y9KunuMY9buY83mNIiMKwkvnAaQEmP8ZtzKKm
 dqyY6tlZAIYnQsomfTOCAhx/QQoVl0vKh8HWaJVrQ0ByWdrqljpMGCgC+CS4rGK6IXAc
 OvY2hlEVRVWWq2P62t1WxDuv/vav50FzxCkMY0XLl9TNQ0vG5KIkgfq2YMy8GmMuCv80
 UIrktlcBsWTDvcn0WLMrF20lJazNDuTKTK7DdDawXEE+anTmG4m8zePVyHlxZkNpYKhs
 OGG0AWsqXrmYJvHEgEbMrj/sSoiOygSVTxqzkyTYsujBflKnQ7zFxsHctv8L7MxDTbsk
 wzrg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:references:user-agent:from:to:cc:subject
 :in-reply-to:date:message-id:mime-version;
 bh=YMYIiSdsiDi6U3W1FoCK3zTTjMWfNNJG7V3qYtuZedA=;
 b=aJe51fc0w5mNOtuYgMJcpouX9vVqOGhmB1GTlqkn61L2VXO8Ls0wwbciIAebIYQtoj
 HDWXLK6HMoDu/4zpMiWs9Q9ZYGytZ+WPZIqFky2hDm1xvK809v01051AVYxoFz3dRJxQ
 z2Nq5Vi8AR4BeXph+tOkeyG0PBTk5jPvD/6EDnoYd4K3M5y9SDcTI/WQRqSVD5KRXWvw
 va8o3o+LfGaxrebpBpBAUR5nQzgoQyK0yRmSlxJ3LQHc+c/aI2PLlfZI9mfxs0Q98Wdk
 /WgHAZ2IXBfXVY4J9b3Vo5gtTPoaYgpOcvtNt1Zs5SEiyGFUmnOLrtTxjKq3isJacpZq
 pPAg==
X-Gm-Message-State: AMCzsaVUEO0NQakgC60rs5DdYO0lEuyvdhTrWnQUDIJLGym60Sf6wdez
 U8ugw2fH0NXwLLLbfBHsoDEGzyIP
X-Google-Smtp-Source: ABhQp+Twr79Afqqhmj7upOAAcmrMuVY0Mho6h65jp/pjWyKWZG5J1Q7foSY197/7F8FF88J9kdzWaQ==
X-Received: by 10.223.161.158 with SMTP id u30mr987950wru.199.1509577628372;
 Wed, 01 Nov 2017 16:07:08 -0700 (PDT)
Received: from dhiov23k ([41.230.116.46])
 by smtp.gmail.com with ESMTPSA id v76sm1490410wmd.35.2017.11.01.16.07.07
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 01 Nov 2017 16:07:07 -0700 (PDT)
References: <87h8udiqv3.fsf@HIDDEN>
 <de246820-57f4-4794-84a3-2342cd550fe2@default>
User-agent: mu4e 0.9.18; emacs 25.2.1
From: Pierre Neidhardt <ambrevar@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#29110: 25.2; Should push-mark allow duplicates?
In-reply-to: <de246820-57f4-4794-84a3-2342cd550fe2@default>
Date: Thu, 02 Nov 2017 00:07:05 +0100
Message-ID: <87fu9xioo6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 29110
Cc: 29110 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29110; Package emacs. Full text available.

Message received at 29110 <at> debbugs.gnu.org:


Received: (at 29110) by debbugs.gnu.org; 1 Nov 2017 22:43:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 01 18:43:27 2017
Received: from localhost ([127.0.0.1]:46559 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eA1jL-0005qd-DG
	for submit <at> debbugs.gnu.org; Wed, 01 Nov 2017 18:43:27 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:46859)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1eA1jI-0005qM-AY
 for 29110 <at> debbugs.gnu.org; Wed, 01 Nov 2017 18:43:24 -0400
Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 vA1MhGGp027540
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 1 Nov 2017 22:43:17 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vA1MhFBX026751
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 1 Nov 2017 22:43:16 GMT
Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20])
 by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id vA1MhFob017077;
 Wed, 1 Nov 2017 22:43:15 GMT
MIME-Version: 1.0
Message-ID: <de246820-57f4-4794-84a3-2342cd550fe2@default>
Date: Wed, 1 Nov 2017 15:43:14 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Pierre Neidhardt <ambrevar@HIDDEN>, 29110 <at> debbugs.gnu.org
Subject: RE: bug#29110: 25.2; Should push-mark allow duplicates?
References: <87h8udiqv3.fsf@HIDDEN>
In-Reply-To: <87h8udiqv3.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4600.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: userv0022.oracle.com [156.151.31.74]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 29110
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> The `push-mark' function allows for duplicate marks.  I fail to see a
> use case, but otherwise I think it's rather inconvenient:

It's not necessarily inconvenient for everyone or every use case.

If you or Helm or whatever wants to remove duplicates you can
always do so.  You can also prevent a duplicate from being
added.  And you can choose whether pushing what would otherwise
become a duplicate should remove an "older" duplicate member or
prevent the "newer" potentially duplicate member.  There are
lots of possibilities.

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.

I, like you apparently, use an interface that lets me cycle
among marks in various ways (various orders), cycle among
various subsets of the available marks (filtering), or access
marks directly.  And with the interface I use (Icicles) I
can choose to remove duplicates, in general.  (And the default
command that moves among markers does remove duplicates.)

But I can imagine other interfaces and other use cases.

I think this kind of choice should be up to the user or the
interface author.  Helm can decide to remove/prevent duplicates,
or you can as one user.  I don't see why Emacs itself should.
(Just one opinion, though.)

> - It makes traversing the ring tedious with respect to end-user
> interaction.  (Think Ivy / Helm for the mark ring.)
> Duplicates are probably not the expected behaviour for the end-user.

It depends on the interface, the user, and the use case.

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

> - It eats up more memory.

Seriously?  Bof.

> - It's counter-intuitive to developers who may in turn write code
> without being careful that rings may contain duplicates.  This may
> result in unexpected behaviour.

Bof.  Developers should get beyond depending on any such naive
"intuition".

> I got bitten hard by this

And now you know. ;-)

> We could not find out the root of the issue, but we discovered that
> advising `push-mark' so that it does not duplicate marks would do it.  I
> know it's not a solution per se, but at least we've got a lead.

It's a fine individual solution, IMO, if you never want duplicates.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#29110; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 Nov 2017 22:20:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 01 18:20:05 2017
Received: from localhost ([127.0.0.1]:46546 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eA1Mi-0005GA-Qs
	for submit <at> debbugs.gnu.org; Wed, 01 Nov 2017 18:20:05 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48041)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ambrevar@HIDDEN>) id 1eA1Me-0005FW-Q6
 for submit <at> debbugs.gnu.org; Wed, 01 Nov 2017 18:20:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ambrevar@HIDDEN>) id 1eA1MX-0004Bm-LE
 for submit <at> debbugs.gnu.org; Wed, 01 Nov 2017 18:19:54 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:37337)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <ambrevar@HIDDEN>) id 1eA1MX-0004Bb-G5
 for submit <at> debbugs.gnu.org; Wed, 01 Nov 2017 18:19:53 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39008)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <ambrevar@HIDDEN>) id 1eA1MW-0007xM-8Z
 for bug-gnu-emacs@HIDDEN; Wed, 01 Nov 2017 18:19:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ambrevar@HIDDEN>) id 1eA1MT-000494-4F
 for bug-gnu-emacs@HIDDEN; Wed, 01 Nov 2017 18:19:52 -0400
Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:56314)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <ambrevar@HIDDEN>) id 1eA1MS-00048Q-UG
 for bug-gnu-emacs@HIDDEN; Wed, 01 Nov 2017 18:19:49 -0400
Received: by mail-wm0-x233.google.com with SMTP id y83so7522372wmc.4
 for <bug-gnu-emacs@HIDDEN>; Wed, 01 Nov 2017 15:19:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=user-agent:from:to:subject:date:message-id:mime-version;
 bh=1DOqmwotu53MjePNV5MqWKvk+MU1A4tBKsA7hzByPE0=;
 b=sM/08B3TqUk1gpFZNmy72ZIbrLn3P24mjPVB1um2e0pe8h7o1PSWspz+bQaXrWMC+p
 ikJMLIF01Zeo197W1ThZ9R4B+H2xMZ8vFT3rklypqmrYcuKp2POszykqu8fcssjWX0sf
 heTZV0ptjIl+SOYKGnz39qo5fJYrhZeO8oQrlyIbdAJKq08C6MKprCiJ7NHuXexLudDP
 BLdXZCtEv1FwcUbcJsN1cRchvI7rDFejn9rjCsRkdGVxqh8GcY/PnBorZH99SLtO1nwV
 JuUR7f30Hx5wW5ugk2yLfYkiCQEGybdj/PzLYRW05LhNxkWRm5fgDGfqdnYTJxOHUb1c
 h+dQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:user-agent:from:to:subject:date:message-id
 :mime-version;
 bh=1DOqmwotu53MjePNV5MqWKvk+MU1A4tBKsA7hzByPE0=;
 b=hJ6T3JoF7JVkRpejrncdtVzLzOF40e/N7BML27pFllAuUh3XhQfEc5XyJ9s6oVehFH
 20RAK8E7Qe7ZvOTR4lVTQO6ZLtHrKQ4qM+CBYZjC/JrRnQqFl0xErQ7kq52WAOHnZExH
 bleMGlGUZXdlNHyq1QrgH4dPbewUFfboLe1hIliJLkjZOTLAZwklpzxDaQLCiMzrvakk
 72hqUaT/8r0xITkYjGWXRdMKLqCbdEU5JKA7WG4UHCm1qv4okDOUVZoMGCk8Gcve5nP5
 W+t5Q4Kbv9H7mDs3C7n7UPk15PKz5ji6DP3jSQBTBFMXIu0QaB5XTqhH/G/f9SoH9+Gd
 TKbw==
X-Gm-Message-State: AMCzsaUMewbOY3+leGxDr/n9SJZrc0g5EX/MPccc1hKa7b7AprIxDP/z
 QYpqYb6WM7xPycgvjX2uWVE5hw==
X-Google-Smtp-Source: ABhQp+SUqP/MezwZitD/MXRS3lUK0bCMkyS2+4lqg8jw6c7xRay0EuGDp3pHW05b17+H/i1alolHTA==
X-Received: by 10.28.98.212 with SMTP id w203mr1457465wmb.88.1509574787389;
 Wed, 01 Nov 2017 15:19:47 -0700 (PDT)
Received: from dhiov23k ([41.230.116.46])
 by smtp.gmail.com with ESMTPSA id 80sm2439637wmk.14.2017.11.01.15.19.46
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 01 Nov 2017 15:19:46 -0700 (PDT)
User-agent: mu4e 0.9.18; emacs 25.2.1
From: Pierre Neidhardt <ambrevar@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.2; Should push-mark allow duplicates?
Date: Wed, 01 Nov 2017 23:19:44 +0100
Message-ID: <87h8udiqv3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)


The `push-mark' function allows for duplicate marks.  I fail to see a
use case, but otherwise I think it's rather inconvenient:

- It makes traversing the ring tedious with respect to end-user
interaction.  (Think Ivy / Helm for the mark ring.)
Duplicates are probably not the expected behaviour for the end-user.

- Functions working with rings will probably want to remove the
duplicates, so they end up calling `remove' and the like over and over
again.

- It eats up more memory.

- It's counter-intuitive to developers who may in turn write code
without being careful that rings may contain duplicates.  This may
result in unexpected behaviour.


I got bitten hard by this while trying to figure out why
`helm-mark-ring` would randomly fail to follow the marks when Evil mode
was `require'd (not even turned on).

I reported the issues on both bug trackers:

- https://github.com/emacs-evil/evil/issues/845

- https://github.com/emacs-helm/helm/issues/1891

We could not find out the root of the issue, but we discovered that
advising `push-mark' so that it does not duplicate marks would do it.  I
know it's not a solution per se, but at least we've got a lead.

To reproduce, start emacs -Q and use "C-SPC C-SPC" a few times at
different spots.  Then move point somewhere and eval:

	(set-marker (mark-marker) (point))
	(push-mark)
	mark-ring

You should now have one duplicate in the ring.

Here is the proposed fix implemented in Helm:

https://github.com/emacs-helm/helm/commit/ffd2abf5c4bdfc998c09730387b11d2bf9ac1032




In GNU Emacs 25.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.16)
 of 2017-09-02 built on dhiov23k
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
System Description:	Gentoo Base System release 2.4.1

Configured using:
 'configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --disable-dependency-tracking
 --disable-silent-rules --docdir=/usr/share/doc/emacs-25.2
 --htmldir=/usr/share/doc/emacs-25.2/html --libdir=/usr/lib64
 --program-suffix=-emacs-25 --infodir=/usr/share/info/emacs-25
 --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --with-gameuser=:gamestat --without-compress-install
 --with-file-notification=inotify --enable-acl --without-dbus
 --without-modules --without-gpm --without-hesiod --without-kerberos
 --without-kerberos5 --with-xml2 --without-selinux --with-gnutls
 --without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns
 --without-gconf --without-gsettings --without-toolkit-scroll-bars
 --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm
 --with-imagemagick --with-xft --without-cairo --without-libotf
 --without-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets
 GENTOO_PACKAGE=app-editors/emacs-25.2 'CFLAGS=-march=ivybridge -O2
 -pipe' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND NOTIFY ACL GNUTLS LIBXML2
FREETYPE XFT ZLIB GTK3 X11

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Debbugs




Acknowledgement sent to Pierre Neidhardt <ambrevar@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#29110; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.