[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but mak
From: |
Robert J. Chassell |
Subject: |
Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped |
Date: |
Thu, 26 Apr 2007 13:19:49 -0400 (EDT) |
Francesco Potorti wrote:
>> When looking up a tag referring a compressed ELisp file with M-.,
>> Emacs fails to find the correct file, as it tries to open a non-existing
>> *uncompressed* version.
Today's GNU Emacs CVS snapshot, Thu, 2007 Apr 26 09:50 UTC
GNU Emacs 22.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
started with
/usr/local/src/emacs/src/emacs -Q -D
For success with compressed source files, you have to evaluate
(auto-compression-mode t)
even when report-emacs-bug says auto-compression-mode is t,
and evaluate the defun for uncompress-while-visiting,
which is in the CVS for emacs/lisp/obsolete/uncompress.el
and then evaluate
(progn (cd "/usr/local/share/emacs/22.0.92/lisp")
(compile "etags *.el")
(visit-tags-table "/usr/local/share/emacs/22.0.92/lisp/TAGS" nil))
for compressed sources. I had to evaluate that last expression twice. (My
CVS sources in /usr/local/src/emacs/ are not compressed.)
Then I had no trouble running M-. (find-tag) on
grep-setup-hook
Here is the information for
/usr/local/src/emacs/src/emacs -Q -D
without any inclusions. This is the same as the instance with
inclusions, that is to say, with the evaluation of the two extra
expressions, except I evaluated the expressions in *scratch* so it
reports Major mode: Emacs-Lisp
Note, it says: auto-compression-mode: t
In GNU Emacs 22.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
of 2007-04-26 on benthic
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure '--with-type1' '--with-x-toolkit=gtk'
'--prefix=/usr/local' '--with-sound=yes''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US
locale-coding-system: iso-8859-1
default-enable-multibyte-characters: nil
Major mode: Fundamental
Minor modes in effect:
mouse-wheel-mode: t
file-name-shadow-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
In detail, with an instance started with emacs -Q -D, I evaluated both
(auto-compression-mode t)
(defun uncompress-while-visiting ()
"Temporary \"major mode\" used for .Z and .gz files, to uncompress them.
It then selects a major mode from the uncompressed file name and contents."
(if (and (not (null buffer-file-name))
(string-match "\\.Z$" buffer-file-name))
(set-visited-file-name
(substring buffer-file-name 0 (match-beginning 0)))
(if (and (not (null buffer-file-name))
(string-match "\\.gz$" buffer-file-name))
(set-visited-file-name
(substring buffer-file-name 0 (match-beginning 0)))
(if (and (not (null buffer-file-name))
(string-match "\\.tgz$" buffer-file-name))
(set-visited-file-name
(concat (substring buffer-file-name 0 (match-beginning 0))
".tar")))))
(message "Uncompressing...")
(let ((buffer-read-only nil)
(coding-system-for-write 'no-conversion)
(coding-system-for-read
(car (find-operation-coding-system
'insert-file-contents
buffer-file-name t))))
(shell-command-on-region (point-min) (point-max) uncompress-program t))
(goto-char (point-min))
(message "Uncompressing...done")
(set-buffer-modified-p nil)
(add-hook 'write-file-functions 'uncompress-backup-file nil t)
(normal-mode))
and then
(progn (cd "/usr/local/share/emacs/22.0.92/lisp")
(compile "etags *.el")
(visit-tags-table "/usr/local/share/emacs/22.0.92/lisp/TAGS" nil))
I had to evaluate that last expression twice.
I then had no trouble running M-. (find-tag) on
grep-setup-hook
(When I specified its TAGS table, I had no trouble at all using
M-. (find-tag) with the uncompressed CVS sources.)
--
Robert J. Chassell GnuPG Key ID: 004B4AC8
address@hidden address@hidden
http://www.rattlesnake.com http://www.teak.cc
- etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped, Luca Saiu, 2007/04/26
- Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped, Francesco Potorti`, 2007/04/26
- Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped, Luca Saiu, 2007/04/26
- Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped, Francesco Potorti`, 2007/04/26
- Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped, martin rudalics, 2007/04/26
- Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped, Francesco Potorti`, 2007/04/26
- Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped, Luca Saiu, 2007/04/26
- Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped, Luca Saiu, 2007/04/26
- Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped,
Robert J. Chassell <=