unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: 6799@debbugs.gnu.org
Subject: bug#6799: 24.0.50; Please add dired-details.el to Emacs [patch]
Date: Fri, 15 Feb 2013 10:25:50 -0500	[thread overview]
Message-ID: <jwvfw0x1ut1.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87ehgm7hmx@ch.ristopher.com>

> dired-hide-details-mode also hides full lines other than header and
> file/directory lines.  This includes the informational line right after
> the header line.
>     /my/directory:
>     total used in directory 1M available 1.0G  <--
>     drwx------  2 me me 4.0K Feb 11 17:35 file

Is that the only full line that it hides, or are there others?

> Apply the patch, revert all hunks to dired-(next|previous)-line and move
> point around the first lines of a dired buffer with hidden details.  Use
> C-n and C-p for point movement.

AFAICT, the resulting behavior (when replacing dired-next-line's body
with forward-line plus dired-move-to-filename) is slightly suboptimal,
but only for that one "hidden usage line" at the top, and even then it's
nothing too terrible.

Thinking of how to "fix it right", I think we'd need to introduce
something like a point-adjustment-function which dired-next-line could
set, and would take a "direction" argument.  So keyboard.c's
adjust_point_for_property would call this function after
adjusting point.  But it seems difficult to introduce such a thing in
a robust way:
- We could have it as a variable, which gets cleared before running the
  next command, but then dired-next-line should only set it when called
  interactively (otherwise if the caller calls dired-next-line within,
  say, a save-excursion, you'd get surprising side-effects).
- We could have it as a property on the `dired-next-line' symbol, but
  then we get the reverse problem, that a wrapper command that just
  calls dired-next-line and not much else would fail to get this part of
  dired-next-line's behavior.

Maybe a cleaner solution is to export keyboard.c's
adjust_point_for_property to Elisp so that dired-next-line can call
it explicitly (to replace your "(while (and (invisible-p (point))) ...)"
loop).


        Stefan





  parent reply	other threads:[~2013-02-15 15:25 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
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvfw0x1ut1.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).