From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Robert J. Chassell" Newsgroups: gmane.emacs.devel 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) Message-ID: References: <463070AA.5020107@gnu.org> <46308E42.8000806@gnu.org> Reply-To: bob@rattlesnake.com NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1177608069 27994 80.91.229.12 (26 Apr 2007 17:21:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Apr 2007 17:21:09 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 26 19:21:05 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hh7eP-0004rY-P4 for ged-emacs-devel@m.gmane.org; Thu, 26 Apr 2007 19:21:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hh7kA-0007tJ-AY for ged-emacs-devel@m.gmane.org; Thu, 26 Apr 2007 13:26:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hh7k5-0007qo-C4 for emacs-devel@gnu.org; Thu, 26 Apr 2007 13:26:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hh7k4-0007q4-19 for emacs-devel@gnu.org; Thu, 26 Apr 2007 13:26:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hh7k3-0007q1-Rq for emacs-devel@gnu.org; Thu, 26 Apr 2007 13:26:51 -0400 Original-Received: from cpe-69-205-32-54.nycap.res.rr.com ([69.205.32.54] helo=rattlesnake.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hh7eI-000751-DX for emacs-devel@gnu.org; Thu, 26 Apr 2007 13:20:54 -0400 Original-Received: by rattlesnake.com via sendmail from stdin id (Debian Smail3.2.0.115) Thu, 26 Apr 2007 13:19:49 -0400 (EDT) In-reply-to: <46308E42.8000806@gnu.org> (message from Luca Saiu on Thu, 26 Apr 2007 13:34:26 +0200) X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:70199 Archived-At: 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