unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29956: 26.0.90; `d' in *VC-history*: Wrong type argument: sequencep, 47
@ 2018-01-03  3:50 Stefan Monnier
  2018-01-03 15:06 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2018-01-03  3:50 UTC (permalink / raw)
  To: 29956

Package: Emacs
Version: 26.0.90


    % src/emacs -Q lisp/emacs-lisp/pcase.el
    ...Select the first (def-edebug-spec ...)
    C-x v h
    In the *VC-history* buffer, hit `d'

This gives me `Wrong type argument: sequencep, 47'
[ Which file you use, and which region of the file you select doesn't
  really matter.  ]

The patch below fixes it for me.

Is it OK to install it into emacs-26, or should I keep it on `master`?

FWIW, it's not a new bug in Emacs-26 and it's not terribly urgent to fix
it, e.g. because you can use `D' which does work (tho it doesn't do
quite the same), so I'm fine with either choice.


        Stefan


diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 7c502f88df..0a87e70017 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2426,9 +2426,11 @@ vc-region-history
       (setq-local vc-log-view-type 'long))
     (vc-call region-history file buf lfrom lto)
     (with-current-buffer buf
+      (setq default-directory (file-name-directory file))
       (vc-call-backend backend 'region-history-mode)
       (set (make-local-variable 'log-view-vc-backend) backend)
-      (set (make-local-variable 'log-view-vc-fileset) file)
+      (set (make-local-variable 'log-view-vc-fileset)
+           (list (file-relative-name file)))
       (set (make-local-variable 'revert-buffer-function)
 	   (lambda (_ignore-auto _noconfirm)
              (with-current-buffer buf





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

* bug#29956: 26.0.90; `d' in *VC-history*: Wrong type argument: sequencep, 47
  2018-01-03  3:50 bug#29956: 26.0.90; `d' in *VC-history*: Wrong type argument: sequencep, 47 Stefan Monnier
@ 2018-01-03 15:06 ` Eli Zaretskii
  2018-01-03 20:30   ` Stefan Monnier
  2018-01-03 20:35   ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Eli Zaretskii @ 2018-01-03 15:06 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 29956

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Tue, 02 Jan 2018 22:50:52 -0500
> 
>     % src/emacs -Q lisp/emacs-lisp/pcase.el
>     ...Select the first (def-edebug-spec ...)
>     C-x v h
>     In the *VC-history* buffer, hit `d'
> 
> This gives me `Wrong type argument: sequencep, 47'
> [ Which file you use, and which region of the file you select doesn't
>   really matter.  ]
> 
> The patch below fixes it for me.
> 
> Is it OK to install it into emacs-26, or should I keep it on `master`?

It's okay for emacs-26, but I'm curious why did you need the
default-directory part.  Is that related to the problem?

Thanks.





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

* bug#29956: 26.0.90; `d' in *VC-history*: Wrong type argument: sequencep, 47
  2018-01-03 15:06 ` Eli Zaretskii
@ 2018-01-03 20:30   ` Stefan Monnier
  2018-01-03 20:35   ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2018-01-03 20:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 29956

>> Is it OK to install it into emacs-26, or should I keep it on `master`?
> It's okay for emacs-26, but I'm curious why did you need the
> default-directory part.  Is that related to the problem?

I first tried by just setting log-view-vc-fileset to (list file) but
that gave me an error which gave me the impression that the fileset
should be composed of relative file names, and since the buffer can be
reused it's important to set default-directory properly before we can
use relative file names.


        Stefan





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

* bug#29956: 26.0.90; `d' in *VC-history*: Wrong type argument: sequencep, 47
  2018-01-03 15:06 ` Eli Zaretskii
  2018-01-03 20:30   ` Stefan Monnier
@ 2018-01-03 20:35   ` Stefan Monnier
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2018-01-03 20:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 29956-done

> It's okay for emacs-26, but I'm curious why did you need the
> default-directory part.  Is that related to the problem?

I checked the value of log-view-vc-fileset elsewhere and they seem to
use absolute file names.  So I tried again with (list file) and it
worked fine, not sure why I got an error when I checked last time.
So I installed the patch below instead,


        Stefan


diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 7c502f88df..f8d63d1498 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2428,7 +2428,7 @@ vc-region-history
     (with-current-buffer buf
       (vc-call-backend backend 'region-history-mode)
       (set (make-local-variable 'log-view-vc-backend) backend)
-      (set (make-local-variable 'log-view-vc-fileset) file)
+      (set (make-local-variable 'log-view-vc-fileset) (list file))
       (set (make-local-variable 'revert-buffer-function)
 	   (lambda (_ignore-auto _noconfirm)
              (with-current-buffer buf





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

end of thread, other threads:[~2018-01-03 20:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-03  3:50 bug#29956: 26.0.90; `d' in *VC-history*: Wrong type argument: sequencep, 47 Stefan Monnier
2018-01-03 15:06 ` Eli Zaretskii
2018-01-03 20:30   ` Stefan Monnier
2018-01-03 20:35   ` Stefan Monnier

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).