From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simon Leinen Newsgroups: gmane.emacs.bugs 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 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1417024643 29907 80.91.229.3 (26 Nov 2014 17:57:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Nov 2014 17:57:23 +0000 (UTC) Cc: "Eric S. Raymond" To: 19197@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 26 18:57:15 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xtgq2-0001pW-Mw for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Nov 2014 18:57:14 +0100 Original-Received: from localhost ([::1]:35378 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtgq2-0003Xa-CQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Nov 2014 12:57:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtgpr-0003Pq-Dl for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2014 12:57:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xtgpq-0001jV-8D for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2014 12:57:03 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtgpq-0001jR-4y for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2014 12:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xtgpp-0004Sy-Vj for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2014 12:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Simon Leinen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Nov 2014 17:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19197 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141702457117087 (code B ref -1); Wed, 26 Nov 2014 17:57:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Nov 2014 17:56:11 +0000 Original-Received: from localhost ([127.0.0.1]:46485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xtgp0-0004RX-Ov for submit@debbugs.gnu.org; Wed, 26 Nov 2014 12:56:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50927) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xtgoy-0004RP-Rp for submit@debbugs.gnu.org; Wed, 26 Nov 2014 12:56:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xtgos-0001T2-OH for submit@debbugs.gnu.org; Wed, 26 Nov 2014 12:56:08 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:42766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtgos-0001Sk-L6 for submit@debbugs.gnu.org; Wed, 26 Nov 2014 12:56:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtgoo-0003Ke-G5 for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2014 12:56:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xtgon-0001RG-Gx for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2014 12:55:58 -0500 Original-Received: from teruel.switch.ch ([2001:620:0:1b::28]:47693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtgon-0001Qp-7y for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2014 12:55:57 -0500 Original-Received: from surlej.switch.ch (surlej.switch.ch [IPv6:2001:620:0:e::69]) by teruel.switch.ch (8.14.4/8.14.4/Debian-4) with ESMTP id sAQHoHoA027522 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 26 Nov 2014 18:50:18 +0100 Original-Received: from [2001:620:0:68::106] (helo=macsl.switch.ch) by surlej.switch.ch with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1XtgjI-0000dN-VX; Wed, 26 Nov 2014 18:50:17 +0100 X-CanIt-Geo: ip=2001:620:0:e::69; country=CH X-CanItPRO-Stream: switch-ch:outbound (inherits from switch-ch:default, base:default) X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:96634 Archived-At: 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(# "~/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)