From: Simon Leinen <simon.leinen@switch.ch>
To: 19197@debbugs.gnu.org
Cc: "Eric S. Raymond" <esr@thyrsus.com>
Subject: bug#19197: 25.0.50; vc.el with RCS: `vc-master-name' returns nil where it shouldn't
Date: Wed, 26 Nov 2014 18:50:16 +0100 [thread overview]
Message-ID: <aad289zw9z.fsf@macsl.switch.ch> (raw)
When I start ./src/emacs -Q freshly compiled from the Git source (with
the vc-filewise autoload patches included in my last report) and try to
open a file under RCS, I get an error
Wrong type argument: stringp, nil
with a backtrace such as this:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
file-exists-p(nil)
vc-insert-file(nil "^[0-9]")
vc-rcs-fetch-master-state("/Users/leinen/public_html/private/log.html" nil)
vc-rcs-state("/Users/leinen/public_html/private/log.html")
vc-rcs-state-heuristic("/Users/leinen/public_html/private/log.html")
apply(vc-rcs-state-heuristic "/Users/leinen/public_html/private/log.html")
vc-call-backend(RCS state-heuristic "/Users/leinen/public_html/private/log.html")
vc-state-refresh("/Users/leinen/public_html/private/log.html" RCS)
vc-state("/Users/leinen/public_html/private/log.html" RCS)
vc-default-mode-line-string(RCS "/Users/leinen/public_html/private/log.html")
apply(vc-default-mode-line-string RCS "/Users/leinen/public_html/private/log.html")
vc-call-backend(RCS mode-line-string "/Users/leinen/public_html/private/log.html")
vc-mode-line("/Users/leinen/public_html/private/log.html" RCS)
vc-find-file-hook()
run-hooks(find-file-hook)
after-find-file(nil t)
find-file-noselect-1(#<buffer log.html> "~/public_html/private/log.html" nil nil "~/www/html/misc/leinen/private/log.html" (18988536 16777220))
find-file-noselect("~/public_html/private/log.html" nil nil t)
find-file("~/public_html/private/log.html" t)
`vc-rcs-fetch-master-state' uses `vc-master-name' (in vc-filewise.el) to
find the master filename for the visited file.
`vc-master-name' calls the 'registered method for the file's backend
(the symbol `RCS' in this case), which is successful, and then returns
the file's `vc-name' property. But that property isn't set anywhere.
I found that the function `vc-filewise-registered' also claims to check
whether a file is registered, and it sets the `vc-name' property on the
file. So that looks more suitable to use. It also does other things
that I don't quite understand. Anyway, the following patch prevents the
error for me, and lets me edit and check in/out RCS-managed files again.
--
Simon.
diff --git a/lisp/vc/vc-filewise.el b/lisp/vc/vc-filewise.el
index bc8a8de..4a05c98 100644
--- a/lisp/vc/vc-filewise.el
+++ b/lisp/vc/vc-filewise.el
@@ -41,7 +41,7 @@ If the file is not registered, or the master name is not known, return nil."
;; vc-BACKEND-registered explicitly
(let ((backend (vc-backend file)))
(if (and backend
- (vc-call-backend backend 'registered file))
+ (vc-filewise-registered backend file))
(vc-file-getprop file 'vc-name)))))
(defun vc-rename-master (oldmaster newfile templates)
next reply other threads:[~2014-11-26 17:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-26 17:50 Simon Leinen [this message]
2019-08-03 14:06 ` bug#19197: 25.0.50; vc.el with RCS: `vc-master-name' returns nil where it shouldn't Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aad289zw9z.fsf@macsl.switch.ch \
--to=simon.leinen@switch.ch \
--cc=19197@debbugs.gnu.org \
--cc=esr@thyrsus.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.