From: "Robert J. Chassell" <bob@rattlesnake.com>
To: emacs-devel@gnu.org
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) [thread overview]
Message-ID: <m1Hh7dF-0027M2C@rattlesnake.com> (raw)
In-Reply-To: <46308E42.8000806@gnu.org> (message from Luca Saiu on Thu, 26 Apr 2007 13:34:26 +0200)
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
bob@rattlesnake.com bob@gnu.org
http://www.rattlesnake.com http://www.teak.cc
prev parent reply other threads:[~2007-04-26 17:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-26 9:28 etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped Luca Saiu
2007-04-26 10:38 ` Francesco Potorti`
2007-04-26 11:34 ` Luca Saiu
2007-04-26 11:55 ` Francesco Potorti`
2007-04-26 13:16 ` martin rudalics
2007-04-26 13:42 ` Francesco Potorti`
2007-04-26 14:14 ` Luca Saiu
2007-04-26 14:54 ` Luca Saiu
2007-04-26 17:19 ` Robert J. Chassell [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1Hh7dF-0027M2C@rattlesnake.com \
--to=bob@rattlesnake.com \
--cc=emacs-devel@gnu.org \
/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 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).