unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51116: 28.0.60; tty-run-terminal-initialization unnecessarily decompresses .el.gz file
@ 2021-10-10  9:37 Sebastian Arlund Nørgaard via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-10-11  9:22 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Arlund Nørgaard via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-10-10  9:37 UTC (permalink / raw)
  To: 51116

When compressed elisp files are installed, tty-run-terminal-initialization will decompress and interpret an el.gz file rather than use the available compiled .elc file.

The problem is this bit of code (line 2288-2293 in lisp/faces.el):

	(tty-find-type #'(lambda (type)
			   (let ((file (locate-library (concat term-file-prefix type))))
			     (and file
				  (or (assoc file load-history)
				      (load (file-name-sans-extension file)
                                            t t)))))

In my case, the locate-library call will resolve to (locate-library "term/xterm"), which will return

/path/to/install/lisp/term/xterm.el.gz

A bit further down, the call to file-name-sans-extension will strip the extension to xterm.el. But there is only xterm.el.gz and xterm.elc in the path, so load will resolve to the xterm.el.gz, rather than the .elc file. I can reproduce this as follows:

- emacs -nw -Q
- switch to *Messages* buffer
- Buffer contains "uncompressing xterm.el.gz...done"

Ideally the output of load-library should be stripped completely of extensions, so load will resolve to xterm.elc.

(xterm is the tty type for my system, but this would apply just as well for other tty types.)

----------------------

In GNU Emacs 28.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.25, cairo version 1.16.0)
 of 2021-10-07 built on sebastian-Home-Linux
Repository revision: 160e62a23cd722744c74cec9e8d37cb678be0fb1
Repository branch: emacs-28
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Ubuntu 21.04

Configured using:
 'configure --prefix=/home/sebastian/emacs-master-install
 --with-native-compilation --with-cairo --with-dumping=pdumper
 --with-mailutils --with-json --with-x --enable-link-time-optimization
 'CFLAGS=-g3 -O3 -mtune=native -march=native -fomit-frame-pointer''

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#51116: 28.0.60; tty-run-terminal-initialization unnecessarily decompresses .el.gz file
  2021-10-10  9:37 bug#51116: 28.0.60; tty-run-terminal-initialization unnecessarily decompresses .el.gz file Sebastian Arlund Nørgaard via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-10-11  9:22 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-11  9:22 UTC (permalink / raw)
  To: Sebastian Arlund Nørgaard; +Cc: 51116

"Sebastian Arlund Nørgaard" <sebastian@bsnrg.net> writes:

> Ideally the output of load-library should be stripped completely of
> extensions, so load will resolve to xterm.elc.

This should now be fixed in emacs-28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-11  9:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-10  9:37 bug#51116: 28.0.60; tty-run-terminal-initialization unnecessarily decompresses .el.gz file Sebastian Arlund Nørgaard via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-11  9:22 ` Lars Ingebrigtsen

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).