GNU bug report logs -
#29153
25.3; Eshell can't quit when read-only commands have been run
Previous Next
Reported by: Pierre Neidhardt <ambrevar <at> gmail.com>
Date: Sun, 5 Nov 2017 11:19:01 UTC
Severity: minor
Tags: fixed, patch
Merged with 28700
Found in versions 25.2, 25.3
Fixed in version 26.1
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29153 in the body.
You can then email your comments to 29153 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29153
; Package
emacs
.
(Sun, 05 Nov 2017 11:19:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Pierre Neidhardt <ambrevar <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 05 Nov 2017 11:19:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
- emacs -Q
- M-x eshell
- M-:
(let ((prompt "echo foo"))
(add-text-properties 0 (length prompt)
'(read-only t
font-lock-face eshell-prompt
front-sticky (font-lock-face read-only)
rear-nonsticky (font-lock-face read-only))
prompt)
(insert prompt))
- RET
- C-x k: "Text is read-only"
Explanation: we run a read-only command and the read-only text is added
to history.
But in `eshell-write-history', `insert' will hit a wall when following
read-only text:
(let ((start (point)))
(insert (ring-ref ring index) ?\n)
And since `eshell-write-history' is run from the `kill-buffer-hook', the
buffer cannot be killed.
My suggested patch
(let ((start (point))
(command (ring-ref ring index)))
(remove-text-properties 0 (length command) '(read-only t) command)
(insert command ?\n)
This bug is especially annoying with a multiline prompt since
accidentally pressing RET on any line of the prompt but the last will
insert the read-only prompt into the history.
In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.16)
of 2017-11-05 built on dhiov23k
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
System Description: Gentoo Base System release 2.4.1
Configured using:
'configure --prefix=/usr --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --disable-dependency-tracking
--disable-silent-rules --docdir=/usr/share/doc/emacs-25.3
--htmldir=/usr/share/doc/emacs-25.3/html --libdir=/usr/lib64
--program-suffix=-emacs-25 --infodir=/usr/share/info/emacs-25
--localstatedir=/var
--enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
--with-gameuser=:gamestat --without-compress-install
--with-file-notification=inotify --enable-acl --without-dbus
--without-modules --without-gpm --without-hesiod --without-kerberos
--without-kerberos5 --with-xml2 --without-selinux --with-gnutls
--without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns
--without-gconf --without-gsettings --without-toolkit-scroll-bars
--with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm
--with-imagemagick --with-xft --without-cairo --without-libotf
--without-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets
GENTOO_PACKAGE=app-editors/emacs-25.3 'CFLAGS=-march=ivybridge -O2
-pipe' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed''
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND NOTIFY ACL GNUTLS LIBXML2
FREETYPE XFT ZLIB GTK3 X11
Important settings:
value of $LANG: en_US.utf8
locale-coding-system: utf-8-unix
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#29153
; Package
emacs
.
(Sun, 05 Nov 2017 11:40:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 29153 <at> debbugs.gnu.org (full text, mbox):
close 29153
severity 29153 minor
merge 29153 28700
quit
Pierre Neidhardt <ambrevar <at> gmail.com> writes:
> - emacs -Q
>
> - M-x eshell
>
> - M-:
> (let ((prompt "echo foo"))
> (add-text-properties 0 (length prompt)
> '(read-only t
> font-lock-face eshell-prompt
> front-sticky (font-lock-face read-only)
> rear-nonsticky (font-lock-face read-only))
> prompt)
> (insert prompt))
>
> - RET
>
> - C-x k: "Text is read-only"
This has been reported and fixed in #28700 "Cannot kill Eshell buffer".
bug closed, send any further explanations to
29153 <at> debbugs.gnu.org and Pierre Neidhardt <ambrevar <at> gmail.com>
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Sun, 05 Nov 2017 11:40:03 GMT)
Full text and
rfc822 format available.
Severity set to 'minor' from 'normal'
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Sun, 05 Nov 2017 11:40:03 GMT)
Full text and
rfc822 format available.
Merged 28700 29153.
Request was from
Noam Postavsky <npostavs <at> users.sourceforge.net>
to
control <at> debbugs.gnu.org
.
(Sun, 05 Nov 2017 11:40:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 03 Dec 2017 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 204 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.