GNU bug report logs -
#16477
24.3.50; [saveplace] symbol's function defn is void: dired-get-filename
Previous Next
Reported by: Mark Oteiza <mvoteiza <at> udel.edu>
Date: Fri, 17 Jan 2014 06:53:01 UTC
Severity: normal
Found in version 24.3.50
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16477 in the body.
You can then email your comments to 16477 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16477
; Package
emacs
.
(Fri, 17 Jan 2014 06:53:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mark Oteiza <mvoteiza <at> udel.edu>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 17 Jan 2014 06:53:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From emacs -Q:
(setq-default save-place t)
(require 'saveplace)
(eshell)
(kill-emacs)
Debugger entered--Lisp error: (void-function dired-get-filename)
dired-get-filename(nil t)
save-place-to-alist()
save-places-to-alist()
save-place-kill-emacs-hook()
kill-emacs()
eval((kill-emacs) nil)
eval-expression((kill-emacs) nil)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
of 2014-01-17 on holos
Repository revision:
Windowing system distributor `The X.Org Foundation', version 11.0.11500000
Configured using:
`configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --with-x-toolkit=lucid --with-xft
'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
--param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'
Important settings:
value of $LC_COLLATE: C
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: EShell
Minor modes in effect:
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
M-: M-( s e q <backspace> t q - d e f <tab> SPC s a
v e - p l a c t <backspace> <tab> SPC t <return> M-:
M-( r e q u i <tab> SPC ' s a v e p <tab> <return>
M-x e s h <tab> <return> C-x C-c M-x r e p o <tab>
r <tab> <return>
Recent messages:
Loading em-glob...done
Loading em-hist...done
Loading em-ls...done
Loading em-prompt...done
Loading em-script...done
Loading em-term...done
Loading em-unix...done
(No files need saving)
save-place-to-alist: Symbol's function definition is void: dired-get-filename
Making completion list...
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-mode em-unix em-term term disp-table easymenu
ehelp em-script em-prompt em-ls cl-loaddefs cl-lib em-hist em-pred
em-glob em-dirs em-cmpl em-basic em-banner em-alias pcomplete comint
ansi-color ring esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg
esh-groups eshell esh-module esh-mode esh-util saveplace eldoc help-fns
time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode prog-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind gfilenotify dynamic-setting
system-font-setting font-render-setting x-toolkit x multi-tty emacs)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16477
; Package
emacs
.
(Fri, 17 Jan 2014 08:04:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 16477 <at> debbugs.gnu.org (full text, mbox):
> (setq-default save-place t)
> (require 'saveplace)
> (eshell)
> (kill-emacs)
> Debugger entered--Lisp error: (void-function dired-get-filename)
> dired-get-filename(nil t)
> save-place-to-alist()
> save-places-to-alist()
> save-place-kill-emacs-hook()
> kill-emacs()
> eval((kill-emacs) nil)
> eval-expression((kill-emacs) nil)
> call-interactively(eval-expression nil nil)
> command-execute(eval-expression)
Thanks for the report. `eshell' sets the variable `dired-directory',
so we have to check if we are in dired mode as well:
=== modified file 'lisp/saveplace.el'
--- lisp/saveplace.el 2014-01-01 07:43:34 +0000
+++ lisp/saveplace.el 2014-01-17 08:01:20 +0000
@@ -152,7 +152,8 @@ (defun toggle-save-place (&optional parg
\(setq-default save-place t\)"
(interactive "P")
- (if (not (or buffer-file-name dired-directory))
+ (if (not (or buffer-file-name (and (derived-mode-p 'dired-mode)
+ dired-directory)))
(message "Buffer `%s' not visiting a file or directory" (buffer-name))
(if (and save-place (or (not parg) (<= parg 0)))
(progn
@@ -172,7 +173,8 @@ (defun save-place-to-alist ()
;; will be saved again when Emacs is killed.
(or save-place-loaded (load-save-place-alist-from-file))
(let ((item (or buffer-file-name
- (and dired-directory
+ (and (derived-mode-p 'dired-mode)
+ dired-directory
(if (consp dired-directory)
(expand-file-name (car dired-directory))
(expand-file-name dired-directory))))))
@@ -184,7 +186,8 @@ (defun save-place-to-alist ()
(position (cond ((eq major-mode 'hexl-mode)
(with-no-warnings
(1+ (hexl-current-address))))
- (dired-directory
+ ((and (derived-mode-p 'dired-mode)
+ dired-directory)
(let ((filename (dired-get-filename nil t)))
(if filename
`((dired-filename . ,filename))
@@ -301,7 +304,8 @@ (defun save-places-to-alist ()
(with-current-buffer (car buf-list)
;; save-place checks buffer-file-name too, but we can avoid
;; overhead of function call by checking here too.
- (and (or buffer-file-name dired-directory)
+ (and (or buffer-file-name (and (derived-mode-p 'dired-mode)
+ dired-directory))
(save-place-to-alist))
(setq buf-list (cdr buf-list))))))
@@ -321,9 +325,11 @@ (declare-function dired-goto-file "dired
(defun save-place-dired-hook ()
"Position the point in a dired buffer."
(or save-place-loaded (load-save-place-alist-from-file))
- (let ((cell (assoc (if (consp dired-directory)
- (expand-file-name (car dired-directory))
- (expand-file-name dired-directory))
+ (let ((cell (assoc (and (derived-mode-p 'dired-mode)
+ dired-directory
+ (if (consp dired-directory)
+ (expand-file-name (car dired-directory))
+ (expand-file-name dired-directory)))
save-place-alist)))
(if cell
(progn
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16477
; Package
emacs
.
(Fri, 17 Jan 2014 14:39:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 16477 <at> debbugs.gnu.org (full text, mbox):
> (if (consp dired-directory)
> (expand-file-name (car dired-directory))
> (expand-file-name dired-directory))))))
Unrelated, but couldn't resist:
(expand-file-name (if (consp dired-directory)
(car dired-directory)
dired-directory))))))
-- Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16477
; Package
emacs
.
(Sat, 18 Jan 2014 02:21:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 16477 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov wrote:
> `eshell' sets the variable `dired-directory'
Why does it do that?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16477
; Package
emacs
.
(Sun, 19 Jan 2014 03:03:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 16477 <at> debbugs.gnu.org (full text, mbox):
>> `eshell' sets the variable `dired-directory'
> Why does it do that?
Maybe it should use list-buffers-directory instead?
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16477
; Package
emacs
.
(Mon, 20 Jan 2014 08:57:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 16477 <at> debbugs.gnu.org (full text, mbox):
>> `eshell' sets the variable `dired-directory'
>
> Why does it do that?
Maybe some external packages rely on it to implement
closer integration with dired?
Reply sent
to
Juri Linkov <juri <at> jurta.org>
:
You have taken responsibility.
(Mon, 20 Jan 2014 08:57:05 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mark Oteiza <mvoteiza <at> udel.edu>
:
bug acknowledged by developer.
(Mon, 20 Jan 2014 08:57:07 GMT)
Full text and
rfc822 format available.
Message #25 received at 16477-done <at> debbugs.gnu.org (full text, mbox):
>>> `eshell' sets the variable `dired-directory'
>> Why does it do that?
>
> Maybe it should use list-buffers-directory instead?
Actually I see that eshell-mode sets both dired-directory
and list-buffers-directory, so it seems that authors of eshell
think both are necessary.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16477
; Package
emacs
.
(Mon, 20 Jan 2014 17:03:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 16477 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov wrote:
> Maybe some external packages rely on it to implement closer
> integration with dired?
Then why does no other part of Emacs set dired-directory, except for
dired itself? Eg M-x shell does not. It has no effect on M-x dired. I
imagine setting default-directory after cd does all that is necessary.
Since this is ancient code from the very first version of eshell,
personally I suspect it is simply a mistake.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16477
; Package
emacs
.
(Mon, 20 Jan 2014 18:20:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 16477 <at> debbugs.gnu.org (full text, mbox):
> Since this is ancient code from the very first version of eshell,
> personally I suspect it is simply a mistake.
Agreed,
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 18 Feb 2014 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 59 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.