From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Pierre Neidhardt Newsgroups: gmane.emacs.bugs Subject: bug#29110: 25.2; Should push-mark allow duplicates? Date: Thu, 02 Nov 2017 00:07:05 +0100 Message-ID: <87fu9xioo6.fsf@gmail.com> References: <87h8udiqv3.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1509577692 15137 195.159.176.226 (1 Nov 2017 23:08:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 1 Nov 2017 23:08:12 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.2.1 Cc: 29110@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 02 00:08:08 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 1eA27B-0003Lu-9E for geb-bug-gnu-emacs@m.gmane.org; Thu, 02 Nov 2017 00:08:05 +0100 Original-Received: from localhost ([::1]:58011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eA27I-0006Pi-Ib for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Nov 2017 19:08:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eA27C-0006PQ-O9 for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2017 19:08:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eA278-0000HF-MQ for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2017 19:08:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37888) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eA278-0000H4-IM for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2017 19:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eA278-0008Jz-DN for bug-gnu-emacs@gnu.org; Wed, 01 Nov 2017 19:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Nov 2017 23:08: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.150957763731933 (code B ref 29110); Wed, 01 Nov 2017 23:08:02 +0000 Original-Received: (at 29110) by debbugs.gnu.org; 1 Nov 2017 23:07:17 +0000 Original-Received: from localhost ([127.0.0.1]:46569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eA26P-0008Iz-Jt for submit@debbugs.gnu.org; Wed, 01 Nov 2017 19:07:17 -0400 Original-Received: from mail-wr0-f182.google.com ([209.85.128.182]:48787) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eA26M-0008Ik-Ev for 29110@debbugs.gnu.org; Wed, 01 Nov 2017 19:07:14 -0400 Original-Received: by mail-wr0-f182.google.com with SMTP id 15so3325056wrb.5 for <29110@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) Original-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) In-reply-to: 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:139339 Archived-At: 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