* bug#19851: 25.0.50; package-install-{file,from-buffer} broken
@ 2015-02-13 0:41 Mark Oteiza
2015-02-13 1:04 ` Mark Oteiza
0 siblings, 1 reply; 13+ messages in thread
From: Mark Oteiza @ 2015-02-13 0:41 UTC (permalink / raw)
To: 19851
In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
of 2015-02-12 on logos
Repository revision: e39d96ebe4c342885433afc28232197ce398fe71
Hi,
These functions are broken on master. For instance,
1. ~ $ git clone http://mumble.net/~campbell/git/paredit.git
2. emacs -Q
3. M-x package-install-file RET ~/paredit RET
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
package-install-from-buffer()
package-install-file("~/paredit/")
funcall-interactively(package-install-file "~/paredit/")
call-interactively(package-install-file record nil)
command-execute(package-install-file record)
execute-extended-command(nil "package-install-file" "package-install-fi")
funcall-interactively(execute-extended-command nil "package-install-file" "package-install-fi")
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19851: 25.0.50; package-install-{file,from-buffer} broken
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
0 siblings, 2 replies; 13+ messages in thread
From: Mark Oteiza @ 2015-02-13 1:04 UTC (permalink / raw)
To: 19851
On 12/02/15 at 07:41pm, Mark Oteiza wrote:
>
> In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
> of 2015-02-12 on logos
> Repository revision: e39d96ebe4c342885433afc28232197ce398fe71
>
> Hi,
>
> These functions are broken on master. For instance,
>
> 1. ~ $ git clone http://mumble.net/~campbell/git/paredit.git
> 2. emacs -Q
> 3. M-x package-install-file RET ~/paredit RET
>
> Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
> package-install-from-buffer()
> package-install-file("~/paredit/")
> funcall-interactively(package-install-file "~/paredit/")
> call-interactively(package-install-file record nil)
> command-execute(package-install-file record)
> execute-extended-command(nil "package-install-file" "package-install-fi")
> funcall-interactively(execute-extended-command nil "package-install-file" "package-install-fi")
> call-interactively(execute-extended-command nil nil)
> command-execute(execute-extended-command)
Nevermind, I think this is invalid--misleading at least. A better error
message would be good.
paredit just does not have a valid Version: header. Even after fixing
it, I was also getting a message like "no subdir alist in *temp*", but
I haven't pinned down the origin of that.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19851: 25.0.50; package-install-{file,from-buffer} broken
2015-02-13 1:04 ` Mark Oteiza
@ 2015-02-14 4:01 ` Stefan Monnier
2015-03-09 6:10 ` Mark Oteiza
1 sibling, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2015-02-14 4:01 UTC (permalink / raw)
To: Mark Oteiza; +Cc: 19851
> Nevermind, I think this is invalid--misleading at least. A better error
> message would be good.
Maybe package.el could/should take some of the code from
elpa/admin/archive-contents.el, since I think I've been a bit more
careful about error reporting there.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19851: 25.0.50; package-install-{file,from-buffer} broken
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
1 sibling, 1 reply; 13+ messages in thread
From: Mark Oteiza @ 2015-03-09 6:10 UTC (permalink / raw)
To: 19851
On 12/02/15 at 08:04pm, Mark Oteiza wrote:
> Nevermind, I think this is invalid--misleading at least. A better error
> message would be good.
>
> paredit just does not have a valid Version: header. Even after fixing
> it, I was also getting a message like "no subdir alist in *temp*", but
> I haven't pinned down the origin of that.
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19851: 25.0.50; package-install-{file,from-buffer} broken
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
0 siblings, 2 replies; 13+ messages in thread
From: Juri Linkov @ 2015-06-15 20:56 UTC (permalink / raw)
To: Mark Oteiza; +Cc: 19851
> 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)
^ permalink raw reply related [flat|nested] 13+ messages in thread
* bug#19851: 25.0.50; package-install-{file,from-buffer} broken
2015-06-15 20:56 ` Juri Linkov
@ 2015-06-15 23:27 ` Mark Oteiza
2015-12-19 19:21 ` Mark Oteiza
1 sibling, 0 replies; 13+ messages in thread
From: Mark Oteiza @ 2015-06-15 23:27 UTC (permalink / raw)
To: 19851
Juri Linkov <juri@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
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19851: 25.0.50; package-install-{file,from-buffer} broken
2015-06-15 20:56 ` Juri Linkov
2015-06-15 23:27 ` Mark Oteiza
@ 2015-12-19 19:21 ` Mark Oteiza
2015-12-22 0:15 ` Juri Linkov
1 sibling, 1 reply; 13+ messages in thread
From: Mark Oteiza @ 2015-12-19 19:21 UTC (permalink / raw)
To: Juri Linkov; +Cc: 19851
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19851: 25.0.50; package-install-{file,from-buffer} broken
2015-12-19 19:21 ` Mark Oteiza
@ 2015-12-22 0:15 ` Juri Linkov
2015-12-22 17:50 ` Mark Oteiza
0 siblings, 1 reply; 13+ messages in thread
From: Juri Linkov @ 2015-12-22 0:15 UTC (permalink / raw)
To: Mark Oteiza; +Cc: 19851
> 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.
Thanks for the reminder, now fixed in emacs-25. Could this report be closed,
or there is another bug too?
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19851: 25.0.50; package-install-{file,from-buffer} broken
2015-12-22 0:15 ` Juri Linkov
@ 2015-12-22 17:50 ` Mark Oteiza
2015-12-23 0:51 ` Juri Linkov
0 siblings, 1 reply; 13+ messages in thread
From: Mark Oteiza @ 2015-12-22 17:50 UTC (permalink / raw)
To: Juri Linkov; +Cc: 19851
On 22/12/15 at 02:15am, Juri Linkov wrote:
> > 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.
>
> Thanks for the reminder, now fixed in emacs-25.
Thank you.
> Could this report be closed, or there is another bug too?
A bug remains:
1. mkdir /tmp/foo
2. Evaluate:
(save-place-mode)
(package-initialize)
3. M-x package-install-file RET /tmp/foo RET
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
package-install-from-buffer()
package-install-file("/tmp/foo")
funcall-interactively(package-install-file "/tmp/foo")
call-interactively(package-install-file record nil)
command-execute(package-install-file record)
execute-extended-command(nil "package-install-file" nil)
funcall-interactively(execute-extended-command nil "package-install-file" nil)
call-interactively(execute-extended-command nil nil)
command-execute(execute-extended-command)
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19851: 25.0.50; package-install-{file,from-buffer} broken
2015-12-22 17:50 ` Mark Oteiza
@ 2015-12-23 0:51 ` Juri Linkov
2015-12-23 16:28 ` Mark Oteiza
0 siblings, 1 reply; 13+ messages in thread
From: Juri Linkov @ 2015-12-23 0:51 UTC (permalink / raw)
To: Mark Oteiza; +Cc: 19851
> A bug remains:
>
> 1. mkdir /tmp/foo
> 2. Evaluate:
>
> (save-place-mode)
> (package-initialize)
Do you see the same bug without using save-place-mode?
> 3. M-x package-install-file RET /tmp/foo RET
I wonder why are you trying yo install a package from the empty directory?
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19851: 25.0.50; package-install-{file,from-buffer} broken
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
0 siblings, 2 replies; 13+ messages in thread
From: Mark Oteiza @ 2015-12-23 16:28 UTC (permalink / raw)
To: Juri Linkov; +Cc: 19851
On 23/12/15 at 02:51am, Juri Linkov wrote:
> > A bug remains:
> >
> > 1. mkdir /tmp/foo
> > 2. Evaluate:
> >
> > (save-place-mode)
> > (package-initialize)
>
> Do you see the same bug without using save-place-mode?
Oh, of course. Woops.
> > 3. M-x package-install-file RET /tmp/foo RET
>
> I wonder why are you trying yo install a package from the empty directory?
Just trying to break things is all.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19851: 25.0.50; package-install-{file,from-buffer} broken
2015-12-23 16:28 ` Mark Oteiza
@ 2015-12-23 18:12 ` Artur Malabarba
2016-08-06 20:34 ` npostavs
1 sibling, 0 replies; 13+ messages in thread
From: Artur Malabarba @ 2015-12-23 18:12 UTC (permalink / raw)
To: Mark Oteiza; +Cc: 19851, Juri Linkov
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
Yes. We should definitely have a better error message when that function is
invoked wrongly.
Things like "no .el files in this directory" or "this file lacks a version
header".
[-- Attachment #2: Type: text/html, Size: 219 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#19851: 25.0.50; package-install-{file,from-buffer} broken
2015-12-23 16:28 ` Mark Oteiza
2015-12-23 18:12 ` Artur Malabarba
@ 2016-08-06 20:34 ` npostavs
1 sibling, 0 replies; 13+ messages in thread
From: npostavs @ 2016-08-06 20:34 UTC (permalink / raw)
To: Mark Oteiza; +Cc: 19851, Juri Linkov
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]
Mark Oteiza <mvoteiza@udel.edu> writes:
> On 23/12/15 at 02:51am, Juri Linkov wrote:
>> > A bug remains:
>> >
>> > 1. mkdir /tmp/foo
>> > 2. Evaluate:
>> >
>> > (save-place-mode)
>> > (package-initialize)
>>
>> Do you see the same bug without using save-place-mode?
>
> Oh, of course. Woops.
>
>> > 3. M-x package-install-file RET /tmp/foo RET
>>
>> I wonder why are you trying yo install a package from the empty directory?
>
> Just trying to break things is all.
So we just need a better error message here? Something like this:
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 914 bytes --]
From dabd1cb2ffe3aed39f11d89f5ab1acab5b1d0426 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sat, 25 Jun 2016 15:57:39 -0400
Subject: [PATCH v1] Improve error when installing non-package dirs
* lisp/emacs-lisp/package.el (package-dir-info): Throw meaningful error
when no file with package info is found (Bug #19851).
---
lisp/emacs-lisp/package.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index e721b55..f669c31 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1081,6 +1081,8 @@ package-dir-info
(setq files nil)
;; set the 'dir kind,
(setf (package-desc-kind info) 'dir))))
+ (unless info
+ (error "No .el files with package headers in `%s'" default-directory))
;; and return the info.
info))))
--
2.8.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2016-08-06 20:34 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).