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-sort-menu fails Date: Mon, 29 Sep 2014 21:42:51 -0700 (PDT) Message-ID: <780a6d3a-e217-4b34-bc2f-4a0d7b3b5a85@default> References: <5429D68E.8060903@yahoo.de> 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 1412052218 1466 80.91.229.3 (30 Sep 2014 04:43:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Sep 2014 04:43:38 +0000 (UTC) To: Zeitlinie , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 30 06:43:31 2014 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 1XYpHd-000574-Vq for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Sep 2014 06:43:30 +0200 Original-Received: from localhost ([::1]:40564 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYpHd-0001Uk-K4 for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Sep 2014 00:43:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYpHK-0001UG-A8 for help-gnu-emacs@gnu.org; Tue, 30 Sep 2014 00:43:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYpHA-0005Qy-6D for help-gnu-emacs@gnu.org; Tue, 30 Sep 2014 00:43:10 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:48323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYpH9-0005QN-Vy for help-gnu-emacs@gnu.org; Tue, 30 Sep 2014 00:43:00 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s8U4gq6d021714 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Sep 2014 04:42:53 GMT Original-Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s8U4goa4029998 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Sep 2014 04:42:50 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s8U4gnOl029966; Tue, 30 Sep 2014 04:42:50 GMT In-Reply-To: <5429D68E.8060903@yahoo.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] 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:100179 Archived-At: > trying to sort directory listings in a dired+ buffer using > dired-sort-menu fails in multiple ways for me: >=20 > 1) while the doc states that the =E2=80=98dired-sort-menu=E2=80=99 popup = menu would > be bound to S-mouse-2, for me S-mouse-2 will always open the file under > the cursor in the dired listing and no popup menu shows up. What version of dired-sort-menu.el do you have? I have version 2001.07.26, which has a Time-stamp of <26 July 2001>. In it I see this:=20 ;; Popup menu on "Shift Mouse 2": (define-key=09=09=09=09; (keymap key def) dired-mode-map [S-down-mouse-2] 'dired-sort-menu-popup) Do you have that? If so, then probably something else in your setup is overriding that key binding. What does `C-h k S-mouse-2' tell you in Dired? Have you tried starting Emacs without your init file: emacs -Q. then putting dired-sort-menu.el and dired-sort-menu+.el in your `load-path', and then loading dired-sort-menu+.el? Is S-mouse-2 still not popping up the menu in that case? Does it make any difference whether you change the value of option `dired-sort-dialogue-own-frame'? I don't think it should, but it might be worth seeing whether that is involved. But see below - I think your S-mouse-2 problem is simply that you did not require library dired-sort-menu[*].el. > 2) When invoking the dired-sort-dialog with 'M-x dired-sort-dialog' > I do get a an emacs widget library window, which allows me to request > for various sorting options via mouse clicks, but for all of such > requests the listing of the (hopefully?) sorted directories will > not display, instead it fails with: >=20 > insert-directory: Listing directory failed but `access-file' worked >=20 > upon which the dired buffer window turns empty That's a real problem. Do `C-h f insert-directory' to see what file it is defined in (see next, but the answer is probably files.el). Then load that source file (not *.elc). E.g., `M-x load-library files.el' (don't forget the .el). Then do `M-x debug-on-entry' and try again to provoke the error. When the debugger opens, do `e' followed by `file', to see what the value of arg FILE is. You can quit the debugger with `q', unless you want to try to step through it (using `d', and `c' if you don't care to step through some part of it). The error means that the program that is the value of variable `insert-directory-program', which is probably "ls", failed, signalling an error. What is your value of that variable? If you do step through the debugger, the most important thing to watch is what happens to local variable `result': what value it is given. And you can see what error message is returned by `insert-directory-program'. To understand more about what went wrong, you will probably need to step through the debugger. When doing that, keep a copy of the source code, opened to show the definition of `insert-directory', so you can easily follow along. [Are you using library `files+.el'? It has a slightly different version of `insert-directory'. The difference should not make a difference here, but it's good to know what code you are dealing with.] > 3) After playing around for some time I found out, that I can > actually get a popup menu to show up on S-mouse-2, however only > if I open a sorting dialog widget window at least once using > 'M-x dired-sort-dialog' before trying to use S-mouse-2 That's because `dired-sort-dialog' has an autoload cookie. When you invoke it, library `dires-sort-menu.el' gets loaded, binding `S-mouse-2'. This indicates that you did not in fact load library dired-sort-menu beforehand. If you want `S-mouse-2' to be bound from the outset in Dired, then you need to load that library. Put (require 'dired-sort-menu) in your init file. Or if you use also dired-sort-menu+.el, then require that instead - it will require dired-sort-menu.el. > Any help, in particular on point 2) would be most appreciated Yes, #2 indicates a problem with your `ls' command (or whatever program is bound to `insert-directory-program'. That's clearly the most serious problem you describe. Try some of what I suggested. Probably the most important thing is to try starting from `emacs -Q', and eliminating extra code. Try, for example, with only dired-sort-menu.el, not dired+.el or dired-sort-menu+.el, for now. If you see the same problem then we can concentrate on just dired-sort-menu.el. You can follow up with me off list if you like, unless someone else here has a suggestion.