From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#29110: 25.2; Should push-mark allow duplicates? Date: Wed, 1 Nov 2017 17:53:44 -0700 (PDT) Message-ID: <4c91d163-4d9b-4b0f-9592-264048dc77e5@default> References: <87h8udiqv3.fsf@gmail.com> <87fu9xioo6.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1509584071 28647 195.159.176.226 (2 Nov 2017 00:54:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Nov 2017 00:54:31 +0000 (UTC) Cc: 29110@debbugs.gnu.org To: Pierre Neidhardt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 02 01:54:24 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eA3ls-0005tY-MR for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Nov 2017 01:54:12 +0100 Original-Received: from localhost ([::1]:58232 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eA3m0-0005SP-13 for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Nov 2017 20:54:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eA3ll-0005SG-Sv for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2017 20:54:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eA3li-0007IG-QO for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2017 20:54:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37946) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eA3li-0007I7-N5 for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2017 20:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eA3li-0006Gi-Cv for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2017 20:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Nov 2017 00:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29110 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29110-submit@debbugs.gnu.org id=B29110.150958403424077 (code B ref 29110); Thu, 02 Nov 2017 00:54:02 +0000 Original-Received: (at 29110) by debbugs.gnu.org; 2 Nov 2017 00:53:54 +0000 Original-Received: from localhost ([127.0.0.1]:46627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eA3la-0006GH-7w for submit@debbugs.gnu.org; Wed, 01 Nov 2017 20:53:54 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:49288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eA3lY-0006G3-OM for 29110@debbugs.gnu.org; Wed, 01 Nov 2017 20:53:53 -0400 Original-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 Original-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 Original-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 In-Reply-To: <87fu9xioo6.fsf@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4600.0 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:139345 Archived-At: > 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.