GNU bug report logs -
#19851
25.0.50; package-install-{file,from-buffer} broken
Previous Next
Reported by: Mark Oteiza <mvoteiza <at> udel.edu>
Date: Fri, 13 Feb 2015 00:42:02 UTC
Severity: normal
Tags: fixed
Found in version 25.0.50
Fixed in version 26.1
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Juri Linkov <juri <at> linkov.net> writes:
>> Found it. It is from using package-install-file on a directory while
>> saveplace is enabled. Saveplace gets stuck. From emacs -Q:
>>
>> 1. mkdir /some/new/dir
>> 2. Evaluate:
>>
>> (setq-default save-place t)
>> (require 'saveplace)
>> (package-initialize)
>>
>> 3. M-x package-install-file RET /some/new/dir RET
>>
>> "dired-current-directory: No subdir-alist in *temp*"
>>
>> In order to quit emacs, one has to hack around kill-emacs-hook.
>
> Does this patch fix it for you?
>
> diff --git a/lisp/saveplace.el b/lisp/saveplace.el
> index fe54743..5bbcd79 100644
> --- a/lisp/saveplace.el
> +++ b/lisp/saveplace.el
> @@ -158,6 +158,8 @@ (defun toggle-save-place (&optional parg) ;FIXME: save-place-local-mode!
> \(setq-default save-place t)"
> (interactive "P")
> (if (not (or buffer-file-name (and (derived-mode-p 'dired-mode)
> + (boundp 'dired-subdir-alist)
> + dired-subdir-alist
> (dired-current-directory))))
> (message "Buffer `%s' not visiting a file or directory" (buffer-name))
> (setq save-place (if parg
> @@ -178,6 +180,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* ((directory (and (derived-mode-p 'dired-mode)
> + (boundp 'dired-subdir-alist)
> + dired-subdir-alist
> (dired-current-directory)))
> (item (or buffer-file-name
> (and directory
> @@ -310,6 +314,8 @@ (defun save-places-to-alist ()
> ;; save-place checks buffer-file-name too, but we can avoid
> ;; overhead of function call by checking here too.
> (and (or buffer-file-name (and (derived-mode-p 'dired-mode)
> + (boundp 'dired-subdir-alist)
> + dired-subdir-alist
> (dired-current-directory)))
> (save-place-to-alist))
> (setq buf-list (cdr buf-list))))))
> @@ -331,6 +337,8 @@ (defun save-place-dired-hook ()
> "Position the point in a Dired buffer."
> (or save-place-loaded (load-save-place-alist-from-file))
> (let* ((directory (and (derived-mode-p 'dired-mode)
> + (boundp 'dired-subdir-alist)
> + dired-subdir-alist
> (dired-current-directory)))
> (cell (assoc (and directory
> (expand-file-name (if (consp directory)
Yes, thank you.
Though, with the recipe I gave here, I get again a trace like what I
pasted when opening with bug. This appears to be because "pkg-desc" in
package-install-from-buffer() is nil, so then
(package-desc-name nil) is an error
This bug report was last modified 8 years and 171 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.