From: Christopher Schmidt <christopher@ch.ristopher.com>
To: 6799@debbugs.gnu.org
Subject: bug#6799: 24.0.50; Please add dired-details.el to Emacs [patch]
Date: Mon, 11 Feb 2013 08:19:52 +0000 (GMT) [thread overview]
Message-ID: <87mwvbuus2@ch.ristopher.com> (raw)
In-Reply-To: <jwvk3qfil6p.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 10 Feb 2013 22:37:53 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> (forward-line arg)
>> + (while (and (progn
>> + (while (and (< arg 0)
>> + (bolp)
>> + (/= (1+ (point)) (point-max))
>> + (eq (get-text-property (1+ (point)) 'invisible)
>> + 'dired-hide-details-information))
>> + (forward-char -1))
>> + (invisible-p (point)))
>> + (let ((p (funcall (if (> arg 0)
>> + 'next-single-property-change
>> + 'previous-single-property-change)
>> + (point)
>> + 'invisible)))
>> + (when p
>> + (goto-char p)
>> + t))))
>> (dired-move-to-filename))
>
> What is this for?
dired-(next|previous)-line use (forward|backward)-line for point
movement. These functions ignore hidden lines and subsequent point
movement by the editing loop does not do the right thing when point
moves backwards over a hidden line.
(defvar use-case 0)
(with-selected-window
(or (get-buffer-window "*moose*")
(progn
(split-window-below)))
(switch-to-buffer (get-buffer-create "*moose*"))
(erase-buffer)
(insert "Header\n"
(propertize "Hidden\n" 'invisible t)
"Stuff")
(cl-ecase use-case
(0
(goto-char (point-min))
(forward-line 1))
(1
(goto-char (point-max))
(forward-line -1))
(2
(goto-char (point-min))
(next-line 1))
(3
(goto-char (point-max))
(next-line -1)))
(prog1 use-case
(setq use-case (% (1+ use-case) 4))))
Put that in scratch, eval the first form, eval the second form four
times in a row. Use case 1 does not work. The change you cited tries
to work around this problem in dired.
I do not know whether dired-(next|previous)-line should use
(next|previous)-line with nil-bound line-move-visual. AFAICT
(next|previous)-line do not do the right thing either.
>> + (if (derived-mode-p 'locate-mode)
>> + (setq dired-hide-details-mode nil)
>
> Could you explain why locate-mode needs such special treatment (here
> and in locate-mode-map)? I'm mostly worried here that maybe some
> other mode might require similar treatment.
The buffer generated by M-x locate RET does not contain any "details" to
hide. dired-hide-details-mode would be a no-op there.
Locate buffers are not real dired buffer. locate-mode is an independent
major mode whose keymap derives from dired-mode-map. locate runs
dired-mode-hook despite the current buffer not being derived from
dired-mode.
I think ignoring locate is better than complaining that
dired-hide-details-mode is enabled in a buffer that is not derived from
dired-mode.
I am not aware of any other mode that behaves that way.
Christopher
next prev parent reply other threads:[~2013-02-11 8:19 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-05 14:20 bug#6799: 24.0.50; Please add dired-details.el to Emacs [patch] Drew Adams
2011-01-28 23:08 ` Drew Adams
2011-03-13 3:28 ` Juanma Barranquero
2011-03-13 16:58 ` Drew Adams
2012-04-12 19:10 ` Lars Magne Ingebrigtsen
2012-04-12 20:05 ` Drew Adams
2012-04-25 15:46 ` Rob Giardina
2012-07-21 20:12 ` Drew Adams
2012-12-15 21:15 ` Christopher Schmidt
2012-12-15 22:17 ` Christopher Schmidt
2012-12-16 22:31 ` Stefan Monnier
2012-12-17 13:24 ` Christopher Schmidt
2013-02-10 15:02 ` Christopher Schmidt
2013-02-10 15:08 ` Christopher Schmidt
2013-02-11 3:37 ` Stefan Monnier
2013-02-11 8:19 ` Christopher Schmidt [this message]
2013-02-11 14:25 ` Stefan Monnier
2013-02-11 16:08 ` Christopher Schmidt
2013-02-11 17:58 ` Stefan Monnier
2013-02-11 18:07 ` Drew Adams
2013-02-11 19:52 ` Christopher Schmidt
2013-02-13 9:54 ` Christopher Schmidt
2013-02-15 15:25 ` Stefan Monnier
2013-02-15 18:44 ` Christopher Schmidt
2013-02-16 21:52 ` Juri Linkov
2013-02-16 22:58 ` Drew Adams
2013-02-17 10:05 ` Juri Linkov
2013-02-17 14:57 ` Christopher Schmidt
2013-02-18 9:49 ` Juri Linkov
2013-02-18 14:38 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mwvbuus2@ch.ristopher.com \
--to=christopher@ch.ristopher.com \
--cc=6799@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.