Article View: gnu.emacs.bug
Article #99256local tags-file-name
From: Mike Rose
Date: Wed, 17 Oct 1990 05:20
Date: Wed, 17 Oct 1990 05:20
54 lines
2756 bytes
2756 bytes
; emacs bug report.
; from Mike Rose, mrose@stsci.edu, 301-338-4949
;
; Problem when using tags-file-name as a local variable.
; m-. from a buffer with a local definition of tags-file-name
; that is different than the global definition returns the error
; message "Wrong type argument: bufferp, nil"
; This file is ~/bug.el and reproduces the problem.
; before running emacs, create to short tags files.
; The can have the same or different contents.
; The commands below create a tags file from this file,
; and then force the bug.
; %cd ~
; %etags -f TAGS-DEFAULT bug.el
; %etags -f TAGS-LOCAL bug.el
; %emacs -q
; (load "~/bug")
; backtrace will show last call to verify-visited-file-modtime.
;
; The backtrace will look something like
; Signalling: (wrong-type-argument bufferp nil)
; verify-visited-file-modtime(nil)
; visit-tags-table-buffer()
; find-tag("anything-but-dummy")
; load("~/bug")
; eval-region(1 15 #<buffer *scratch*>)
; eval-print-last-sexp(nil)
; * call-interactively(eval-print-last-sexp)
;
;
; My explanation of the problem:
; Neither of the two tags files is loaded when find-tag is from
; the buffer with a local definition of tags-file-name. find-tag
; calls verify-visited-file-modtime, which does a set-buffer to
; a new buffer containing the tag file. This new buffer has
; the global definition of tags-file-name. Then, when eval-ing
; the arg for verify-visited-file-modtime, (get-file-buffer tags-file-name)
; is called and returns nil since tags-file-name is the global
; name, which names a file that has not been put in a buffer.
; Then (verify-visited-file-modtime nil) gives the error.
(defun dummy ()) ;for the tags files
(emacs-version)
;"GNU Emacs 18.55.0 of Thu Sep 6 1990 on kali.stsci.edu (berkeley-unix)"
(setq debug-on-error t)
(setq tags-file-name "~/TAGS-DEFAULT")
(switch-to-buffer (generate-new-buffer "foo"))
(make-local-variable 'tags-file-name)
(setq tags-file-name "~/TAGS-LOCAL")
(find-tag "anything-but-dummy")
Technical Details
Message-ID:
<9010170520.AA09778@STSCI.EDU>Path:
arc1-ca.pugleaf.net!gmdzi!unido!isaak!escher!nadia!smurf!ira.uka.de!sol.ctr.columbia.edu!emory!wuarchive!cs.utexas.edu!tut.cis.ohio-state.edu!STSCI.EDU!mroseShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,2cb52078bef472cc,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1990-10-16 22:20:39 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!isaak!escher!nadia!smurf!ira.uka.de!sol.ctr.columbia.edu!emory!wuarchive!cs.utexas.edu!tut.cis.ohio-state.edu!STSCI.EDU!mrose From: mrose@STSCI.EDU (Mike Rose) Newsgroups: gnu.emacs.bug Subject: local tags-file-name Message-ID: <9010170520.AA09778@STSCI.EDU> Date: 17 Oct 90 05:20:39 GMT Sender: daemon@tut.cis.ohio-state.edu Reply-To: mrose@stsci.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 54 Approved: bug-gnu-emacs@prep.ai.mit.edu Posted: Wed Oct 17 06:20:39 1990