GNU bug report logs -
#8131
24.0.50; dired-do-redisplay applies unwanted mark to file/dir line
Previous Next
Full log
Message #8 received at 8131 <at> debbugs.gnu.org (full text, mbox):
On Fri, 18 Feb 2011 16:47:39 +0800 jidanni <at> jidanni.org wrote:
> M runs the command dired-do-chmod, which is an interactive compiled
> Lisp function in `dired-aux.el'.
>
> However, if you forget to give it a mode, and just type RET, before long
> your dired will look like
>
> drwxr-xr-x 3 jidanni 4096 Feb 18 16:44 .
> drwxr-xr-x 94 jidanni 12288 Feb 18 15:06 ..
> -rwxr-xr-x 1 jidanni 635 Jan 21 20:01 Email_Addresses.pl
> -rw-r--r-- 1 jidanni 1287 Feb 18 16:39 Makefile
> b -rw-r--r-- 1 jidanni 2750 Nov 27 2009 b3
> drwxr-xr-x 2 jidanni 4096 Jul 22 2010 dropping
> j -rw-r--r-- 1 jidanni 1190 Nov 27 2009 jj
> -rw-r--r-- 1 jidanni 5084 Nov 27 2009 nam
> u -rw-r--r-- 1 jidanni 9540 Feb 18 16:44 u.htm
>
> with the first letter of the file appearing before the line.
On Sun, 27 Feb 2011 00:08:13 -0800 (PST) John Peters <kennedywildwood <at> yahoo.com> wrote:
> Dear Friends:
>
> Recent breakage in dired-do-redisplay, manifests in Fedora 13 and Mac OS
> X. File or dir line acquires an unexpected mark which appears to be the name's first letter.
>
> Failure recipe: (Fedora 13, Emacs bzr-103433)
>
> emacs -Q --eval='(progn (write-file (make-temp-file "FOO"))(require
> (quote dired)) (dired-jump) (dired-do-redisplay))'
>
> will apply "F" mark to the file line.
I believe both of these bugs are due to this change:
2010-11-09 Glenn Morris <rgm <at> gnu.org>
[...]
* dired-aux.el (dired-kill-line, dired-do-kill-lines)
(dired-update-file-line, dired-add-entry, dired-remove-entry)
(dired-relist-entry):
[...]
Replace yet more uses of end-of-line etc with line-end-position, etc.
Here is a fix:
*** /data/steve/bzr/emacs/trunk/lisp/dired-aux.el 2011-02-23 15:11:01.000000000 +0100
--- /data/steve/bzr/emacs/quickfixes/lisp/dired-aux.el 2011-02-27 20:45:45.000000000 +0100
***************
*** 1025,1033 ****
;; Keeps any marks that may be present in column one (doing this
;; here is faster than with dired-add-entry's optional arg).
;; Does not update other dired buffers. Use dired-relist-entry for that.
! (let ((char (following-char))
! (opoint (line-beginning-position))
! (buffer-read-only))
(delete-region opoint (progn (forward-line 1) (point)))
(if file
(progn
--- 1025,1033 ----
;; Keeps any marks that may be present in column one (doing this
;; here is faster than with dired-add-entry's optional arg).
;; Does not update other dired buffers. Use dired-relist-entry for that.
! (let* ((opoint (line-beginning-position))
! (char (char-after opoint))
! (buffer-read-only))
(delete-region opoint (progn (forward-line 1) (point)))
(if file
(progn
Steve Berman
This bug report was last modified 14 years and 83 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.