GNU bug report logs - #22255
25.1.50; directories not recognized if dired-actual-switches has: -lsh

Previous Next

Package: emacs;

Reported by: Tino Calancha <f92capac <at> gmail.com>

Date: Mon, 28 Dec 2015 09:24:01 UTC

Severity: normal

Found in version 25.1.50

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22255 in the body.
You can then email your comments to 22255 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#22255; Package emacs. (Mon, 28 Dec 2015 09:24:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tino Calancha <f92capac <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 28 Dec 2015 09:24:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <f92capac <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.50; directories not recognized if dired-actual-switches has: -lsh
Date: Mon, 28 Dec 2015 18:26:23 +0900 (JST)

dired-re-dir dont expect human readable format in the file system block size.
If we set dired-actual-switches -lsh, with gnu ls, diredp-next-dirline 
fails whenever the block size contains size units.

emacs -Q:

(let ((default "  15204787   4 drwxr-xr-x  2 user group   4096 Dec  28 17:53 .emacs.d")
      (human "  15204787 4.0K drwxr-xr-x  2 user group 4.0K Dec  28 17:53 .emacs.d"))
  (require 'dired)
  (if (string-match dired-re-dir default)
      (insert (format "default match dired-re-dir\n"))
    (insert (format "default DOESN'T match dired-re-dir\n")))
  (if (string-match dired-re-dir human)
    (insert (format "human match dired-re-dir\n"))
    (insert (format "human DOESN'T match dired-re-dir\n"))))
default match dired-re-dir
human DOESN'T match dired-re-dir

We may fix this modifying dired-re-inode-size to recognize human readable sizes.


In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.28)
 of 2015-11-28
Repository revision: c42ccd615081e12c97a55e778b488b3f4f5b22b7
Windowing system distributor 'The X.Org Foundation', version 11.0.11703000
System Description:	Debian GNU/Linux testing (stretch)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22255; Package emacs. (Tue, 28 Jun 2016 04:26:02 GMT) Full text and rfc822 format available.

Message #8 received at 22255 <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <f92capac <at> gmail.com>
To: 22255 <at> debbugs.gnu.org
Subject: 25.1.50; Dired: Handle dired-actual-switches: -lsh
Date: Tue, 28 Jun 2016 13:25:13 +0900 (JST)
emacs -Q ~
C-u s sh RET
;; Directories are not recognized: wrong fontification.
>
;;dired-next-dirline: No more subdirectories

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

From 9c9a3477bb53f24a12c82c86eb1edf269c4b3fac Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha <at> gmail.com>
Date: Tue, 28 Jun 2016 13:10:11 +0900
Subject: [PATCH] Handle human readable units in the file size

* lisp/dired.el (dired-re-inode-size): (Bug#22255).
---
 lisp/dired.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/dired.el b/lisp/dired.el
index 38979b5..d078478 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -303,7 +303,7 @@ dired-actual-switches

 (put 'dired-actual-switches 'safe-local-variable 'dired-safe-switches-p)

-(defvar dired-re-inode-size "[0-9 \t]*"
+(defvar dired-re-inode-size "[0-9  \t]*[.,0-9]*[BkKMGTPEZY]?[ \t]*"
   "Regexp for optional initial inode and file size as made by `ls -i 
-s'.")

 ;; These regexps must be tested at beginning-of-line, but are also
-- 
2.8.1


In GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6)
Repository revision: cfb3c61f1ffec9a6322407fdd228d5cc31c31ed0





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22255; Package emacs. (Tue, 28 Jun 2016 16:14:02 GMT) Full text and rfc822 format available.

Message #11 received at 22255 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tino Calancha <f92capac <at> gmail.com>
Cc: 22255 <at> debbugs.gnu.org
Subject: Re: bug#22255: 25.1.50; Dired: Handle dired-actual-switches: -lsh
Date: Tue, 28 Jun 2016 19:12:28 +0300
> From: Tino Calancha <f92capac <at> gmail.com>
> Date: Tue, 28 Jun 2016 13:25:13 +0900 (JST)
> 
> 
> emacs -Q ~
> C-u s sh RET
> ;; Directories are not recognized: wrong fontification.
> >
> ;;dired-next-dirline: No more subdirectories
> 
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> 
> >From 9c9a3477bb53f24a12c82c86eb1edf269c4b3fac Mon Sep 17 00:00:00 2001
> From: Tino Calancha <tino.calancha <at> gmail.com>
> Date: Tue, 28 Jun 2016 13:10:11 +0900
> Subject: [PATCH] Handle human readable units in the file size

Looks good to me, thanks.

> * lisp/dired.el (dired-re-inode-size): (Bug#22255).

Please provide a more descriptive log message, which actually
describes what and how is being changed.




Reply sent to Tino Calancha <tino.calancha <at> gmail.com>:
You have taken responsibility. (Wed, 29 Jun 2016 02:57:02 GMT) Full text and rfc822 format available.

Notification sent to Tino Calancha <f92capac <at> gmail.com>:
bug acknowledged by developer. (Wed, 29 Jun 2016 02:57:02 GMT) Full text and rfc822 format available.

Message #16 received at 22255-done <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: 22255-done <at> debbugs.gnu.org
Date: Wed, 29 Jun 2016 11:56:23 +0900 (JST)
Fixed in master branch updating 'dired-re-inode-size'




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 27 Jul 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 48 days ago.

Previous Next


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