From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: dired listg & dired-sort-menu.el Date: Fri, 21 Jun 2013 14:08:56 -0700 (PDT) Message-ID: <55519210-5f13-43b5-b6ff-396fd1f4769c@default> References: <8761xc50qi.fsf@newsguy.com> <403b022b-f534-491a-a40c-cec5bfbdcf8e@default> <87bo6zqmwf.fsf@newsguy.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1371848957 11135 80.91.229.3 (21 Jun 2013 21:09:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Jun 2013 21:09:17 +0000 (UTC) To: Harry Putnam , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 21 23:09:18 2013 Return-path: Envelope-to: geh-help-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 1Uq8a1-0007i7-St for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Jun 2013 23:09:14 +0200 Original-Received: from localhost ([::1]:37162 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uq8a1-0008Jg-BA for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Jun 2013 17:09:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uq8Zq-0008I8-Gv for help-gnu-emacs@gnu.org; Fri, 21 Jun 2013 17:09:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uq8Zo-0001IZ-Ny for help-gnu-emacs@gnu.org; Fri, 21 Jun 2013 17:09:02 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:26942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uq8Zo-0001IL-J5 for help-gnu-emacs@gnu.org; Fri, 21 Jun 2013 17:09:00 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r5LL8wrl015233 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 21 Jun 2013 21:08:59 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r5LL8vHT010329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Jun 2013 21:08:58 GMT Original-Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r5LL8vK4010325; Fri, 21 Jun 2013 21:08:57 GMT In-Reply-To: <87bo6zqmwf.fsf@newsguy.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7 (607090) [OL 12.0.6668.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91659 Archived-At: > What I'm really after is a way to have 2 things extra going on in the > regular dired buffer. > 1) hide dot files > 2) sort directories first. >=20 > The menu on your pages on the wiki > http://www.emacswiki.org/emacs/DrewsEmacsDiredSortMenu > show a menu with an item > "Dirs first (W)" > so that is what got me looking at that program. That menu item is from dired-sort-menu+.el, which is an add-on to dired-sor= t-menu.el. Both files are available on Emacs Wiki: http://www.emacswiki.org/emacs-en/download/dired-sort-menu.el http://www.emacswiki.org/emacs-en/download/dired-sort-menu%2b.el=20 > I had already googled up code to hide dot files Yes, Dired Omit is good for that. But `dired-omit-mode' is the supported na= me now, instead of `dired-omit-files-p'. It is probably better to use this= to turn it on, instead of just setting the mode variable: (dired-omit-mode 1) You can also toggle omit mode interactively, using `M-o'. > and a setq to list dirs first You don't need that if you use dired-sort-menu[+].el. > but with them both in ~/.emacs the hiding dot files part gets canceled > out...=20 It shouldn't. > so I was thinking maybe getting your program in there might > solve that. >=20 > Getting back to subject. I've posted three images, now that I broke > out of the idiocy veil. > 1) menu produced by S-Mouse-2 > 2) Menu produced by Menu / Immediate / Sort by > 3) Menu posted on webpages. >=20 > You'll see that even though the first two pop up with a little > different look, they seem to contain the same items. >=20 > Whereas, the menu from your wikipages (The bottom image), have two > different items.... `Ignore Case' and `Dirs First' See above - you need (require 'dired-sort-menu+) > www.jtan.com/~reader/vu1/disp.cgi > (Should produce 3 stacked images in the order shown above) >=20 > But to repeat my reason for query... In my default dired view I want > to have dot files hidden and Dirs sorted first... but be able to > toggle dot files. Should just work. You toggle omit mode with `M-o'. > Hide dot files > (require 'dired-x) > (setq-default dired-omit-files-p t) > (setq dired-omit-files (concat dired-omit-files "\\|^\\..+$")) OK. > Sort directories first > (setq dired-listing-switches "-lXGh --group-directories-first") Not needed, but might also work (depending on your platform etc.), as an al= ternative to Dired Sort Menu. (FWIW, it doesn't work for me, on Windows wi= th Cygwin.)