From: Mark Oteiza <mvoteiza@udel.edu>
To: Juri Linkov <juri@linkov.net>
Cc: 19851@debbugs.gnu.org
Subject: bug#19851: 25.0.50; package-install-{file,from-buffer} broken
Date: Sat, 19 Dec 2015 14:21:20 -0500 [thread overview]
Message-ID: <20151219192120.GA5491@holos> (raw)
In-Reply-To: <87wpz5zyot.fsf@mail.linkov.net>
On 15/06/15 at 11:56pm, Juri Linkov wrote:
> > 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)
Could this patch be applied? I have been running with it for so long
that getting this bug again reminded me I forgot to apply it this last
time.
next prev parent reply other threads:[~2015-12-19 19:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-13 0:41 bug#19851: 25.0.50; package-install-{file,from-buffer} broken Mark Oteiza
2015-02-13 1:04 ` Mark Oteiza
2015-02-14 4:01 ` Stefan Monnier
2015-03-09 6:10 ` Mark Oteiza
2015-06-15 20:56 ` Juri Linkov
2015-06-15 23:27 ` Mark Oteiza
2015-12-19 19:21 ` Mark Oteiza [this message]
2015-12-22 0:15 ` Juri Linkov
2015-12-22 17:50 ` Mark Oteiza
2015-12-23 0:51 ` Juri Linkov
2015-12-23 16:28 ` Mark Oteiza
2015-12-23 18:12 ` Artur Malabarba
2016-08-06 20:34 ` npostavs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151219192120.GA5491@holos \
--to=mvoteiza@udel.edu \
--cc=19851@debbugs.gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).