all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* dired-sort-menu dose not work in my GNU Emacs 23.2.1
@ 2011-07-18 14:45 David Young
  2011-07-18 14:55 ` David Young
  2011-07-18 14:59 ` Drew Adams
  0 siblings, 2 replies; 5+ messages in thread
From: David Young @ 2011-07-18 14:45 UTC (permalink / raw
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 414 bytes --]

I installed dired-sort-menu and dired-sort from EmacsWiki. But it seems that
dired-sort-menu does not work in my Emacs. I did not see the context-menu.
When I tried command dired-sort-menu-toggle-dirs-first or press 'b' in a
dired buffer, the following message appears

  call-interactively: Symbol's value as variable is void: ls-lisp-dirs-first

Could anyone have idea on this? Thanks in advance

-- 
M-x Thinks

[-- Attachment #2: Type: text/html, Size: 479 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dired-sort-menu dose not work in my GNU Emacs 23.2.1
  2011-07-18 14:45 dired-sort-menu dose not work in my GNU Emacs 23.2.1 David Young
@ 2011-07-18 14:55 ` David Young
  2011-07-18 16:40   ` Drew Adams
       [not found]   ` <mailman.812.1311007257.8699.help-gnu-emacs@gnu.org>
  2011-07-18 14:59 ` Drew Adams
  1 sibling, 2 replies; 5+ messages in thread
From: David Young @ 2011-07-18 14:55 UTC (permalink / raw
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 802 bytes --]

This could be the case. I installed a package named 'menu-bar%2b' from
'el-get' which does not work. Then I re-installed the 'menu-bar+' package
correctively, then 'Sort By' menu item appears in 'Single' menu. But it
still does not appear in the context menu, as shows in the dired-sort-menu
page.

2011/7/18 David Young <dove.young@gmail.com>

>
> I installed dired-sort-menu and dired-sort from EmacsWiki. But it seems
> that dired-sort-menu does not work in my Emacs. I did not see the
> context-menu. When I tried command dired-sort-menu-toggle-dirs-first or
> press 'b' in a dired buffer, the following message appears
>
>   call-interactively: Symbol's value as variable is void:
> ls-lisp-dirs-first
>
> Could anyone have idea on this? Thanks in advance
>
> --
> M-x Thinks
>
>


-- 
M-x Thinks

[-- Attachment #2: Type: text/html, Size: 1180 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: dired-sort-menu dose not work in my GNU Emacs 23.2.1
  2011-07-18 14:45 dired-sort-menu dose not work in my GNU Emacs 23.2.1 David Young
  2011-07-18 14:55 ` David Young
@ 2011-07-18 14:59 ` Drew Adams
  1 sibling, 0 replies; 5+ messages in thread
From: Drew Adams @ 2011-07-18 14:59 UTC (permalink / raw
  To: 'David Young', help-gnu-emacs

> I installed dired-sort-menu and dired-sort from EmacsWiki.
> But it seems that dired-sort-menu does not work in my Emacs.
> I did not see the context-menu. When I tried command
> dired-sort-menu-toggle-dirs-first or press 'b' in a dired
> buffer, the following message appears
>
> call-interactively:
> Symbol's value as variable is void: ls-lisp-dirs-first
>
> Could anyone have idea on this? Thanks in advance

What Emacs version are you using (`M-x emacs-version')?

`ls-lisp-dirs-first' is in library `ls-lisp.el', which is used by Emacs on MS
Windows.  It sounds like library ls-lisp was not loaded.  Are you on Windows?

Aside from the `S-mouse-2' context menu, for the moment, do you see a `Sort By'
submenu in menubar menu `Immediate' menu?




^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: dired-sort-menu dose not work in my GNU Emacs 23.2.1
  2011-07-18 14:55 ` David Young
@ 2011-07-18 16:40   ` Drew Adams
       [not found]   ` <mailman.812.1311007257.8699.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Drew Adams @ 2011-07-18 16:40 UTC (permalink / raw
  To: 'David Young', help-gnu-emacs

Communicated to me separately:

> I am on Ubuntu 11.04 . emacs-version shows the following
> GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4)
> of 2011-04-04 on rothera, modified by Debian

OK.  You are not on Windows.  So library `ls-lisp.el' is presumably not being
used (loaded).  This means that any code that assumes an `ls-lisp*' variable or
function is defined might raise an error.

> I installed a package named 'menu-bar%2b' from 'el-get'
> which does not work.

Which one does not work: el-get or Menu-bar+?
And what does "does not work" mean in this case?

> Then I re-installed the 'menu-bar+' package correctively, then
> 'Sort By' menu item appears in 'Single' menu.

Let's see if we can figure out what you did, since you didn't say...

* Library dired-sort-menu.el puts the `Sort By' submenu in the `Immediate' menu
(a vanilla Dired menu).

* Library dired+.el renames the `Immediate' menu to `Single'.  So it seems you
loaded this library too.

* Library menu-bar+.el should have no effect on the `Sort By' submenu.

* (Library dired-sort-menu+.el moves the `Sort By' submenu from the `Immediate'
menu to the `Subdir' (aka `Dir') menu.  So it seems you did not load this.  It's
not required - just mentioning it.)

It's usually better when trying to debug a problem to reduce the complexity by
not loading lots of stuff at once.  Try, for instance, loading only
`dired-sort-menu.el', and first get that working correctly before you add more
stuff.  Much easier to debug things yourself, and easier for others to help you.

> But it still does not appear in the context menu, as shows in the
dired-sort-menu page.

First, what about the error that you reported initially, "Symbol's value as
variable is void: ls-lisp-dirs-first"?  Do you still get that?

If so, I suspect that that is a bug in `dired-sort-menu.el'.  Please report it
to the author of that library - correspond with him about this, to get that
library working on its own, first.  

I believe that `ls-lisp-dirs-first' is available only on Windows, but the
`dired-sort-menu.el' code does not seem to protect non-Windows code adequately
in this regard.

Note that library `dired-sort-menu+.el' (note the `+') does protect its own
references to `ls-lisp-dirs-first' for non-Windows use.  But it first loads
`dired-sort-menu.el, which apparently does not seem to protect this variable in
all cases.

Second, can you use the `Sort By' submenu of menubar menu `Single'?  Do you see
a `Dirs First' menu item in that submenu?

My guess is that you can use that submenu _in general_, but that you do not have
a `Dirs First' menu item in it, because `ls-lisp-dirs-first' is not defined
(because you are not on MS Windows, so library `ls-lisp.el' is not used).  But
let us know the facts.

Third, wrt the popup menu, on `S-mouse-2': What happens when you do `C-h w
dired-sort-menu-popup'?  That will tell you whether the popup menu is bound to a
key.  It should be bound (in `dired-sort-menu.el') to `S-mouse-2'.  See also
what this says: `C-h k S-mouse-2', i.e., hold Shift and click the second mouse
button, after hitting `C-h k'.

But don't worry about the popup menu until you first get the menu working in the
menu bar.

Coming back to `ls-lisp-dirs-first' being unprotected in `dired-sort-menu.el'...
While waiting for a bug fix from the author:

1. What is the value of `dired-sort-menu-saved-config'?  If non-nil, try setting
it to nil:
(setq dired-sort-menu-saved-config nil)

Really, this option's definition should take care not to let users try to
customize the `Ls-Lisp Only' parts if they do not have `ls-lisp.el' loaded.
Perhaps you tried to do that; dunno.  Anyway, for now, try setting the option to
nil.

2. Try commenting out portions of `dired-sort-menu.el' that involve `ls-lisp-*'
code.  For example, in the definition of `dired-sort-menu' (the menu), these
lines:

 ["Ignore Case" dired-sort-menu-toggle-ignore-case :style toggle
    :selected ls-lisp-ignore-case :active t
    :help "Ignore case in alphanumeric sorting"
    ;; supported only by (Emacs 21) ls-lisp library and local dired:
    :visible (ls-lisp-var-p 'ls-lisp-ignore-case)]
["Dirs First" dired-sort-menu-toggle-dirs-first :style toggle
    :selected ls-lisp-dirs-first :active t
    :help "List subdirectories first [last if reversed]"
    ;; supported only by (Emacs 21) ls-lisp library and local dired:
    :visible (ls-lisp-var-p 'ls-lisp-dirs-first)]

Likewise, you can comment out the `ls-lisp' stuff in the definition of
`dired-sort-menu-saved-config', but for now just try setting that option to nil
(see above).

Dunno whether that will help, but it might get you past an initial hurdle.  My
guess is that some code in dired-sort-menu.el is trying at some point to
evaluate an undefined `ls-lisp*' variable, and that is causing your problems.

Don't forget to correspond with the author of `dired-sort-menu.el' about this.
I don't know that my guess is correct that there might be a bug here - check
with the author, Francis J. Wright.  Be sure to tell him what version of
dired-sort-menu.el you, use etc.  My guess is that there is a trivial fix, if in
fact there is a bug and not just operator error.

HTH.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dired-sort-menu dose not work in my GNU Emacs 23.2.1
       [not found]   ` <mailman.812.1311007257.8699.help-gnu-emacs@gnu.org>
@ 2011-07-21  0:49     ` Michael Heerdegen
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Heerdegen @ 2011-07-21  0:49 UTC (permalink / raw
  To: Emacs mailing list

Hi,

> First, what about the error that you reported initially, "Symbol's value as
> variable is void: ls-lisp-dirs-first"?  Do you still get that?
>
> If so, I suspect that that is a bug in `dired-sort-menu.el'.  Please report it
> to the author of that library - correspond with him about this, to get that
> library working on its own, first.  

I can acknowledge that this is a bug in `dired-sort-menu.el', I get the
same error.  This is the erroneous defun:

(defun dired-sort-menu-toggle-dirs-first ()
  "Toggle ls-lisp switch `ls-lisp-dirs-first' and update buffer."
  (interactive)
  (setq ls-lisp-dirs-first (not ls-lisp-dirs-first))
  (revert-buffer))

where `ls-lisp-dirs-first' is void when "ls-lisp" was not loaded before.

I won't report the bug, though, because I start into holidays tomorrow,
no time.


Regards,

Michael.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-21  0:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-18 14:45 dired-sort-menu dose not work in my GNU Emacs 23.2.1 David Young
2011-07-18 14:55 ` David Young
2011-07-18 16:40   ` Drew Adams
     [not found]   ` <mailman.812.1311007257.8699.help-gnu-emacs@gnu.org>
2011-07-21  0:49     ` Michael Heerdegen
2011-07-18 14:59 ` Drew Adams

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.