From unknown Wed Jun 18 00:17:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8484: 24.0.50; Dired problems with marking and hidden subdirs Resent-From: Stephen Berman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Apr 2011 12:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8484 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 8484@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.130260956019880 (code B ref -1); Tue, 12 Apr 2011 12:00:04 +0000 Received: (at submit) by debbugs.gnu.org; 12 Apr 2011 11:59:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9cFb-0005Aa-OR for submit@debbugs.gnu.org; Tue, 12 Apr 2011 07:59:20 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9cFZ-0005AM-Cu for submit@debbugs.gnu.org; Tue, 12 Apr 2011 07:59:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9cFT-0002tg-4U for submit@debbugs.gnu.org; Tue, 12 Apr 2011 07:59:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from [140.186.70.17] (port=60304 helo=lists.gnu.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9cFT-0002tc-2y for submit@debbugs.gnu.org; Tue, 12 Apr 2011 07:59:11 -0400 Received: from eggs.gnu.org ([140.186.70.92]:35456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9cFS-0005Wf-20 for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2011 07:59:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9cFQ-0002t6-Ie for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2011 07:59:10 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:38353) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Q9cFP-0002rB-N4 for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2011 07:59:08 -0400 Received: (qmail invoked by alias); 12 Apr 2011 11:58:52 -0000 Received: from i59F56D7F.versanet.de (EHLO escher.home) [89.245.109.127] by mail.gmx.net (mp022) with SMTP; 12 Apr 2011 13:58:52 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1+TIAEei2WTrLcTbQO8+Lm+QPRi4SAxtz1WWhHXHg 87BDTvOu00djox Received: by escher.home (Postfix, from userid 1000) id 042F263902; Tue, 12 Apr 2011 13:58:49 +0200 (CEST) From: Stephen Berman Date: Tue, 12 Apr 2011 13:58:49 +0200 Message-ID: <87k4ez8yva.fsf@escher.fritz.box> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Y-GMX-Trusted: 0 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 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.6 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) 1. emacs -Q 2. Create a directory containing a non-empty directory, e.g. "~/test/test0/test1". 3. Visit "test" in Dired: `C-x d ~/test RET' 4. Put point on "test0" and type `i' to insert the subdirectory. 5. With point within the inserted subdirectory type `$' to hide it. 6. Type `% m RET' to mark all files except "." and "..". This is what buffer "test" now looks like: /home/steve/test: total used in directory 12 available 24083132 drwxr-xr-x 3 steve users 4096 2011-04-12 09:22 . drwxr-xr-x 6 steve users 4096 2011-04-12 09:20 .. * drwxr-xr-x 3 steve users 4096 2011-04-12 09:23 test0 * /home/steve/test/test0:... 7. Try to operate on the marked files, e.g. `C', `R', 'D' etc. => Instead of the operation being executed, you get the message "Cannot operate on `.' or `..'". 8. Now type `$' on the hidden subdirectory to unhide it. The two marked lines remain marked. Then repeat step 7. => Regardless of where point is, you get this error: "No file on this line" I believe these problems are due to the hidden subdirectory being a single line, since selective display replaces "\n" with "\r". In the first case, when dired-mark-if is called in dired-mark-files-regexp, with point at the beginning of the hidden subdirectory, (looking-at dired-re-dot) is nil but dired-get-filename finds "." inside "test0", and this triggers the error message. In the second case, when dired-move-to-filename is called in dired-map-over-marks with point on the subdirectory, it fails and raises the error. I see two directions to go for fixing this: (a) temporarily unhide the subdirectory (probably iteratively) and then mark as usual, so that the dired-re-dot filter succeeds; (b) prevent any marking of (and hence within) hidden subdirectories. It seems that the latter is more consistent with current Dired behavior: if you remove the marks from "test" above, then unhide "test0", then type `% m RET', so that now "test0" and "test1" are marked, then hide "test0" again, then invoke an operation, e.g. `C', `R', 'D' etc. -- only "test0" gets operated on, not "test1". That is, the marked file in the hidden subdirectory is ignored. So marking the hidden subdirectory in step 6 above is the real bug, given current Dired behavior. One way to fix this is the below patch to dired-get-filename: this checks whether the current line is a hidden subdirectory and if so, unhides it, so that it isn't just a single line and the line does not get marked, then after dired-move-to-filename fails, hides it again, shortcutting any further marking. In GNU Emacs 24.0.50.1 (i686-suse-linux-gnu, GTK+ Version 2.20.1) of 2011-04-03 on escher Windowing system distributor `The X.Org Foundation', version 11.0.10800000 configured using `configure '--without-toolkit-scroll-bars' 'CFLAGS=-g -O2 -fno-optimize-sibling-calls'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default enable-multibyte-characters: t *** /data/steve/bzr/emacs/trunk/lisp/dired.el 2011-04-03 16:10:27.000000000 +0200 --- /data/steve/bzr/emacs/quickfixes/lisp/dired.el 2011-04-12 12:48:02.000000000 +0200 *************** *** 2049,2058 **** Optional arg NO-ERROR-IF-NOT-FILEP means treat `.' and `..' as regular filenames and return nil if no filename on this line. Otherwise, an error occurs in these cases." ! (let (case-fold-search file p1 p2 already-absolute) (save-excursion (if (setq p1 (dired-move-to-filename (not no-error-if-not-filep))) (setq p2 (dired-move-to-end-of-filename no-error-if-not-filep)))) ;; nil if no file on this line, but no-error-if-not-filep is t: (if (setq file (and p1 p2 (buffer-substring p1 p2))) (progn --- 2049,2061 ---- Optional arg NO-ERROR-IF-NOT-FILEP means treat `.' and `..' as regular filenames and return nil if no filename on this line. Otherwise, an error occurs in these cases." ! (let ((hidden (dired-subdir-hidden-p (dired-current-directory))) ! case-fold-search file p1 p2 already-absolute) ! (if hidden (dired-unhide-subdir)) (save-excursion (if (setq p1 (dired-move-to-filename (not no-error-if-not-filep))) (setq p2 (dired-move-to-end-of-filename no-error-if-not-filep)))) + (if hidden (dired-hide-subdir 1)) ;; nil if no file on this line, but no-error-if-not-filep is t: (if (setq file (and p1 p2 (buffer-substring p1 p2))) (progn From unknown Wed Jun 18 00:17:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8484: 24.0.50; Dired problems with marking and hidden subdirs Resent-From: Marcin Borkowski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jan 2016 20:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8484 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman Cc: 8484@debbugs.gnu.org Received: via spool by 8484-submit@debbugs.gnu.org id=B8484.145349613630846 (code B ref 8484); Fri, 22 Jan 2016 20:56:01 +0000 Received: (at 8484) by debbugs.gnu.org; 22 Jan 2016 20:55:36 +0000 Received: from localhost ([127.0.0.1]:58122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMik4-00081Q-Ad for submit@debbugs.gnu.org; Fri, 22 Jan 2016 15:55:36 -0500 Received: from mail.mojserwer.eu ([195.110.48.8]:55429) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMik2-00081I-G2 for 8484@debbugs.gnu.org; Fri, 22 Jan 2016 15:55:35 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 6D115893489; Fri, 22 Jan 2016 21:55:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YrI+Vewb31mt; Fri, 22 Jan 2016 21:55:25 +0100 (CET) Received: from localhost (unknown [109.232.24.28]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 51DE6893487; Fri, 22 Jan 2016 21:55:25 +0100 (CET) From: Marcin Borkowski References: <87k4ez8yva.fsf@escher.fritz.box> Date: Fri, 22 Jan 2016 21:55:21 +0100 In-Reply-To: <87k4ez8yva.fsf@escher.fritz.box> (Stephen Berman's message of "Tue, 12 Apr 2011 13:58:49 +0200") Message-ID: <87y4bh72rq.fsf@amu.edu.pl> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.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: 0.3 (/) Hello, I'm writing to confirm that I can reproduce this under GNU Emacs 25.1.50.1. Best, Marcin Borkowski On 2011-04-12, at 14:58, Stephen Berman wrote: > 1. emacs -Q > 2. Create a directory containing a non-empty directory, > e.g. "~/test/test0/test1". > 3. Visit "test" in Dired: `C-x d ~/test RET' > 4. Put point on "test0" and type `i' to insert the subdirectory. > 5. With point within the inserted subdirectory type `$' to hide it. > 6. Type `% m RET' to mark all files except "." and "..". This is what > buffer "test" now looks like: > > /home/steve/test: > total used in directory 12 available 24083132 > drwxr-xr-x 3 steve users 4096 2011-04-12 09:22 . > drwxr-xr-x 6 steve users 4096 2011-04-12 09:20 .. > * drwxr-xr-x 3 steve users 4096 2011-04-12 09:23 test0 > > * /home/steve/test/test0:... > > 7. Try to operate on the marked files, e.g. `C', `R', 'D' etc. > => Instead of the operation being executed, you get the message "Cannot > operate on `.' or `..'". > 8. Now type `$' on the hidden subdirectory to unhide it. The two marked > lines remain marked. Then repeat step 7. > => Regardless of where point is, you get this error: "No file on this line" > > I believe these problems are due to the hidden subdirectory being a > single line, since selective display replaces "\n" with "\r". In the > first case, when dired-mark-if is called in dired-mark-files-regexp, > with point at the beginning of the hidden subdirectory, (looking-at > dired-re-dot) is nil but dired-get-filename finds "." inside "test0", > and this triggers the error message. In the second case, when > dired-move-to-filename is called in dired-map-over-marks with point on > the subdirectory, it fails and raises the error. > > I see two directions to go for fixing this: (a) temporarily unhide the > subdirectory (probably iteratively) and then mark as usual, so that the > dired-re-dot filter succeeds; (b) prevent any marking of (and hence > within) hidden subdirectories. It seems that the latter is more > consistent with current Dired behavior: if you remove the marks from > "test" above, then unhide "test0", then type `% m RET', so that now > "test0" and "test1" are marked, then hide "test0" again, then invoke an > operation, e.g. `C', `R', 'D' etc. -- only "test0" gets operated on, not > "test1". That is, the marked file in the hidden subdirectory is > ignored. So marking the hidden subdirectory in step 6 above is the real > bug, given current Dired behavior. One way to fix this is the below > patch to dired-get-filename: this checks whether the current line is a > hidden subdirectory and if so, unhides it, so that it isn't just a > single line and the line does not get marked, then after > dired-move-to-filename fails, hides it again, shortcutting any further > marking. > > In GNU Emacs 24.0.50.1 (i686-suse-linux-gnu, GTK+ Version 2.20.1) > of 2011-04-03 on escher > Windowing system distributor `The X.Org Foundation', version 11.0.10800000 > configured using `configure '--without-toolkit-scroll-bars' 'CFLAGS=-g -O2 -fno-optimize-sibling-calls'' > > Important settings: > value of $LC_ALL: nil > value of $LC_COLLATE: nil > value of $LC_CTYPE: nil > value of $LC_MESSAGES: nil > value of $LC_MONETARY: nil > value of $LC_NUMERIC: nil > value of $LC_TIME: nil > value of $LANG: en_US.UTF-8 > value of $XMODIFIERS: @im=local > locale-coding-system: utf-8-unix > default enable-multibyte-characters: t > > > *** /data/steve/bzr/emacs/trunk/lisp/dired.el 2011-04-03 16:10:27.000000000 +0200 > --- /data/steve/bzr/emacs/quickfixes/lisp/dired.el 2011-04-12 12:48:02.000000000 +0200 > *************** > *** 2049,2058 **** > Optional arg NO-ERROR-IF-NOT-FILEP means treat `.' and `..' as > regular filenames and return nil if no filename on this line. > Otherwise, an error occurs in these cases." > ! (let (case-fold-search file p1 p2 already-absolute) > (save-excursion > (if (setq p1 (dired-move-to-filename (not no-error-if-not-filep))) > (setq p2 (dired-move-to-end-of-filename no-error-if-not-filep)))) > ;; nil if no file on this line, but no-error-if-not-filep is t: > (if (setq file (and p1 p2 (buffer-substring p1 p2))) > (progn > --- 2049,2061 ---- > Optional arg NO-ERROR-IF-NOT-FILEP means treat `.' and `..' as > regular filenames and return nil if no filename on this line. > Otherwise, an error occurs in these cases." > ! (let ((hidden (dired-subdir-hidden-p (dired-current-directory))) > ! case-fold-search file p1 p2 already-absolute) > ! (if hidden (dired-unhide-subdir)) > (save-excursion > (if (setq p1 (dired-move-to-filename (not no-error-if-not-filep))) > (setq p2 (dired-move-to-end-of-filename no-error-if-not-filep)))) > + (if hidden (dired-hide-subdir 1)) > ;; nil if no file on this line, but no-error-if-not-filep is t: > (if (setq file (and p1 p2 (buffer-substring p1 p2))) > (progn From debbugs-submit-bounces@debbugs.gnu.org Thu May 05 18:49:59 2016 Received: (at control) by debbugs.gnu.org; 5 May 2016 22:49:59 +0000 Received: from localhost ([127.0.0.1]:40903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayS5n-0006jK-Li for submit@debbugs.gnu.org; Thu, 05 May 2016 18:49:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayS5m-0006j5-6w for control@debbugs.gnu.org; Thu, 05 May 2016 18:49:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayS5X-0007G1-UP for control@debbugs.gnu.org; Thu, 05 May 2016 18:49:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayS5X-0007Ea-S7 for control@debbugs.gnu.org; Thu, 05 May 2016 18:49:43 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ayS5T-0006eP-8y for control@debbugs.gnu.org; Thu, 05 May 2016 18:49:39 -0400 Subject: control message for bug 23454 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Thu, 05 May 2016 18:49:39 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.1 (-------) X-Debbugs-Envelope-To: control 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: -7.1 (-------) merge 8484 23454 From unknown Wed Jun 18 00:17:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8484: 24.0.50; Dired problems with marking and hidden subdirs Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Sep 2020 12:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8484 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stephen Berman Cc: 8484@debbugs.gnu.org Received: via spool by 8484-submit@debbugs.gnu.org id=B8484.16000883178664 (code B ref 8484); Mon, 14 Sep 2020 12:59:01 +0000 Received: (at 8484) by debbugs.gnu.org; 14 Sep 2020 12:58:37 +0000 Received: from localhost ([127.0.0.1]:53025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHo45-0002Fg-0f for submit@debbugs.gnu.org; Mon, 14 Sep 2020 08:58:37 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHo42-0002FM-Ru for 8484@debbugs.gnu.org; Mon, 14 Sep 2020 08:58:35 -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=xZKGrOvy1cCo0jWuuSNNjM3J0+nBxcAtbd00njsxqr8=; b=WSmPSxclbpyHVyYT4biwhhQTaU kNU1MeC0JVQiSrylZZ+n7qXWffKmqpED56lA7pKKw4TcCGou+yVGbp725rN2Ci6xNT19a3KjxZyKz /9735ysGhLKjupZCOBukdzvyzxDuwRvYxgzqn3D/hghnno7eetZihkmENgkmUKGLTYfA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHo3t-0001iH-Iy; Mon, 14 Sep 2020 14:58:28 +0200 From: Lars Ingebrigtsen References: <87k4ez8yva.fsf@escher.fritz.box> X-Now-Playing: Cosey Fanni Tutti's _Tutti_: "En" Date: Mon, 14 Sep 2020 14:58:24 +0200 In-Reply-To: <87k4ez8yva.fsf@escher.fritz.box> (Stephen Berman's message of "Tue, 12 Apr 2011 13:58:49 +0200") Message-ID: <871rj4bjm7.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: Stephen Berman writes: > 1. emacs -Q > 2. Create a directory containing a non-empty directory, > e.g. "~/test/test0/test1". > 3. Visit "test" in Dired: `C-x d ~/test RET' > 4. Put point on "test0" and type `i' to insert the [...] 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 (-) Stephen Berman writes: > 1. emacs -Q > 2. Create a directory containing a non-empty directory, > e.g. "~/test/test0/test1". > 3. Visit "test" in Dired: `C-x d ~/test RET' > 4. Put point on "test0" and type `i' to insert the subdirectory. > 5. With point within the inserted subdirectory type `$' to hide it. > 6. Type `% m RET' to mark all files except "." and "..". This is what > buffer "test" now looks like: > > /home/steve/test: > total used in directory 12 available 24083132 > drwxr-xr-x 3 steve users 4096 2011-04-12 09:22 . > drwxr-xr-x 6 steve users 4096 2011-04-12 09:20 .. > * drwxr-xr-x 3 steve users 4096 2011-04-12 09:23 test0 > > * /home/steve/test/test0:... > > 7. Try to operate on the marked files, e.g. `C', `R', 'D' etc. > => Instead of the operation being executed, you get the message "Cannot > operate on `.' or `..'". > 8. Now type `$' on the hidden subdirectory to unhide it. The two marked > lines remain marked. Then repeat step 7. > => Regardless of where point is, you get this error: "No file on this line" I tried this recipe in Emacs 28, and I was unable to reproduce it, but the recipe from the merged bug bug#23454 was still present in Emacs 28. Stephen's patch seems to fix that example, so I've now applied it to the trunk. I had to move some utility functions from dired-aux to avoid dired.el unconditionally loading dired-aux always (since this change is in a very fundamental dired function). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 08:58:43 2020 Received: (at control) by debbugs.gnu.org; 14 Sep 2020 12:58:43 +0000 Received: from localhost ([127.0.0.1]:53028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHo4B-0002Fz-9J for submit@debbugs.gnu.org; Mon, 14 Sep 2020 08:58:43 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHo49-0002Fe-3l for control@debbugs.gnu.org; Mon, 14 Sep 2020 08:58:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=133ZwpQ8To0OGyEk6W8G/4OOF1xDNoDkr1de97/Dsn4=; b=PGkjuW2G7LCGcPRkwHPaFW5Xaj 0lQ6zTTiYdn5YdtSQuJ5X4qEWcJqF2RrRMRL3x3xPuHSVbJqTI9Sde83/S38Y5MzgieF+R3wRgWXr bFiSz6gMDLzB+hfrUuZre+RmfYAB2iGfqZZ1jR005tTJrkQqGvyd/oFbgf48bTHNEE3I=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHo41-0001iO-Bp for control@debbugs.gnu.org; Mon, 14 Sep 2020 14:58:35 +0200 Date: Mon, 14 Sep 2020 14:58:32 +0200 Message-Id: <87zh5sa51j.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #8484 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: tags 8484 fixed close 8484 28.1 quit 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-Debbugs-Envelope-To: control 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 (-) tags 8484 fixed close 8484 28.1 quit From unknown Wed Jun 18 00:17:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8484: 24.0.50; Dired problems with marking and hidden subdirs Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Sep 2020 18:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8484 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Lars Ingebrigtsen Cc: Stephen Berman , 8484@debbugs.gnu.org Received: via spool by 8484-submit@debbugs.gnu.org id=B8484.160019388730188 (code B ref 8484); Tue, 15 Sep 2020 18:19:02 +0000 Received: (at 8484) by debbugs.gnu.org; 15 Sep 2020 18:18:07 +0000 Received: from localhost ([127.0.0.1]:60536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIFWp-0007qp-6b for submit@debbugs.gnu.org; Tue, 15 Sep 2020 14:18:07 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:45081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIFWn-0007qB-Vl for 8484@debbugs.gnu.org; Tue, 15 Sep 2020 14:18:06 -0400 X-Originating-IP: 91.129.97.241 Received: from mail.gandi.net (m91-129-97-241.cust.tele2.ee [91.129.97.241]) (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 50DAD1BF203; Tue, 15 Sep 2020 18:17:57 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87k4ez8yva.fsf@escher.fritz.box> <871rj4bjm7.fsf@gnus.org> Date: Tue, 15 Sep 2020 21:04:12 +0300 In-Reply-To: <871rj4bjm7.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 14 Sep 2020 14:58:24 +0200") Message-ID: <874knzosf6.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain 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 (-) > Stephen's patch seems to fix that example, so I've now applied it to the > trunk. I had to move some utility functions from dired-aux to avoid > dired.el unconditionally loading dired-aux always (since this change is > in a very fundamental dired function). Ouch, this broke my configuration. When the init file contains: (add-hook 'dired-mode-hook 'dired-sort-toggle) trying to visit a Dired buffer fails with: Debugger entered--Lisp error: (error "No subdir-alist in tmp") signal(error ("No subdir-alist in tmp")) error("No subdir-alist in %s" #) dired-current-directory() dired-get-filename(nil t) dired-save-positions() dired-revert(nil nil) revert-buffer() dired-sort-toggle() run-hooks(change-major-mode-after-body-hook dired-mode-hook) apply(run-hooks (change-major-mode-after-body-hook dired-mode-hook)) run-mode-hooks(dired-mode-hook) dired-mode("/tmp/" "-al") dired-internal-noselect("/tmp/" nil) dired-noselect("/tmp" nil) dired("/tmp" nil) funcall-interactively(dired "/tmp" nil) call-interactively(dired nil nil) command-execute(dired) From unknown Wed Jun 18 00:17:44 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8484: 24.0.50; Dired problems with marking and hidden subdirs Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Sep 2020 11:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8484 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Juri Linkov Cc: Stephen Berman , 8484@debbugs.gnu.org Received: via spool by 8484-submit@debbugs.gnu.org id=B8484.160025618315555 (code B ref 8484); Wed, 16 Sep 2020 11:37:02 +0000 Received: (at 8484) by debbugs.gnu.org; 16 Sep 2020 11:36:23 +0000 Received: from localhost ([127.0.0.1]:33425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIVjb-00042p-1e for submit@debbugs.gnu.org; Wed, 16 Sep 2020 07:36:23 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIVjZ-00042b-A2 for 8484@debbugs.gnu.org; Wed, 16 Sep 2020 07:36:21 -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=el1SbyyvtmR2+bObjKEhRof1i5eUMgxZ1Sz0RLqV53g=; b=OOdkxasGwRkAXmRm4amWsk/kEM NcyFheBl0S3ApNDrt5i/0MH0/mhclM4qItf8ndhPhxoO755E+BKhif420LUkKHppRENV51gjZzupW dYFBgXc8u+ClU5pobyBN293tSkbJmDiC9rxQzkRUkAefYlEyLDRFiWXT3h+wKIgHRLn0=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIVjK-0004FE-IJ; Wed, 16 Sep 2020 13:36:13 +0200 From: Lars Ingebrigtsen References: <87k4ez8yva.fsf@escher.fritz.box> <871rj4bjm7.fsf@gnus.org> <874knzosf6.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQAAAAB/ecQqAAAABGdBTUEAALGPC/xhBQAAAAJi S0dEAAHdihOkAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAB3RJTUUH5AkQCyMGR5f7bwAAABBJREFU GNNj+A8GDKMUdSgAT1Qe8M8TmhgAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDktMTZUMTE6MzU6 MDUrMDA6MDBrguOZAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5LTE2VDExOjM1OjA1KzAwOjAw Gt9bJQAAAABJRU5ErkJggg== X-Now-Playing: Saito Koji's _433-1_: "433_067" Date: Wed, 16 Sep 2020 13:36:04 +0200 In-Reply-To: <874knzosf6.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 15 Sep 2020 21:04:12 +0300") Message-ID: <878sdarm1n.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: Juri Linkov writes: >> Stephen's patch seems to fix that example, so I've now applied it to the >> trunk. I had to move some utility functions from dired-aux to avoid >> dired.el unconditionally loading dired-aux always [...] 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 (-) Juri Linkov writes: >> Stephen's patch seems to fix that example, so I've now applied it to the >> trunk. I had to move some utility functions from dired-aux to avoid >> dired.el unconditionally loading dired-aux always (since this change is >> in a very fundamental dired function). > > Ouch, this broke my configuration. When the init file contains: > > (add-hook 'dired-mode-hook 'dired-sort-toggle) > > trying to visit a Dired buffer fails with: > > Debugger entered--Lisp error: (error "No subdir-alist in tmp") > signal(error ("No subdir-alist in tmp")) > error("No subdir-alist in %s" #) > dired-current-directory() > dired-get-filename(nil t) It looks like that function can't be called before a dired function is properly set up, but dired-sort-toggle does so. I've now made dired-get-filename more robust again after the previous change to that function. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no