* etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped
@ 2007-04-26 9:28 Luca Saiu
2007-04-26 10:38 ` Francesco Potorti`
0 siblings, 1 reply; 9+ messages in thread
From: Luca Saiu @ 2007-04-26 9:28 UTC (permalink / raw)
To: emacs-devel, emacs-pretest-bug
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello.
I compiled and installed the 22.0.99.1 pretest from alpha.gnu.org:
./configure --with-png --with-gtk --with-xpm --with-jpeg --with-tiff
- --with-sound --prefix=/home/luca/usr && make bootstrap -j 4 && make
install
Note that the directory /home/luca/usr existed but was *empty*.
All environment variables were already correctly setup:
[luca@babaorum ~]$ env
GREEN=\033[0m\033[32m
BLACK=\033[0m\033[30m
MANPATH=/home/luca/usr/man:/usr/godi/man:/usr/share/man
SSH_AGENT_PID=7403
TERM=xterm
DESKTOP_STARTUP_ID=
SHELL=/bin/bash
NOATTR=\033[0m
YELLOW=\033[1m\033[33m
LIGHTBLUE=\033[1m\033[34m
LIBRARY_PATH=/home/luca/usr/lib:
GTK_RC_FILES=/etc/gtk/gtkrc:/home/luca/.gtkrc-1.2-gnome2
WINDOWID=86226876
OLDPWD=/home/luca/usr/info
LC_ALL=POSIX
USER=luca
LD_LIBRARY_PATH=/home/luca/usr/lib:
ENDTITLE=\007
BEGINTITLE=\033]0
BROWN=\033[0m\033[33m
BLUE=\033[0m\033[34m
GNOME_KEYRING_SOCKET=/tmp/keyring-3uqBV5/socket
SSH_AUTH_SOCK=/tmp/ssh-cIKODt6834/agent.6834
SESSION_MANAGER=local/babaorum:/tmp/.ICE-unix/6834
USERNAME=luca
DEFAULTS_PATH=/home/luca/.cache/fileSlbrDA
LIGHTGRAY=\033[0m\033[37m
XPSERVERLIST=:64
DESKTOP_SESSION=gnome
PATH=/home/luca/usr/bin:/home/luca/bin:/usr/godi/bin:/usr/godi/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games
CLEAR=\033[2J
C_INCLUDE_PATH=/home/luca/usr/include:/usr/include:/usr/X11R6/include
GDM_XSERVER_LOCATION=local
DARKGRAY=\033[1m\033[30m
PWD=/home/luca
EDITOR=emacs
LANG=en_US.UTF-8
LIGHTGREEN=\033[1m\033[32m
GDM_LANG=en_US.UTF-8
MANDATORY_PATH=/home/luca/.cache/file64fHIs
ESC=\033
PS1=\[\033[0m\033[31m\][\u@\h \w]\\$ \[\033[0m\033[32m\]
BLINK=\033[5m
GDMSESSION=gnome
RED=\033[0m\033[31m
HOME=/home/luca
SHLVL=1
LANGUAGE=POSIX
PURPLE=\033[0m\033[35m
GNOME_DESKTOP_SESSION_ID=Default
LIGHTRED=\033[1m\033[31m
LIGHTCYAN=\033[1m\033[36m
REVERSE=\033[7m
LIGHTPURPLE=\033[1m\033[35m
LOGNAME=luca
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-hPM2e97j3C,guid=6fb9be6b015f87ab38525400462df4d3
TOPLEFT=\033[1;1H
INFOPATH=/home/luca/usr/info:
DISPLAY=:0.0
CYAN=\033[0m\033[36m
WHITE=\033[1m\033[37m
COLORTERM=gnome-terminal
XAUTHORITY=/home/luca/.Xauthority
_=/usr/bin/env
Note that the `install' Makefile target installs most Emacs Lisp source
files *gzipped*.
Ok, then I generated TAGS from /home/luca/usr/share/emacs:
etags `find -name \*.el` `find -name \*.el.gz`
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.
For example with M-. goto-line
I see this in the minibuffer:
File /home/luca/usr/share/emacs/22.0.99/lisp/simple.el not found
/home/luca/usr/share/emacs/22.0.99/lisp/simple.el in fact is not there, but
/home/luca/usr/share/emacs/22.0.99/lisp/simple.el.gz exists, and its
content is correct (it's gzipped, of course).
Uncompressing all installed gzipped elisp files and regenerating TAGS is
a way to work around the problem (tested).
I don't know whether this behavior is consistent with old releases, but
it's definitely not what the user expects.
Other info:
In GNU Emacs 22.0.99.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
of 2007-04-26 on babaorum
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure '--with-png' '--with-gtk' '--with-xpm'
'--with-jpeg' '--with-tiff' '--with-sound' '--prefix=/home/luca/usr''
Important settings:
value of $LC_ALL: POSIX
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.UTF-8
locale-coding-system: nil
default-enable-multibyte-characters: t
Major mode: Fundamental
Minor modes in effect:
show-paren-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
M-x r e <tab> p <tab> C-g <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <left> <right> <down> <down> <down> <down>
<down> <down> <left> <right> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> M-x
r e p o <tab> r <tab> e <backspace> b <tab> <retur
n>
Recent messages:
Loading /home/luca/usr/share/emacs/site-lisp/w3m/w3m.el (source)...
Loading cl-macs...done
Loading /home/luca/usr/share/emacs/site-lisp/w3m/w3m.el (source)...done
For information about the GNU Project and its goals, type C-h C-p. [2 times]
Making completion list... [2 times]
Quit
Making completion list...
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done
Thanks,
- --
Luca Saiu
Author of GNU epsilon: http://www.gnu.org/software/epsilon
http://www-lipn.lipn.univ-paris13.fr/~saiu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGMHCqvzOavibF0oYRApoMAJ4mzoA5jRNXhMOGoBPVWh3N07a+2gCgrSWy
vvnkWkDDz/10Pu1KszJdIFo=
=DB4n
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped
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
0 siblings, 1 reply; 9+ messages in thread
From: Francesco Potorti` @ 2007-04-26 10:38 UTC (permalink / raw)
To: Luca Saiu; +Cc: emacs-devel
>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.
I think this is because you have auto-compression-mode disabled. Can
you try after doing M-x auto-compression-mode RET?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped
2007-04-26 10:38 ` Francesco Potorti`
@ 2007-04-26 11:34 ` Luca Saiu
2007-04-26 11:55 ` Francesco Potorti`
2007-04-26 17:19 ` Robert J. Chassell
0 siblings, 2 replies; 9+ messages in thread
From: Luca Saiu @ 2007-04-26 11:34 UTC (permalink / raw)
To: Francesco Potorti`; +Cc: emacs-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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.
>
> I think this is because you have auto-compression-mode disabled.
Well, no. See the last part of my bug report: auto-compression-mode is t.
> Can you try after doing M-x auto-compression-mode RET?
This is interesting.
I did it (so *disabling* auto-compression mode), and Emacs actually
changed behavior: etags-goto-tag-location displayed this in the minibuffer:
Rerun etags: `^(defun goto-line ' not found in
/home/luca/usr/share/emacs/22.0.99/lisp/simple.el.gz
Note that now Emacs tries to load the *gzipped* file (which, I repeat,
exists and is effectively gzipped).
/home/luca/usr/share/emacs/22.0.99/lisp/simple.el.gz exists and of
course contains (defun (goto-line ...
, but (this is what I think it happens) when auto-compression-mode is
disabled Emacs can't understand its content any more, because the file
is gzipped.
*Then* I did M-x auto-compression-mode RET again and M-. goto-line RET
again. Same outcome as above. Then I did it again (flip
auto-compression-mode, M-. goto-line), same outcome. And again.
*Whatever* the current value of auto-compression-mode is, from the first
time I flip it, looking for the tag always results in
Rerun etags: `^(defun goto-line ' not found in
/home/luca/usr/share/emacs/22.0.99/lisp/simple.el.gz
I always switched auto-compress-mode on and off with M-x
auto-compression-mode RET, without directly executing Lisp code.
This is independent from my ~/.emacs and ~/.emacs.d . Redoing everything
after having renamed them didn't change the outcome.
An inverted test condition somewhere?
Can't other people reproduce this? It's strange I'm the only one
noticing this.
Bye,
- --
Luca Saiu
Author of GNU epsilon: http://www.gnu.org/software/epsilon
http://www-lipn.lipn.univ-paris13.fr/~saiu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGMI5CvzOavibF0oYRAs5bAJ9hybfwdbo9SFP0+VCPNNwnZwOH5ACdH1TG
SlHcgM+dEDcTtml16SOGpZk=
=bJFV
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped
2007-04-26 11:34 ` Luca Saiu
@ 2007-04-26 11:55 ` Francesco Potorti`
2007-04-26 13:16 ` martin rudalics
2007-04-26 17:19 ` Robert J. Chassell
1 sibling, 1 reply; 9+ messages in thread
From: Francesco Potorti` @ 2007-04-26 11:55 UTC (permalink / raw)
To: Luca Saiu; +Cc: emacs-devel
>I did it (so *disabling* auto-compression mode), and Emacs actually
>changed behavior
I did a simpler test case (a single gzipped source file). I observe the
same behaviour as yours plus this curious thing. To reproduce:
- cd in a dir where you have a C source file emacs.c
- etags emacs.c
- gzip emacs.c
Now:
- emacs -q
- M-. main RET
- RET --> file emacs.c not found
While:
- emacs -q
- M-x auto-compression-mode RET
- M-x auto-compression-mode RET
- M-. main RET
- RET --> tag is found
So, disabling and reenabling auto-compression-mode solves the problem if
done at the beginning, while mixing things as Luca did causes different
behaviour.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped
2007-04-26 11:55 ` Francesco Potorti`
@ 2007-04-26 13:16 ` martin rudalics
2007-04-26 13:42 ` Francesco Potorti`
0 siblings, 1 reply; 9+ messages in thread
From: martin rudalics @ 2007-04-26 13:16 UTC (permalink / raw)
To: Francesco Potorti`; +Cc: Luca Saiu, emacs-devel
But it works with
(custom-set-variables
'(auto-compression-mode t nil (jka-compr)))
in your .emacs?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped
2007-04-26 13:16 ` martin rudalics
@ 2007-04-26 13:42 ` Francesco Potorti`
2007-04-26 14:14 ` Luca Saiu
0 siblings, 1 reply; 9+ messages in thread
From: Francesco Potorti` @ 2007-04-26 13:42 UTC (permalink / raw)
To: martin rudalics; +Cc: Luca Saiu, emacs-devel
>But it works with
>(custom-set-variables
> '(auto-compression-mode t nil (jka-compr)))
>in your .emacs?
I did:
emacs -Q
eval the above form in *scratch*
cd to the right directory
M-. main RET
RET --> it works
So evaluating that form or disabling and reenabling
auto-compression-mode manually gives the same results, which are good.
Apparently auto-compression-mode is enabled by default (it was not in
Emacs 21), but in a bad way.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped
2007-04-26 13:42 ` Francesco Potorti`
@ 2007-04-26 14:14 ` Luca Saiu
2007-04-26 14:54 ` Luca Saiu
0 siblings, 1 reply; 9+ messages in thread
From: Luca Saiu @ 2007-04-26 14:14 UTC (permalink / raw)
To: Francesco Potorti`; +Cc: martin rudalics, emacs-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm definitely not into this stuff, but I think I've found the problem.
Look at tag-find-file-of-tag-noselect in etags.el:
Files with one of the extensions in tags-compression-info-list are only
looked at if (featurep 'jka-compr) is true, and it stays true even if
not currently in auto-compression-mode: doing M-x auto-compression-mode
at least once causes it to become true, and to stay that way.
(featurep 'jka-compr) is nil at the beginning (see the beginning of
jka-cmpr-hook.el), but it becomes t when loading jka-compr.el the first
time.
Right?
- --
Luca Saiu
Author of GNU epsilon: http://www.gnu.org/software/epsilon
http://www-lipn.lipn.univ-paris13.fr/~saiu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGMLPYvzOavibF0oYRAnqYAJ0UK793D/N7fJgOCnN5PEUzdN5zTACggmOS
LwXaAP5pRKsw1v+SUd6u1cU=
=Clmw
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped
2007-04-26 14:14 ` Luca Saiu
@ 2007-04-26 14:54 ` Luca Saiu
0 siblings, 0 replies; 9+ messages in thread
From: Luca Saiu @ 2007-04-26 14:54 UTC (permalink / raw)
To: Luca Saiu; +Cc: martin rudalics, Francesco Potorti`, emacs-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Luca Saiu wrote:
> I'm definitely not into this stuff, but I think I've found the problem.
>
> Look at tag-find-file-of-tag-noselect in etags.el:
>
> Files with one of the extensions in tags-compression-info-list are only
> looked at if (featurep 'jka-compr) is true, and it stays true even if
> not currently in auto-compression-mode: doing M-x auto-compression-mode
> at least once causes it to become true, and to stay that way.
>
> (featurep 'jka-compr) is nil at the beginning (see the beginning of
> jka-cmpr-hook.el), but it becomes t when loading jka-compr.el the first
> time.
>
> Right?
Tested: I don't know whether there's some other solution considered
cleaner, but replacing the two occurrences of
(featurep 'jka-compr)
with
auto-compression-mode
in tag-find-file-of-tag-noselect solves the problem.
Note that if you decide to do this change you should also accordingly
update the documentation string of tags-compression-info-list:
These extensions will be tried only if jka-compr was activated
\(i.e. via customize of `auto-compression-mode' or by calling the
function `auto-compression-mode'
What it says is literally true, but possibly misleading: it does *not*
imply "every time that auto-compression-mode is on, jka-compr is
activated". The counterexample is the situation at the beginning.
Ok, enough. Bye,
- --
Luca Saiu
Author of GNU epsilon: http://www.gnu.org/software/epsilon
http://www-lipn.lipn.univ-paris13.fr/~saiu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGML04vzOavibF0oYRAl1+AKCDTF6admrrKl8glu/itgVqQek3KwCgoZGM
OKkY/tuxANRAsUJfBgj3Rmw=
=iyqf
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: etags: M-. looks for an uncompressed Emacs Lisp source file, but make install installs it gzipped
2007-04-26 11:34 ` Luca Saiu
2007-04-26 11:55 ` Francesco Potorti`
@ 2007-04-26 17:19 ` Robert J. Chassell
1 sibling, 0 replies; 9+ messages in thread
From: Robert J. Chassell @ 2007-04-26 17:19 UTC (permalink / raw)
To: emacs-devel
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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-04-26 17:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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).