From unknown Tue Jun 17 01:41:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44023: dired-allow-duplicate-buffers Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Oct 2020 19:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 44023@debbugs.gnu.org X-Debbugs-Original-To: Emacs Bug Reporting Received: via spool by submit@debbugs.gnu.org id=B.160278976726148 (code B ref -1); Thu, 15 Oct 2020 19:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Oct 2020 19:22:47 +0000 Received: from localhost ([127.0.0.1]:56607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kT8pq-0006ng-N0 for submit@debbugs.gnu.org; Thu, 15 Oct 2020 15:22:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:43228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kT8po-0006nY-Fb for submit@debbugs.gnu.org; Thu, 15 Oct 2020 15:22:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT8pn-0001J6-Fz for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2020 15:22:44 -0400 Received: from mout.gmx.net ([212.227.17.22]:43211) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT8ph-0003Ze-RM for bug-gnu-emacs@gnu.org; Thu, 15 Oct 2020 15:22:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1602789754; bh=/SJJnVZEy5RRIWKc56csu+wxNMnvC4MyH2vuiIAczGg=; h=X-UI-Sender-Class:Date:From:To:Subject; b=JAspH/DB2Fdcjn1donsSvYiqfAFkt0DsBsUsanCQlg1IqwhG7lph5ZhYD7XJwBcuP VRTBOlzHYD2hkQxMtwadtaAJr9pG62hBkqQPS8FXV59oHqJBgSEpxkK+sL1SEieRMA hJ57OR8BLBl5T2BmlI73FEicYzLLCtT9cSCnVQLU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from E15-2016.optimum.net ([72.89.170.172]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1N0XD2-1kGzlN45n2-00wUrX for ; Thu, 15 Oct 2020 21:22:34 +0200 Date: Thu, 15 Oct 2020 15:22:31 -0400 From: Boruch Baum Message-ID: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="msxhrqipppmkva3s" Content-Disposition: inline User-Agent: NeoMutt/20180716 X-Provags-ID: V03:K1:c+GDlkmTijU7Xy4gbBe21iABJGeGt3VRZYQzzcKEbz/ePdWYvU6 cEA6AgwdSeB8eunnLnPRbNK/tgu9IBq9n9IXEGt/U92rXM6OOlcD3YSgGVGRfSggBQIh3R9 gRfyeyiFKby647cIdRGGNoHMWQcCi1t39Pd15erfrjUtl1hGji/E551HxctN5kaZZ5lNx3P ab6GAtlmiUNpG3EBD2iqA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Ud0RRKRQEAY=:WIuzdZL/kEVsz08/8+ShxF dblNn0HN14hZNumw/wm8FAp3Fea811+zb0Vv//BOZRk4SfSvyXtCAfZd/h/naV71l/Mtdk7tD ETFyMHK847fxaH+VlNfRO4Pe4lsdkFnxflyqyU4uIcNekZWWHFnJObGuCiOLUk2e35/upSdag sOznSlNQZYJ//Jj54zmPoXHaNgqt2n2yVGnOXQvjr46ZfbfT/uOnmDeaVV9vzY2aBlhIo5oTc Vs9TlilGF2ERDXyX+PjXBjfmLxJweRUZrGPjLqiTTyK4QmD4RjcAxWvaj1AbX2virIlv1Uujc vsmK1qVBOeDWZhnJsdaSz74DnS/fnQNEnUY2++79A2X2bAyfWWmqxsnZ7GwN/bfjJ8feGiRoF UkoS4u5CChl7pB3DMFZfvljiUkptMW9yxDtfA73k/ALkp98jfpRNl5ozRV0TStgHg+Uf1KaZZ cbGLvp5sPhqyoz86paKrNLaBzUXF4QIO0DIJgw1WNa1BPIjSbd8h4RIiRZFphqPA/7fgXooft 0Z3622bYb/BfEHc69AUu/8QSjcanCYfhXd9gKniS1eafZzrcmZnWISej1GPbY8BVBrNLLt14F ibsID9wSE/tl0DxrbgGqYonG63UZUzLVGOigiSjebXwlyqkjl9JXGGK+H7HujiUuX4xun1l2l 95dLwPy1jW/o9kxIfpY37dV8VFi8Dtdj91UjbxeCcylDP57Ly0E4O7OtBRt+gCjD0ZnSMZ12h q4x9Z2yOTqiCcw5fv/AoHJqjHT0hoDgrtDP3692kDmPkuUzjVSfbU7NNvh/utcMZe1cSs6oCi Uiz3BrIcOwU95yPHA9A5USUTnyymiiCy9w0omp1qmFfnjscBMqUDuM1pPbOhEE+DX5lEXlick epU55m+ASIDCViNT4uHw== Received-SPF: pass client-ip=212.227.17.22; envelope-from=boruch_baum@gmx.com; helo=mout.gmx.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 14:57:52 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --msxhrqipppmkva3s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The attached patch adds a defcustom option to allow multiple buffers to visit the same directory. This became desirable to me for an extension I wrote (soon to be submitted) to store each chain of dired buffers' 'navigation history' and allow going back/forward to any point in the history. As you all know, this has been a feature common to all file *managers* since almost forever; technically dired is a directory editor, not a file manager, but I expect many will find the feature desirable, even expected, since all other similar programs have it. In going through the existing dired code, it seems that some functions presume that multiple buffers can be visiting the same directory. See: dired-find-buffer-nocreate dired-fun-in-all-buffers dired-clean-up-after-deletion Also, implicit in the comment for `dired-find-buffer-nocreate' is that more than one match may exist for a dired directory buffer. So, maybe this once existed or was planned? The first patch is for the option. The second patch is a change of comments to docstrings. =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 --msxhrqipppmkva3s Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="1.patch" Content-Transfer-Encoding: quoted-printable diff --git a/NEWS b/NEWS index a76447d..ca7f31b 100644 =2D-- a/NEWS +++ b/NEWS @@ -284,6 +284,10 @@ time zones will use a form like "+0100" instead of "C= ET". ** Dired ++++ +*** New user option: 'dired-allow-duplicate-buffers' +If set, allows multiple dired buffers to visit the same directory. + --- *** Broken and circular links are shown with the 'dired-broken-symlink' f= ace. diff --git a/dired.el b/dired.el index 7839ace..36c2f17 100644 =2D-- a/dired.el +++ b/dired.el @@ -353,6 +353,12 @@ is anywhere on its Dired line, except the beginning o= f the line." :group 'dired :version "28.1") +(defcustom dired-allow-duplicate-buffers t + "Allow multiple `dired' buffers to visit the same directory." + :type 'boolean + :group 'dired + :version "28.1") + ;; Internal variables (defvar dired-marker-char ?* ; the answer is 42 @@ -1152,9 +1158,11 @@ The return value is the target column for the file = names." ;; see there. (let* ((old-buf (current-buffer)) (dirname (if (consp dir-or-list) (car dir-or-list) dir-or-list)) - ;; Look for an existing buffer. - (buffer (dired-find-buffer-nocreate dirname mode)) - ;; Note that buffer already is in dired-mode, if found. + (buffer (when (not (bound-and-true-p dired-allow-duplicate-buffe= rs)) + ;; Look for an existing buffer. + (dired-find-buffer-nocreate dirname mode) + ;; Note that buffer already is in dired-mode, if found= . + )) (new-buffer-p (null buffer))) (or buffer (setq buffer (create-file-buffer (directory-file-name dirname)))) --msxhrqipppmkva3s Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="2.patch" diff --git a/dired.el b/dired.el index 36c2f17..2ecd6bd 100644 --- a/dired.el +++ b/dired.el @@ -1143,19 +1143,21 @@ The return value is the target column for the file names." (forward-line))))))) (defun dired-internal-noselect (dir-or-list &optional switches mode) - ;; If DIR-OR-LIST is a string and there is an existing dired buffer - ;; for it, just leave buffer as it is (don't even call dired-revert). - ;; This saves time especially for deep trees or with ange-ftp. - ;; The user can type `g' easily, and it is more consistent with find-file. - ;; But if SWITCHES are given they are probably different from the - ;; buffer's old value, so call dired-sort-other, which does - ;; revert the buffer. - ;; Revert the buffer if DIR-OR-LIST is a cons or `dired-directory' - ;; is a cons and DIR-OR-LIST is a string. - ;; A pity we can't possibly do "Directory has changed - refresh? " - ;; like find-file does. - ;; Optional argument MODE is passed to dired-find-buffer-nocreate, - ;; see there. + "Internal function for `dired-noselect'. + +If DIR-OR-LIST is a string and there is an existing dired buffer +for it, just leave buffer as it is (don't even call `dired-revert'). +This saves time especially for deep trees or with `ange-ftp'. +The user can type `g' easily, and it is more consistent with `find-file'. +But if SWITCHES are given they are probably different from the +buffer's old value, so call `dired-sort-other', which does +revert the buffer. +Revert the buffer if DIR-OR-LIST is a cons or `dired-directory' +is a cons and DIR-OR-LIST is a string. +A pity we can't possibly do \"Directory has changed - refresh?\" +like `find-file' does. +Optional argument MODE is passed to `dired-find-buffer-nocreate', +see there." (let* ((old-buf (current-buffer)) (dirname (if (consp dir-or-list) (car dir-or-list) dir-or-list)) (buffer (when (not (bound-and-true-p dired-allow-duplicate-buffers)) @@ -1219,20 +1221,24 @@ The return value is the target column for the file names." buffer)) (defvar dired-buffers nil - ;; Enlarged by dired-advertise - ;; Queried by function dired-buffers-for-dir. When this detects a - ;; killed buffer, it is removed from this list. - "Alist of expanded directories and their associated Dired buffers.") + "Alist of expanded directories and their associated Dired buffers. +The list is enlarged by `dired-advertise'. Function +`dired-buffers-for-dir' queries this list and removes killed +buffers from it, when detected.") (defvar dired-find-subdir) +;; `dired-find-subdir' is defined in `dired-x.el' ;; FIXME add a doc-string, and document dired-x extensions. (defun dired-find-buffer-nocreate (dirname &optional mode) - ;; This differs from dired-buffers-for-dir in that it does not consider - ;; subdirs of default-directory and searches for the first match only. - ;; Also, the major mode must be MODE. - (if (and (featurep 'dired-x) - dired-find-subdir + "Internal function for `dired-internal-noselect'. +Searches among buffers of major-mode MODE (default `dired-mode') +for one visiting DIRNAME, and returns the first one found. This +differs from `dired-buffers-for-dir' in that it does not consider +subdirs of `default-directory', it searches only for the first +match, and it can restrict its search to buffers of +major-mode MODE." + (if (and (featurep 'dired-x) dired-find-subdir ;; Don't try to find a wildcard as a subdirectory. (string-equal dirname (file-name-directory dirname))) (let* ((cur-buf (current-buffer)) --msxhrqipppmkva3s-- From unknown Tue Jun 17 01:41:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44023: dired-allow-duplicate-buffers Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Oct 2020 05:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Boruch Baum Cc: 44023@debbugs.gnu.org Received: via spool by 44023-submit@debbugs.gnu.org id=B44023.16028263613506 (code B ref 44023); Fri, 16 Oct 2020 05:33:02 +0000 Received: (at 44023) by debbugs.gnu.org; 16 Oct 2020 05:32:41 +0000 Received: from localhost ([127.0.0.1]:57284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTIM5-0000uS-GL for submit@debbugs.gnu.org; Fri, 16 Oct 2020 01:32:41 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTIM3-0000uG-Ee for 44023@debbugs.gnu.org; Fri, 16 Oct 2020 01:32:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nz/ooy/S6mEdH8yEaU0rJadkN1JOz19pVilp72aJWqM=; b=rYavPadOhnhdWAWlCzJopohD8K f8PhbShZBjrcr0Ea6IR0m0AebOhhtEeIwyVj4wYPuMbrOv3rXOBMGh23FODpZNFgrwwggFIDPpjeV 685I5V3gJMobonH3HJ9Pkizx8TgK1gYIqeWEkbrJIEm9lQGfKC+fGMT2FUy96MhGeMxo=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kTILu-0007PC-Lz; Fri, 16 Oct 2020 07:32:33 +0200 From: Lars Ingebrigtsen References: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> X-Now-Playing: Liaisons Dangereuses's _Liaisons Dangereuses_: "Liaisons Dangereuses" Date: Fri, 16 Oct 2020 07:32:29 +0200 In-Reply-To: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> (Boruch Baum's message of "Thu, 15 Oct 2020 15:22:31 -0400") Message-ID: <87wnzqrb0y.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Boruch Baum writes: > Also, implicit in the comment for `dired-find-buffer-nocreate' is that > more than one match may exist for a dired directory buffer. > > So, maybe this once existed or was planned? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Boruch Baum writes: > Also, implicit in the comment for `dired-find-buffer-nocreate' is that > more than one match may exist for a dired directory buffer. > > So, maybe this once existed or was planned? Dired has always supported having several buffers visiting the same directory, so I'm not quite sure what the proposed patch is trying to fix. You just rename the buffer to something else, like with any command that defaults to a single buffer name (like, say, `M-x grep'). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Tue Jun 17 01:41:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44023: dired-allow-duplicate-buffers Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Oct 2020 06:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 44023@debbugs.gnu.org Received: via spool by 44023-submit@debbugs.gnu.org id=B44023.160283081618862 (code B ref 44023); Fri, 16 Oct 2020 06:47:02 +0000 Received: (at 44023) by debbugs.gnu.org; 16 Oct 2020 06:46:56 +0000 Received: from localhost ([127.0.0.1]:57395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTJVw-0004u4-52 for submit@debbugs.gnu.org; Fri, 16 Oct 2020 02:46:56 -0400 Received: from mout.gmx.net ([212.227.17.21]:48745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTJVu-0004tk-8t for 44023@debbugs.gnu.org; Fri, 16 Oct 2020 02:46:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1602830808; bh=8jZb6kDbcNT7t/fh8Cmfb8NOseyGl0OxD/DitM8JXJw=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=Y4N1OnmRC+b7anS0+TNALMqGhYu7IDTwFMKRPK2OiyyQoXfoY+YX2qn3uh/nkPmW7 z8TtMPnblUgwP0NXcpKeqkCfjVOZQk9jyrMz/ebgk1n29OlGi9WwHd60iZu6u47v0U Ip1jIHx777ItlQjtTWjp5uD7QMui3dGCdb5RnZl4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from E15-2016.optimum.net ([72.89.170.172]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MPogF-1kpXK02hud-00Mt9J; Fri, 16 Oct 2020 08:46:48 +0200 Date: Fri, 16 Oct 2020 02:46:44 -0400 From: Boruch Baum Message-ID: <20201016064644.poo6ljwpgdhbsksy@E15-2016.optimum.net> References: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> <87wnzqrb0y.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wnzqrb0y.fsf@gnus.org> User-Agent: NeoMutt/20180716 X-Provags-ID: V03:K1:f9l5PC4GOLSkA8LlMwvBknrTqoQveozxqAFsB4NH6RTycWRQfLY j1Wvw58tZDVA1Jr+H6qYfjb1U4NXP3bbF/H0rawUe48RSTUMJQwti52Ce7sChabhmX8EdGQ 5qMfzvTNWTSORbzZ6hxE6BRvMnj7+dr72jUM4fqawmsxkYBQ2WXMvdDjZlbqz7tDCB9xNlr 5ASfbdzeXFRujXQu+qCGA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:YLlNKIX5+ZE=:ndcmetnnja9Vt0RTr0n/i0 Jm5xnDI8N3wJbQ3a8jYthszivayxx4eIDOHbvN4x1eSotMJtjL3X1xfKdTYGsVUFqn5vlFKBF QZ0qUloT38dH4IBlVnag4Bipd7YZBXwt59EPxV0IDRZvxDW1Ju1sxTAETcOntzcmQM43hcANC ZTSGrNDHOww9QuSikwPVLJzut7Bq4ke1WrY0Su10Woy06F290VJeo09v4lFkWWJtJfh5uW0Lr P77igL4N1f3Kz9VbGR+7rTjEXgpBV4olc7dTgBnF4+py1zUyhxrhHAQUxzUSIXOEAXPFpvmdZ m16zOz/pJs4Q8FAaEqfyl0kpDUdkHs5s/kkNj31wWfTbg64NAVYU684bnWAqwqVK2ST4r7/0X kcZgBFQcsm/df4aswL1wLbnxIyavCcOc63xzWcrsWm8Fzn6ih9hXrbt3FShVbgfdx3PMhdzGv f+4wlfvCU1dCouxgT4pq5dEYXDjH0hZhxOAGkhZegqcBrYzZTbWaMdJRlQRX1/ChklJj8LnIA zYbBIaPy1XqOqT6qMb82uKY6oA2RH/xdtPnBR/102x/lKcwn81EBOIytbO8Jm6eAm4vUTovVf heVVUug6yZVyn2ejxSlPBn4uK/qSZN4E3qynSRzN/R5mA7YlZt5VVt12BjvdkO4PUv8gfzMhi M6/G7VpoTEUFw9w2SqB+NrBc1hNLIu8Nvtw2H0VariCokxOG/h3O3NA3vEg9RTPqajk3FCWvS RG0kDbc51BYj4fVeUuKlol3dw2tJQaMjKsf6manKGJ/UzMu9BD3r5hwPkrNEGPljRmYiaiRZD fpiZKPtemdOF7tKfaZXfKRc70/wNKzvkKeQ0aDhxmvX4trwEgXbVgthWyx3FKSwLniLDuwUdl qwS4evLMJAjeY389vxcw== Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2020-10-16 07:32, Lars Ingebrigtsen wrote: > Boruch Baum writes: > > > Also, implicit in the comment for `dired-find-buffer-nocreate' is that > > more than one match may exist for a dired directory buffer. > > > > So, maybe this once existed or was planned? > > Dired has always supported having several buffers visiting the same > directory, so I'm not quite sure what the proposed patch is trying to > fix. You just rename the buffer to something else, like with any > command that defaults to a single buffer name (like, say, `M-x grep'). That's not "dired support" in any shape or form! That's an emacs kludge external to dired that exploits how dired handles buffer names (likewise for grep). Dired internally (in the very line being modified by my patch) actively subverts having several buffers visiting the same directory, and my experience in testing is that no harm is done when using the patch. =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 From unknown Tue Jun 17 01:41:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44023: dired-allow-duplicate-buffers Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Oct 2020 16:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Boruch Baum Cc: 44023@debbugs.gnu.org Received: via spool by 44023-submit@debbugs.gnu.org id=B44023.160286555531957 (code B ref 44023); Fri, 16 Oct 2020 16:26:01 +0000 Received: (at 44023) by debbugs.gnu.org; 16 Oct 2020 16:25:55 +0000 Received: from localhost ([127.0.0.1]:60694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTSYF-0008JN-7Z for submit@debbugs.gnu.org; Fri, 16 Oct 2020 12:25:55 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTSYE-0008J9-5G for 44023@debbugs.gnu.org; Fri, 16 Oct 2020 12:25:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xoGD3A8n4L1ch017/KZHd3P8VQ3Xm8FvF5XGyXjdrJ8=; b=PxXtie7ssimnJaz2S6nybQT4Wx wQWC8V0nP+encKL2K5FQloVjtljeod4+QGJE5hKWBqphrFj2b6iEjBD1jQD7mJke2HdcDrpuKYm56 7gngpqTEkOLiP+NetuuyZX5SYmFCuMzdeLP9eYOfVdHnQcoLb2OHLPj4A3d8N62dkLac=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kTSY5-0007CI-Bj; Fri, 16 Oct 2020 18:25:47 +0200 From: Lars Ingebrigtsen References: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> <87wnzqrb0y.fsf@gnus.org> <20201016064644.poo6ljwpgdhbsksy@E15-2016.optimum.net> X-Now-Playing: Thomas Mery's _Les couleurs, les ombres_: "=?UTF-8?Q?=C3=87a?=" Date: Fri, 16 Oct 2020 18:25:44 +0200 In-Reply-To: <20201016064644.poo6ljwpgdhbsksy@E15-2016.optimum.net> (Boruch Baum's message of "Fri, 16 Oct 2020 02:46:44 -0400") Message-ID: <877drq2l4n.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Boruch Baum writes: > Dired internally (in the very line being modified by my > patch) actively subverts having several buffers visiting the same > directory, What line are you referring to? Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Boruch Baum writes: > Dired internally (in the very line being modified by my > patch) actively subverts having several buffers visiting the same > directory, What line are you referring to? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Tue Jun 17 01:41:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44023: dired-allow-duplicate-buffers Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Oct 2020 05:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 44023@debbugs.gnu.org Received: via spool by 44023-submit@debbugs.gnu.org id=B44023.16029999351563 (code B ref 44023); Sun, 18 Oct 2020 05:46:02 +0000 Received: (at 44023) by debbugs.gnu.org; 18 Oct 2020 05:45:35 +0000 Received: from localhost ([127.0.0.1]:36053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kU1Vf-0000P9-5N for submit@debbugs.gnu.org; Sun, 18 Oct 2020 01:45:35 -0400 Received: from mout.gmx.net ([212.227.17.21]:33823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kU1Vd-0000Ov-HM for 44023@debbugs.gnu.org; Sun, 18 Oct 2020 01:45:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1602999927; bh=uxY0Sy7qiAXqbgnPicGb5GqsnF8l0pxP1ercNoMOhHA=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=c4W2c58uDQ2mZJ9aeXnh2jxBiu9dok1KE2S91HbPm0SuMosPqtD6UkIQYOjH2wDy7 nigv2iT1nFfsPOrC9Bc+vzgxM2awD9zxzTxCmq7AZoxuU4yolP3Ff6Kbm11et5YDrh 88Bcdhrn09GTYaK3ht10LRrZFX/h5QGQIg9Fb9UY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from E15-2016.optimum.net ([72.89.170.172]) by mail.gmx.com (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1Mwfac-1kDrES2fLm-00y8nh; Sun, 18 Oct 2020 07:45:26 +0200 Date: Sun, 18 Oct 2020 01:45:23 -0400 From: Boruch Baum Message-ID: <20201018054523.xy5lggg3nft7263u@E15-2016.optimum.net> References: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> <87wnzqrb0y.fsf@gnus.org> <20201016064644.poo6ljwpgdhbsksy@E15-2016.optimum.net> <877drq2l4n.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877drq2l4n.fsf@gnus.org> User-Agent: NeoMutt/20180716 X-Provags-ID: V03:K1:HnZWZPNjAfj3rh3zjnQXnA3BvvuUQT1nultrv8i6n5QAD402SOB Eyvu8SUdkmXPnnobI+wVz9QuQKWsN/vsxVEzIITG8CfZuo7im1fIS5RhGy+RMSYNppcATO3 aHtJOwj6ZgBh+lh6lgzzrtVkw3ViXrqgNlsMiSfkFz5gws5gUCz/TMJKp2NefdYyb/v/rL5 gUn/G0RxF9GsCxYbOUbRQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:sePDn4md3QI=:4wNmysjpyzirnz3TpMk3DG hG47+k8WxlaxJ1RD97UWTkyoNiYnPBaOEsSKOKZCKLPlTnJwoKSY6hytVuB8e8qrfu+yHilQp DHJ4V+j0gjw3qZ66t/CQ5EEBf4DiDq36c4CQvoBMbzTwtQorSU6Gr0C4NO0R+N4rm0RloT63s PDB/9OeoR9+xqBWtfZU0n1dMfEhSQ2fnNqUp4EUZ8iPDTbG1DJnsNtoIEEcQrulC8enLB/j9M SGnua4HfrD396b5p7uWnzkBPva+eAIXsAgz0Td/xuYvJCfVxaWyAES9BUwopW+PA6D3ImsAjA 3iuQO+vosdw2q7NDMzkMqqiSzhCOMiRQ6mdMG4q711qDN6un1A1wzUezF1VmRbH5Kj39LxND+ vR9VKBbsaJgc8MvykV/wXSsQFEY5xi991T7BSNpV35nqy5w1f+U9kb68wZW1BH6tyLSLjaQId fYntJq5FFdbiALzwioyPi/Gk46t+KsFm3luOkvBgQkMK2OSCq0gdfSz8fsQ//24eVXvnvPraR X9ivzLYohDCjMi16YEf930tigUwDRv/oZ9xsqoreZxatxmymseSVUEM5F+gIVE+7zRPqhy9zA JlU9x0yc4k2mi2k1V8cHWc576fAJ46W+kKnvFAW4JK6a4Li3E+sbQnt+SkBIP2LrFzL5SNZO9 G9+8R8iZYmfMED7+8YCQ0eRo86+NbcrsHlVq0EOHtfElUajoyXTl49C5B9UPjFUmLpusM8DwM 9AoWw0V4MZv81PgMDn+S2mZ4an1XuJxntamTdIYxJj1MU7/chdvouFlf1Z/d8LB9ifBQj+BSm JcmEc7Bn1gMYV2vf3uHj+oKGOZ6OvVvptik49gt0Oc9DgETxz8B6yKQcIsXNYoFyvUjYMAe/L 1HlT7VNKOCp7u20Zxazg== Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2020-10-16 18:25, Lars Ingebrigtsen wrote: > Boruch Baum writes: > > > Dired internally (in the very line being modified by my > > patch) actively subverts having several buffers visiting the same > > directory, > > What line are you referring to? - (buffer (dired-find-buffer-nocreate dirname mode)) It's the only line changed in the patch file, at the beginning of function dired-internal-noselect. =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 From unknown Tue Jun 17 01:41:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44023: dired-allow-duplicate-buffers Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Oct 2020 08:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Boruch Baum Cc: 44023@debbugs.gnu.org Received: via spool by 44023-submit@debbugs.gnu.org id=B44023.160309512311239 (code B ref 44023); Mon, 19 Oct 2020 08:13:02 +0000 Received: (at 44023) by debbugs.gnu.org; 19 Oct 2020 08:12:03 +0000 Received: from localhost ([127.0.0.1]:39853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUQGw-0002vD-Rm for submit@debbugs.gnu.org; Mon, 19 Oct 2020 04:12:03 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUQGv-0002ug-2P for 44023@debbugs.gnu.org; Mon, 19 Oct 2020 04:12:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jGXKwitknuhTX0+hdGA7//bCwyT8BoBi1fouuQKP8MU=; b=nujZ/nblF6Y0MUQsgmw9vT1PNY GcpbzjrJBOnAgaI6cXK9bRx3g/71nc8ntsKg2zyydTxqc8EZUpOaXtD6NByUHgQepTQGk1xihzuYu oEVnNtCkoHNELKZEph1Xy76zxTGX/Er6xz0tzCY2JWMOtXI7PtEWROFRqtbb//vfxMMw=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kUQGd-0004sm-Rz; Mon, 19 Oct 2020 10:11:54 +0200 From: Lars Ingebrigtsen References: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> <87wnzqrb0y.fsf@gnus.org> <20201016064644.poo6ljwpgdhbsksy@E15-2016.optimum.net> <877drq2l4n.fsf@gnus.org> <20201018054523.xy5lggg3nft7263u@E15-2016.optimum.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEVDNUhYT2KHdIYf GCT0zK+oXWX////KAn60AAAAAWJLR0QGYWa4fQAAAAd0SU1FB+QKEgciIGgyBOwAAAG7SURBVDjL XZRBcsMgDEWlquzBHvY2SfakTA/Qjr13Oub+V6mEwNAyWWT0pP9BCAMAoHV1TZQSB6z8Iv+BC9yS LECnoFVMISRdkg14FTgXbqmhCBYHsAzAdXMX1g6InTq4UwMp4VhxXzqA0eP+TQ1E7CCE+zZ386sk CLhdQCuwgu/5OmIBVk4Z2GNu5qjnsKI3jQcEBQQqlkYgyaCdWUZQmkjFy7awycXcWqBS0uJ+24oU WydJqDuKHFeA5V7AaTfAnwr6BZd05/N2ASpAlPBV8qsUJQHISv5lNN5AqWPXPNd4ATMUQNHl/Lnl LkUVPH0+TB6kSDdFbz4TXlLcQQUoIJpt8KCyW5yRwXsHFitIi8/QAceoaGGyJhszANSOTOTM8e4H DwbiFGg1x3mMB+Qbj8iPZkV77gOQKREaA1q//QM8IPNHsHB5XyC4eXossfV2yxVMqyOew96RrHfq pgViCKuFP8AKwGd4vJz1/yr4UcXw+Fmduu/b0QDPFLKWU5PcgeMR4We+Kjh3HajyDig9xV7BVywf DlAgYk7c9/OQgUYlc5m2qQJTkgWgTnpEnsM9v7wagzyoOtEK8i+W2o66dNtRxAAAACV0RVh0ZGF0 ZTpjcmVhdGUAMjAyMC0xMC0xOFQwNzozNDozMiswMDowMGkk31EAAAAldEVYdGRhdGU6bW9kaWZ5 ADIwMjAtMTAtMThUMDc6MzQ6MzIrMDA6MDAYeWftAAAAAElFTkSuQmCC X-Now-Playing: Rocket To The Sky's _Cigars_: "Cigars" Date: Mon, 19 Oct 2020 10:11:42 +0200 In-Reply-To: <20201018054523.xy5lggg3nft7263u@E15-2016.optimum.net> (Boruch Baum's message of "Sun, 18 Oct 2020 01:45:23 -0400") Message-ID: <87ft6ahby9.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Boruch Baum writes: >> > Dired internally (in the very line being modified by my >> > patch) actively subverts having several buffers visiting the same >> > directory, >> >> What line are you referring to? > > - (buffer [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Boruch Baum writes: >> > Dired internally (in the very line being modified by my >> > patch) actively subverts having several buffers visiting the same >> > directory, >> >> What line are you referring to? > > - (buffer (dired-find-buffer-nocreate dirname mode)) > > It's the only line changed in the patch file, at the beginning of > function dired-internal-noselect. Ah, yes, it seems like dired is working the same as when visiting a regular file here. As find-file says: --- Switch to a buffer visiting file FILENAME, creating one if none already exists. --- Dired buffers aren't "visiting" files in the same way that regular files are, but it tries to keep the same semantics. So renaming a dired buffer doesn't help at all, because Emacs will always root out the already-existing buffer that points to that directory. I wonder whether that's on purpose, or whether it just happens that way by accident. Or is there a way to rename a dired buffer so that you can have two of them pointing to the same directory? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Tue Jun 17 01:41:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44023: dired-allow-duplicate-buffers Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Oct 2020 08:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 44023@debbugs.gnu.org Received: via spool by 44023-submit@debbugs.gnu.org id=B44023.160309673822330 (code B ref 44023); Mon, 19 Oct 2020 08:39:02 +0000 Received: (at 44023) by debbugs.gnu.org; 19 Oct 2020 08:38:58 +0000 Received: from localhost ([127.0.0.1]:39941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUQh0-0005o6-8G for submit@debbugs.gnu.org; Mon, 19 Oct 2020 04:38:58 -0400 Received: from mout.gmx.net ([212.227.15.19]:52831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUQgx-0005nq-U0 for 44023@debbugs.gnu.org; Mon, 19 Oct 2020 04:38:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1603096728; bh=1tWSrvUzeG9tkRb6ugBjM+qbVmKn2/jB8ur+aZrHSC0=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=XPw6s29kzFhBbtxj92qalo0LaDlbLLpy5GGKNTD0c9s1VlTB6LPYD/pWZ7KEVkMEo 7O2xRi6eNKRD5RW2XBvMe7GR6Fyo9tKRLTLsNR5V/qBKIX4NfZLaGEutX+vnmVuLtj lPY0JzbosTJUZ/lhQ+xWV+WmDpKH8NsqlxSUYCJs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from E15-2016.optimum.net ([72.89.170.172]) by mail.gmx.com (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1N6sn7-1kN6gR1A7j-018MFc; Mon, 19 Oct 2020 10:38:48 +0200 Date: Mon, 19 Oct 2020 04:38:45 -0400 From: Boruch Baum Message-ID: <20201019083845.woivnl3ierhdbg7d@E15-2016.optimum.net> References: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> <87wnzqrb0y.fsf@gnus.org> <20201016064644.poo6ljwpgdhbsksy@E15-2016.optimum.net> <877drq2l4n.fsf@gnus.org> <20201018054523.xy5lggg3nft7263u@E15-2016.optimum.net> <87ft6ahby9.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ft6ahby9.fsf@gnus.org> User-Agent: NeoMutt/20180716 X-Provags-ID: V03:K1:5SBD3fpD4PgAgC1JQivZpyDrHTSAp5MNhXUZhV/26NTdVdwSjod OnEgVy/w9Nwrjy+HpTjOIELnLn+b7RSfkJ/BP6CWBe4KPfBmS6QiETK/2M9Azlil2v8sfZZ qbDcfF1yvUks/09ewaiTd1vRnd8GV9rlF/zBwF88MDAp1M1g8FTtPFzvC5f/+zdcypJDYQn cnaulEpoqo2vneZhukk6A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:nexF6Rc3jZA=:qv9WUXIP/BS1CnpBQmaTj5 5oqzsHwQPQbvEwGUkvXMDXvclB3T2h2XFagdEJcvHjfyq3CFFmJidlvo1MzZ5gUya/bPeDBxq KJguXmNR4TK5f9h8dLafsI4xKiuTAnsziAaPdz3dcHZG/L63hJxDwvjXgK5U+nFS8XlNLDdyJ JJAEEG36LyD1ODpgMlRaWzRU8E1kXuHgUwKJTTIdYRU3RgIjLVKVSR/7Dc03GRl5mPIkm5tpp Hb6okgFkWY65yS8FhsM6VgytEtJZuGfO8mDNomHwN55MccYgOn/UW2zMdGVJNxlitZuS0yags l+BZSHYeBDvWU8uCNghpcOd1ZeBiHlPPX0S3QjgA+AewoP4xfEpqqd2EN6GzYchT7Io72xw/9 rOTwhm/BkDgNkx9SDgfkIFmBFh8eGGmBa7V1RZxY1Wx8JhOxXV1fgxNnRHBCGNTsXzXbhvQ4m Vg/99K4PETvA4hCmW10+lLgkzS7kwwChJDmvt/IetcIHbMKJm9EUCcEp9zM8lSShkDrVipCSS 2LnuwuG60UbqQqPl3CHplHvbdS0h8Q3BFQyIGV1C85k1KmUSsCY4lG8Tt8R9nW0k3qUVFhSSf QtILbYVHpQakbPYk5hyhkssQblgEBBynbMgzGbMpi2AzkAb6CfifwQK7ixHz8qIL5HUI4ZjNc 8Fop9kMa3xx6pJFHLN0SXEY8V9Se3JD3BCAadB/Ym48CSGMZTlGDRuOXrcuMXeGX+ZmecmTnI faSoXMQHKXs97IasWKQU+2+xWc5UlDlD5mEq1YdKvdt76EMdS/slZ2dugRH7QKNINy8yzAJd+ 81ETykPk3KEe2Y3czskoZjf1Gv71lNG2kTzJ9qESWFefRIUvnABMA5aEEQAWGHZAin9O+IxyY c+8wrNRThtIV8rV427Yw== Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2020-10-19 10:11, Lars Ingebrigtsen wrote: > Ah, yes > ... > I wonder > ... > is there a way to rename a dired buffer so that you can have two of > them pointing to the same directory? The patch does it without any need to explicitly rename anything, It all happens blissfully auto-magically. =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 From unknown Tue Jun 17 01:41:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44023: dired-allow-duplicate-buffers Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Nov 2020 15:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Boruch Baum Cc: 44023@debbugs.gnu.org Received: via spool by 44023-submit@debbugs.gnu.org id=B44023.160459073125473 (code B ref 44023); Thu, 05 Nov 2020 15:39:02 +0000 Received: (at 44023) by debbugs.gnu.org; 5 Nov 2020 15:38:51 +0000 Received: from localhost ([127.0.0.1]:53867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kahLf-0006cn-2b for submit@debbugs.gnu.org; Thu, 05 Nov 2020 10:38:51 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:35449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kahLc-0006cX-Rr for 44023@debbugs.gnu.org; Thu, 05 Nov 2020 10:38:49 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 4397580B69; Thu, 5 Nov 2020 10:38:43 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DA86E80922; Thu, 5 Nov 2020 10:38:41 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604590721; bh=MnTG2zJnUFyaNfw2VVc0b/EtdTulyIwSlT3tvf4nVto=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=jSdo9/xccV9vUpF3qBun+lgSL9g0lPUeScicxuEM9Pumqjg94cCwTIKlgqMuVyB/G N2xU/5IT5PcoLsQCdqmlEVKgX5GkzNJkYvaxp0494luQves0CKVIZTT7khnSeP9T0V HIEjovxJjQqO6nDUbNYwo9XikWg/AoxgNFs+p0WVuE6+fJ1r35VDKJOGDcUJEBe43A 2CAFU0k9cPyIO7yePC9shjtUj9lH9Sy+yaGR+cU81PR2u4o58/5rr2L6q0SwPEiIgG z07JB3U33jjISg9VcqPT2MFQT3HtoBA8D4bPkV4NxpceYr5LB33uhTAxo32MCDZNkT yEPlwWTwoGBVg== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B47E71202AD; Thu, 5 Nov 2020 10:38:41 -0500 (EST) From: Stefan Monnier Message-ID: References: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> Date: Thu, 05 Nov 2020 10:38:40 -0500 In-Reply-To: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> (Boruch Baum's message of "Thu, 15 Oct 2020 15:22:31 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.070 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > In going through the existing dired code, it seems that some functions > presume that multiple buffers can be visiting the same directory. See: Because of the functionality of Dired (which allows visiting several directories (and subdirectories)) in a single buffer, the code basically "has to" handle that case, indeed (tho I'd be surprised if there aren't improvements to be made in that regard). > +(defcustom dired-allow-duplicate-buffers t [...] > - ;; Look for an existing buffer. > - (buffer (dired-find-buffer-nocreate dirname mode)) > - ;; Note that buffer already is in dired-mode, if found. > + (buffer (when (not (bound-and-true-p dired-allow-duplicate-buffers)) > + ;; Look for an existing buffer. > + (dired-find-buffer-nocreate dirname mode) > + ;; Note that buffer already is in dired-mode, if found. > + )) [ The ";; Note ..." comment seems to be misplaced. ] I wonder if it's better to add a user-config variable or a new argument to `dired-internal-noselect`? E.g. I suspect that diredc wants/needs this feature, but it's not diredc's job to set user options, so for diredc it would probably make more sense to pass that as an argument. WDYT? Stefan From unknown Tue Jun 17 01:41:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44023: dired-allow-duplicate-buffers Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Nov 2020 16:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Boruch Baum Cc: 44023@debbugs.gnu.org Received: via spool by 44023-submit@debbugs.gnu.org id=B44023.160459238728395 (code B ref 44023); Thu, 05 Nov 2020 16:07:01 +0000 Received: (at 44023) by debbugs.gnu.org; 5 Nov 2020 16:06:27 +0000 Received: from localhost ([127.0.0.1]:53920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kahmN-0007Nv-F9 for submit@debbugs.gnu.org; Thu, 05 Nov 2020 11:06:27 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:11622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kahmK-0007Nh-VR for 44023@debbugs.gnu.org; Thu, 05 Nov 2020 11:06:25 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 75B1E80B34; Thu, 5 Nov 2020 11:06:19 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D964B80922; Thu, 5 Nov 2020 11:06:17 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604592377; bh=rkesGmJ3UwfBHWAeTmVQor6XcCdnm9oHMY1i03jxl2c=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Xk7OK0sbKdJClFlVZ1scot6fx/EVXuMgD4w0hqNaQGoRoj4nfdTwyqIpYF9Xz+Ikp gl2g0jwp5LdzDgWwSqJ7Vbpytp9UFRXRDK3KyLiUQMo8T0fOAu6p4wKXFvxk/TQO/c dwJ8XiocJ85ACYLmMcgm0TOx0b6Lwql89gPjQLha5jfaaDluVGcsCiQ0oHpuf+18gH nkmr922rCK+7tSEdt6Rxp6Fvz54TnMIWNIoIlGfHvajsRWDPOR9k61z58i6N05f3fE syi6joCefgfly79HZs11Rc2T7s8haxM+DouF62QnWVPo19Ea7hoI0BCpi+teYJe38O c2awNT6zZcaZg== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B10C3120255; Thu, 5 Nov 2020 11:06:17 -0500 (EST) From: Stefan Monnier Message-ID: References: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> Date: Thu, 05 Nov 2020 11:06:16 -0500 In-Reply-To: (Stefan Monnier's message of "Thu, 05 Nov 2020 10:38:40 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.070 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > I wonder if it's better to add a user-config variable or a new argument > to `dired-internal-noselect`? Or a new function/command. Stefan From unknown Tue Jun 17 01:41:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44023: dired-allow-duplicate-buffers Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Nov 2020 10:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 44023@debbugs.gnu.org Received: via spool by 44023-submit@debbugs.gnu.org id=B44023.160465689410402 (code B ref 44023); Fri, 06 Nov 2020 10:02:02 +0000 Received: (at 44023) by debbugs.gnu.org; 6 Nov 2020 10:01:34 +0000 Received: from localhost ([127.0.0.1]:55165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kayYo-0002hi-Dt for submit@debbugs.gnu.org; Fri, 06 Nov 2020 05:01:34 -0500 Received: from mout.gmx.net ([212.227.15.15]:41323) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kayYm-0002hT-18 for 44023@debbugs.gnu.org; Fri, 06 Nov 2020 05:01:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604656883; bh=eh4XhzTsjaTzp9P0hfeZEzQKQUxWQezfsJF1z93IFhM=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=j14xTqYwxZ7Ox9+/LUpphP1/Eih+2Q19ZhZkyUY5bxQKbcT3VcN9B8/fObLgoRt6H IL46B3P4r0mWlFkoOtKkkJ4MTDyYQWkiZ3hjlHsbnpkNthWLJI9WbPk8jg5WPQgfrW vIn6a1Xk5Z9AK8mI+jLykDRyBkSmm2xohtiY8Zsc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from E15-2016.optimum.net ([70.19.86.82]) by mail.gmx.com (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MkYc0-1jumi437B0-00m7Vk; Fri, 06 Nov 2020 11:01:23 +0100 Date: Fri, 6 Nov 2020 05:01:19 -0500 From: Boruch Baum Message-ID: <20201106100119.se2sneqeh4u7iv6f@E15-2016.optimum.net> References: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Provags-ID: V03:K1:tkUKlE2BlfzI34pCr+H+J6PnssqCckd0dP9TBJvTXtbQrJSMe+P DBCDefpqzt9eXeb/ZPBrRa7/ufRYgh0AxjS30Z9xeQxkvhrCWlsjKAW9lmtvRTnBX5VoM/d n0OsvD50c6nhJ/Z+uTsdWC+d1EB0fNf/qroZAWcdHWhk5ALarPSd6I1r5wcZDeQmNfm9sfR jiJ/8V1GXY9h1Xl1akiXQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:FGSL+e6LmrY=:X+dzuTL1z6YA8/2rfGNCJX pRZm/rZmig86Yt4ImTdh21qayY9VQ9DhboldbJkWzZgD2Op2KNkyUCv7nO8UXsCq6gKgO1/8D HCQSl8YTOdXQVYHsm3FwA8meWmGgEB3edgib9PmxWM7YtP2m40g364y9Tt6NGtiDMLULk3GNj /ZNNjbBTZbTGkEgnLsSWvaRzUGUPtyeQTSiK25q65LGH/6qLPmtDwz1zK7NyHs1+mrYQrrB8r 3ACnQnhz2FUUwKNMVAo3BItiWXoaNme5DucBXV4ZsZ5zgaZQEOdSBECLR6wn6WGwSnenSNSuS IxmQOvcfx2Jhntn2YcW6MxBin7EwdreFlDXKLvXPUOv97R6H72ZQoWxkTS93fCBrsC8pbKKJv IOjEkcq0z89c/JxkyTb51Fikjws1DsaTQA5hAH1obislAnR3spc/TzV5R/Qt+qh+8pGv+XdAX 5MnfO2GqOYV+0s4bGYWjiGsStnco6yARRdBXx9Gve2+vWvmQK9xlcehECttxUorD5vgNnH20p kuffMPYY5P6JfuSr+lWWJgKwOFjPSHj0T1WYScF2l6b894x6m/U2kbqqODiyubpRh5QUkGZOZ 7y7oue8ieABIejEn7pKCYN0WUj3kYc7u/tWTLHLVqjZRiGVxrOBS5toswnHgFezvuCH4/CXGQ cjAkvyflY1tyYCkO7G5MXsL92j4hVNFm6hRyxcxBwf+5xQUrtxT0dYRbA6BYG4OXX8UB6bjGv kw5Tw+fey7CMnNNUiYuVdFQQWFI0QDv3mUuhEo/aMRxteN3AwRZ7tE5ONy7VxkRocSa1QevDL 7mfUQZNuSAPU//GVtxCE8g8petOPLo48TnFWhesrRkiuUjilQ1znuyLdzici3O1HdpM/Cm53M CXm0p2yL0n8Klu4bHA4Q== Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2020-11-05 10:38, Stefan Monnier wrote: > > In going through the existing dired code, it seems that some functions > > presume that multiple buffers can be visiting the same directory. See: > > Because of the functionality of Dired (which allows visiting several > directories (and subdirectories)) in a single buffer, the code basically > "has to" handle that case, indeed (tho I'd be surprised if there aren't > improvements to be made in that regard). The case you mention sounds like the converse: multiple directories in a single buffer, versus what I'm addressing which is multiple buffers for a single directory. > > +(defcustom dired-allow-duplicate-buffers t > I wonder if it's better to add a user-config variable or a new argument > to `dired-internal-noselect`? > > E.g. I suspect that diredc wants/needs this feature, but it's not > diredc's job to set user options, so for diredc it would probably make > more sense to pass that as an argument. > WDYT? I prefer the defcustom route because I like giving a user choices (it's also more emacs-y). Less subjectively, adding an argument creates a mess because the modified function is a generic internal function so the argument would either need to be added to all its potential parents, or diredc would need to advice or replace those parents (which just replaces a single messy advice with several messy advices). =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 From unknown Tue Jun 17 01:41:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44023: dired-allow-duplicate-buffers Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Nov 2020 14:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Boruch Baum Cc: 44023@debbugs.gnu.org Received: via spool by 44023-submit@debbugs.gnu.org id=B44023.160467301828060 (code B ref 44023); Fri, 06 Nov 2020 14:31:01 +0000 Received: (at 44023) by debbugs.gnu.org; 6 Nov 2020 14:30:18 +0000 Received: from localhost ([127.0.0.1]:55464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kb2ks-0007IV-8s for submit@debbugs.gnu.org; Fri, 06 Nov 2020 09:30:18 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kb2kb-0007GD-Ow for 44023@debbugs.gnu.org; Fri, 06 Nov 2020 09:30:16 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3B26D80B46; Fri, 6 Nov 2020 09:29:56 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 94D8E8013D; Fri, 6 Nov 2020 09:29:54 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604672994; bh=agz3YvV0WosKB0FuIMI6CdjdYntzCgbT2qQkCnkUtm8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=gAsoDeB2HlsXHEiXmrkJsyElblXgOIaQzKYTEmWhCCu6GReBzpdLcmN17V3tsDLJS D0d9Z9gXNx+Hvo/G+4nqIKa4lv8aIMcSf10nwpNvFYBowwhZgTHaHP/ZmGcb1lMmkF H1+akxhGrqyoFBOMRb6F1XkpBBBUePTzmpjUYMFT3bNYO+8Xui8bF5W1DeyzXCmvp0 JmH4C4HwatozGpFi2zBdfEBIvRWUP2qcOUJK3bKrfyyLXZod1kj2mNzEm3O7MH1Nfo xlai5iLV3dXJvNy5q+rcwtxdmTL9WoRMES9yF6fonDU+8ozcg3FFAg7rGGllo/TJQd dn1y8NbVc142A== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 33A72120277; Fri, 6 Nov 2020 09:29:54 -0500 (EST) From: Stefan Monnier Message-ID: References: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> <20201106100119.se2sneqeh4u7iv6f@E15-2016.optimum.net> Date: Fri, 06 Nov 2020 09:29:53 -0500 In-Reply-To: <20201106100119.se2sneqeh4u7iv6f@E15-2016.optimum.net> (Boruch Baum's message of "Fri, 6 Nov 2020 05:01:19 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.072 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> > In going through the existing dired code, it seems that some functions >> > presume that multiple buffers can be visiting the same directory. See: >> Because of the functionality of Dired (which allows visiting several >> directories (and subdirectories)) in a single buffer, the code basically >> "has to" handle that case, indeed (tho I'd be surprised if there aren't >> improvements to be made in that regard). > The case you mention sounds like the converse: multiple directories in a > single buffer, versus what I'm addressing which is multiple buffers for > a single directory. Yes, but: start with a dired in ~/foo and another in ~/foo/bar and then in ~/foo ask dired to add the contents of ~/foo/bar to it: pronto you have 2 dired buffers that both show the content of ~/foo/bar. So because of that kind of scenario, dired has to handle some kind of "two dired buffers both showing the same directory" (tho it's not exactly the same as your scenario, admittedly). >> E.g. I suspect that diredc wants/needs this feature, but it's not >> diredc's job to set user options, so for diredc it would probably make >> more sense to pass that as an argument. >> WDYT? > > I prefer the defcustom route because I like giving a user choices (it's > also more emacs-y). I don't see this as a question of "choice vs no-choice" but a question is: should this be decided globally over the whole Emacs session, or should it be decided one a case-by-case basis (in both cases the decision should be under the user's control, either by setting a variable, or by calling a different command, or by using the same command bu tin a different context, ...). > Less subjectively, adding an argument creates a mess > because the modified function is a generic internal function Which is why I then suggested a separate function/command (which will require a bit of refactoring to share the common code, of course, but that's an implementation detail). Stefan From unknown Tue Jun 17 01:41:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44023: dired-allow-duplicate-buffers Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Nov 2020 09:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 44023@debbugs.gnu.org Received: via spool by 44023-submit@debbugs.gnu.org id=B44023.160482909916081 (code B ref 44023); Sun, 08 Nov 2020 09:52:02 +0000 Received: (at 44023) by debbugs.gnu.org; 8 Nov 2020 09:51:39 +0000 Received: from localhost ([127.0.0.1]:59747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbhMJ-0004BJ-5I for submit@debbugs.gnu.org; Sun, 08 Nov 2020 04:51:39 -0500 Received: from mout.gmx.net ([212.227.17.20]:52967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbhMH-0004B4-8t for 44023@debbugs.gnu.org; Sun, 08 Nov 2020 04:51:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604829088; bh=3IPN1uxbBQUlDV8NX+twjJPmM2F9KgHicIb/S3i8938=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=QBYCPuqIlOMknIOJ6RF5fG3x8RoqDh7D0WPIml7hLpLipqT3F1Hynw1Ymd2u6XGSJ uvk0RmJGSd0wJPwfJRe9M681DnPDKt/ldEe496hiS+a/qdfhChvXe9qFfdZEBv/tcX DsEaPReCb1SLdgvkP5epxJfXwr8tByeZQCLQCYEc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from E15-2016.optimum.net ([70.19.86.82]) by mail.gmx.com (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1M5wPb-1khRal0Y6V-007RPv; Sun, 08 Nov 2020 10:51:28 +0100 Date: Sun, 8 Nov 2020 04:51:25 -0500 From: Boruch Baum Message-ID: <20201108095017.noh5qlvtn2r2ko6s@E15-2016.optimum.net> References: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> <20201106100119.se2sneqeh4u7iv6f@E15-2016.optimum.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Provags-ID: V03:K1:tWT7khKJuiXbRmJQ8fLxdOHlgFhpQQUi6LFaLln7fH89y6UL6Kf 9kSV56x0rytYx9ErsU1pN0a3dQf07OwJ2qjLxGNk5egvz1u7I7KfVJHtP5NtJotjvSQ7vRu V///wqmFcZ9EmX+JFdQMQkm3kD97WLJSBsieUWoyNH3cblWpWFMZaJdoUuJTBM08m3zvIef u2mYyyliRHjH8F34s4DtA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:4ecDqnyLpfA=:+uuLfsXIxfKNAm1xuM1RSo T2XB+CdKQrFFy1gzo8mBcXtJrkuDp2Ty2ILlEoNbPUQmea7sWmssycdJeYFyJWyg2QJ9k/H71 cP1NQtaiLfM0rW2k23GgLoTJ2HpWE6S/GUhGeJKDoY/e9xR0fp+4GUSKgbiND7PLsaWHl/zxJ 2HuEds2QoPxS44Z3rF1hKitmjtRGMc0/pGbiIAwLxAQS2LyvLkL8uPMWuYkqFqEGRfWRUZwTa S0qHfNe/rYUwHNUX7RUlPfYjb/wjcyaXHT20EGGx6gMgObN2BJ3G/ww1DOTTQGD76PSEOiu0w +vhq44LdArjdx8mcqECNGt0iZgRlDbbSwgv1cXbf5wRE4kRvv55wysqNyTiGx7EcBy22KiOxu aLCnUuPBxLWaOhKG7HsSD0mm2TXDwKUzTVlR93j+uyLgkUy+05SvevgF+3Yn7QPMqnKoN+InA 5Z9xA/6eBvzJZU2sTIKFqX/AOy1UxvsEoDdyaY0LKCiylB9D3gFuGg+XuhdSl0P7aD7n9lo2C LXIWIcIsiebEtiTlEFdMGwvQfw1rgtTdAHRD1JQl3pUWjcihbI1d8+k3ArwFdn3NgHch9PkQG ndTRByRhjp/UsQhatX6RWCZcroDnIJv7pxwERQtBjMv40AUjmzCy2LJK+bVwT1m5OhmNNLzOu S7257UPAv8+AC5VQ6Stc8qrQfkC+MUu96blwkse8BB79iubry9nPFdy+ivanvNkERV7BIIRDu Xip+lo5v50xnozDr1aR4vAnyc/ZvDAgbw0IfeEph4yT6/+Z2F3KbyajahUVjsfAfjTM2A8DBt zLmLND1ne+xA3BeV66pC7RjlcIyXZwuJaw958wRGzWZJ2b3eaWqq1qmn3DxeWJsSudtc3zeMq mu7YFEFteIT4KLgX/MpA== Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2020-11-06 09:29, Stefan Monnier wrote: > >> E.g. I suspect that diredc wants/needs this feature, but it's not > >> diredc's job to set user options, so for diredc it would probably mak= e > >> more sense to pass that as an argument. > >> WDYT? > > > > I prefer the defcustom route because I like giving a user choices (it'= s > > also more emacs-y). > > I don't see this as a question of "choice vs no-choice" but a question > is: should this be decided globally over the whole Emacs session, Yes, yes. > or should it be decided one a case-by-case basis If you mean buffer-by-buffer, no, no, no. Think of how tedious that would be to need to manually set that for each navigation. Once a person sets a preference, it should become the default until changed. > > Less subjectively, adding an argument creates a mess > > because the modified function is a generic internal function > > Which is why I then suggested a separate function/command (which will > require a bit of refactoring to share the common code, of course, but > that's an implementation detail). Another way of saying 'more work that isn't really necessary at all'? If you're asking to choose between: 1] a clean single line change and boolean defcustom, and; 2] "a separate function/command (which will require a bit of refactoring to share the common code, of course" ... uh ... I think I choose ... uh ... uh ... =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0 From unknown Tue Jun 17 01:41:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44023: dired-allow-duplicate-buffers Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Nov 2020 13:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44023 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Boruch Baum Cc: 44023@debbugs.gnu.org Received: via spool by 44023-submit@debbugs.gnu.org id=B44023.160484341114326 (code B ref 44023); Sun, 08 Nov 2020 13:51:02 +0000 Received: (at 44023) by debbugs.gnu.org; 8 Nov 2020 13:50:11 +0000 Received: from localhost ([127.0.0.1]:59973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbl58-0003j0-Sz for submit@debbugs.gnu.org; Sun, 08 Nov 2020 08:50:11 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:2818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbl57-0003ii-EJ for 44023@debbugs.gnu.org; Sun, 08 Nov 2020 08:50:09 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A99D380B07; Sun, 8 Nov 2020 08:50:03 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 6F8948091C; Sun, 8 Nov 2020 08:50:02 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604843402; bh=WjdfXAYgpT13zL3y+/3mD5upU5Y0aQq63Sg1IF220d8=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=HJHY65rcit5qU9tbdyNYgUtJdK46EAtJvy7ANq1t9FsNfjv1oaskNJ7lRpfaouN3d A21oeNgwippWeJMxaCAuskWII0QVfhiy7r1uTQLb0lf604SiDK6MDWigTxtGk8gMbD UjarB6z7Xl10cdHhoqVuA2qqT0v0lx1JGgcgs77k6lCj1zaAlzKeSrKxHdYG5RRj7g X0EcCvV5NtY3SIe4KqcxRRI7lWFMs/ywAo/gPvi7aR2MT+u5060Ejrpcro2HXNBOFx q97KI07k08ZI62qagSR/GXSyAcf8s/wPXc7meJd7h8feuOpIG3cFeoH/s9qHnLovTe NGnwPAO4AlJBw== Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 41811120165; Sun, 8 Nov 2020 08:50:02 -0500 (EST) From: Stefan Monnier Message-ID: References: <20201015192231.rezuhk7foiyq3uff@E15-2016.optimum.net> <20201106100119.se2sneqeh4u7iv6f@E15-2016.optimum.net> <20201108095017.noh5qlvtn2r2ko6s@E15-2016.optimum.net> Date: Sun, 08 Nov 2020 08:50:01 -0500 In-Reply-To: <20201108095017.noh5qlvtn2r2ko6s@E15-2016.optimum.net> (Boruch Baum's message of "Sun, 8 Nov 2020 04:51:25 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.074 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> I don't see this as a question of "choice vs no-choice" but a question >> is: should this be decided globally over the whole Emacs session, > > Yes, yes. > >> or should it be decided one a case-by-case basis > > If you mean buffer-by-buffer, no, no, no. Think of how tedious that > would be to need to manually set that for each navigation. Once a person > sets a preference, it should become the default until changed. That's the point I was asking: is it a user-preference, so the users will either always want one or always want the other, or is it a behavior that users will want in some cases and will not want in other cases. E.g. imagine users that use both "plain dired" sometimes and diredc at other times: would they want to allow "duplicate dired" when using "plain dired", or is it only desirable when used from diredc? So maybe, the users should not even need to set the option a single time and the behavior will simply depend on whether dired is invoked directly or from diredc. > Another way of saying 'more work that isn't really necessary at all'? OK. I'm not arguing either way, I was just raising the question because my poor intuition got the impression that users might prefer not to set any option at all and that the right behavior could be inferred from context. Stefan