From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#14914: bug#15799: 24.3.50; dired-hide-details-mode: Provide default key binding Date: Mon, 4 Nov 2013 09:35:50 -0800 (PST) Message-ID: <8b3b095a-02b4-4e25-87b4-3db926df40e3@default> References: <87fvrc8u5y.fsf@gmail.com> <51c48394-b3ae-4403-bad7-00f62f85cfb9@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1383586645 24235 80.91.229.3 (4 Nov 2013 17:37:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Nov 2013 17:37:25 +0000 (UTC) Cc: 15799@debbugs.gnu.org, 14914@debbugs.gnu.org, Jambunathan K To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 04 18:37:28 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VdO5c-0007SN-0k for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Nov 2013 18:37:24 +0100 Original-Received: from localhost ([::1]:51250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdO5b-0004oT-KP for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Nov 2013 12:37:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdO5P-0004mO-5R for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2013 12:37:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdO5G-0004n8-DY for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2013 12:37:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdO5G-0004n1-BE for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2013 12:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VdO5F-0000ut-MV for bug-gnu-emacs@gnu.org; Mon, 04 Nov 2013 12:37:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Nov 2013 17:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14914 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14914-submit@debbugs.gnu.org id=B14914.13835865643445 (code B ref 14914); Mon, 04 Nov 2013 17:37:01 +0000 Original-Received: (at 14914) by debbugs.gnu.org; 4 Nov 2013 17:36:04 +0000 Original-Received: from localhost ([127.0.0.1]:34443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VdO4I-0000tJ-OY for submit@debbugs.gnu.org; Mon, 04 Nov 2013 12:36:03 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:32055) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VdO4E-0000sT-OW; Mon, 04 Nov 2013 12:35:59 -0500 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rA4HZpcf012377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 4 Nov 2013 17:35:52 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rA4HZoSC009955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Nov 2013 17:35:51 GMT Original-Received: from abhmt107.oracle.com (abhmt107.oracle.com [141.146.116.59]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rA4HZomc023725; Mon, 4 Nov 2013 17:35:50 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79982 Archived-At: > Thanks. For #14914, there's no doubt for me that we should use > a "[=E2=9C=93] Hide details" menu entry. Sounds good to me (except it should be title case: `Hide Details'). > >> Also, wouldn't it make sense to try and bring hide-details > >> "closer" to the dired-omit facilities? > > > > Definitely not. No relation. Completely different uses. >=20 > Of course, they're different, but I assume the @ was chosen because > it's also used for things like outline-minor-mode, i.e. for other > features that hide parts of the buffer. `@' was proposed by Jambunathan, not I. I have no special objection to `@' instead of `(', however. But I'm not convinced that it is good to confuse hiding stuff in Dired with outline-minor-mode hiding. > So, maybe @ should be a prefix key for "hiding stuff", in which we > can place key bindings for "omit" and for "details". I don't object to that. As long as the two, hiding columns and hiding rows, are kept clear and separate, no problem. But there is really more to it than that. There are at least these hide/show commands in Dired: $ (`dired-hide-subdir') M-$ (`dired-hide-all') ( (`dired-hide-details-mode') M-o (`dired-omit-mode') It is good that each of these is quick, but yes, we could put them all on a prefix key. In that case, `M-o', `M-$', and `$' are also good candidates for the prefix key. We could have, for example: M-o s (`dired-hide-subdir') - `s' for subdi M-o S (`dired-hide-all') - `S' for subdirs M-o c (`dired-hide-details-mode') - `c' for columns M-o r (`dired-omit-mode') - `r' for rows No Shift key needed for them, except for the one that boosts `s'. FWIW, Dired+ adds these commands, which could also be added to the list, perhaps with these bindings: M-o m (`diredp-omit-marked') - `m' for marked M-o u (`diredp-omit-unmarked') - `u' for unmarked Here are their (trivial) definitions: (defun diredp-omit-marked () "Omit lines of marked files. Return the number of lines omitted." (interactive) (let ((old-modified-p (buffer-modified-p)) count) (when (interactive-p) (message "Omitting marked lines...")) (setq count (dired-do-kill-lines nil "Omitted %d line%s.")) (set-buffer-modified-p old-modified-p) ; So no `%*' appear in mode-line= . count)) (defun diredp-omit-unmarked () "Omit lines of unmarked files. Return the number of lines omitted." (interactive) (let ((old-modified-p (buffer-modified-p)) count) (dired-toggle-marks) (message "Omitting unmarked lines...") (setq count (diredp-omit-marked)) (dired-toggle-marks) ; Marks all except `.', `..' (set-buffer-modified-p old-modified-p) ; So no `%*' appear in mode-line= . count))