all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Dired & small files on FreeBSD
@ 2005-07-19 20:56 Eduardo Muñoz
  0 siblings, 0 replies; only message in thread
From: Eduardo Muñoz @ 2005-07-19 20:56 UTC (permalink / raw)




Using dired-listing-switches with a value like "-lh" on
FreeBSD results in an output like the following: 

  -rw-------   1 emf  emf   6.2K Jul 19 22:13 .bash_history
  -rw-r--r--   1 emf  emf   174B Nov 25  2001 .bash_logout
  -rw-r--r--   1 emf  emf   551B Jul  5 22:54 .bash_profile

as you can see small files (under 1K) display sizes with a
'B' suffix. As a consecuence those files cant be selected by
dired and instead an error ("No file on this line") is
signaled. The following patch fixes this behaviour.


$ diff -uF '^(def*' dired.el~ dired.el
--- dired.el~   Tue Jul 19 22:41:41 2005
+++ dired.el    Tue Jul 19 22:42:49 2005
@@ -1870,7 +1870,7 @@ (defvar dired-move-to-filename-regexp
         ;; The ".*" below finds the last match if there are multiple matches.
         ;; This avoids recognizing `jservice  10  1024' as a date in the line:
         ;; drwxr-xr-x  3 jservice  10  1024 Jul  2  1997 esg-host
-    (concat ".*[0-9][kKMGTPEZY]?" s
+    (concat ".*[0-9][BkKMGTPEZY]?" s
            "\\(" western "\\|" western-comma "\\|" japanese "\\|" iso "\\)"
            s "+"))
   "Regular expression to match up to the file name in a directory listing.



-- 
Eduardo Muñoz          | (prog () 10 (print "Hello world!")
http://213.97.131.125/ |          20 (go 10))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-19 20:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-19 20:56 Dired & small files on FreeBSD Eduardo Muñoz

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.