GNU bug report logs -
#22490
24.5; (newline 0) fails when point not after newline
Previous Next
Reported by: Dan Torop <dant <at> pnym.net>
Date: Fri, 29 Jan 2016 20:32:02 UTC
Severity: normal
Found in version 24.5
Done: Eli Zaretskii <eliz <at> gnu.org>
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 22490 in the body.
You can then email your comments to 22490 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#22490
; Package
emacs
.
(Fri, 29 Jan 2016 20:32:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dan Torop <dant <at> pnym.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 29 Jan 2016 20:32:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The function "newline" with an argument of 0 will fail unless called
when the character before the point is a newline. To test, start a new
Emacs session, type space, then evaluate "(newline 0)". It should
fail with a backtrace:
Debugger entered--Lisp error: (cl-assertion-failed (eq 10
(char-before)))
signal(cl-assertion-failed ((eq 10 (char-before))))
#[0
"`Sf\304=\204^N^@\305\306\307C\"\210^K\203^[^@\310`\311\300!Z`\"\210\212\302b\210\312
\210\313\314!\2034^@\315 \316V\2034^@`\317
|\210)\301\206=^@\320\321\322\"\207" [0 nil 193 use-hard-newlines 10
signal cl-assertion-failed (eq 10 (char-before))
set-hard-newline-properties prefix-numeric-value beginning-of-line
looking-at "[ ]$" current-left-margin 0 line-end-position
move-to-left-margin nil t] 4 "\n\n(fn)"]()
self-insert-command(0)
newline(0)
eval((newline 0) nil)
eval-expression((newline 0) nil)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
If one instead types a newline then (newline 0), the call will be a
NOP, as expected.
This appears to be the result of commit
62ee8b1a59d5343197cb59d9f0a52e07a23af1d8, intended to catch
bug # 18913, in particular the (cl-assert (eq ?\n (char-before)))
in post-self-insert-hook.
While it may seem absurd to execute (newline 0), this can have a
purpose, e.g. when programmatically inserting an arbitrary number of
newlines at the start of an empty buffer.
In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.6)
of 2016-01-22 on binet, modified by Debian
Windowing system distributor `The X.Org Foundation', version
11.0.11703000
System Description: Debian GNU/Linux testing (stretch)
Configured using:
`configure --build x86_64-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/lib
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man --with-pop=yes
--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
--build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
--libexecdir=/usr/lib --localstatedir=/var/lib
--infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
--with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
-D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Entering debugger...
Back to top level.
Making completion list...
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils help-mode easymenu debug time-date
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
Memory information:
((conses 16 72870 4889)
(symbols 48 17717 0)
(miscs 40 39 113)
(strings 32 9443 4228)
(string-bytes 1 261156)
(vectors 16 9072)
(vector-slots 8 385056 15878)
(floats 8 65 84)
(intervals 56 229 4)
(buffers 960 13)
(heap 1024 16429 964))
Added indication that bug 22490 blocks19759
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 29 Jan 2016 22:23:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 19 Mar 2016 19:36:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Dan Torop <dant <at> pnym.net>
:
bug acknowledged by developer.
(Sat, 19 Mar 2016 19:36:02 GMT)
Full text and
rfc822 format available.
Message #12 received at 22490-done <at> debbugs.gnu.org (full text, mbox):
> From: Dan Torop <dant <at> pnym.net>
> Date: Fri, 29 Jan 2016 13:46:47 -0500
>
> The function "newline" with an argument of 0 will fail unless called
> when the character before the point is a newline. To test, start a new
> Emacs session, type space, then evaluate "(newline 0)". It should
> fail with a backtrace:
>
> Debugger entered--Lisp error: (cl-assertion-failed (eq 10
> (char-before)))
Thanks, I fixed this for the upcoming Emacs 25.1.
Removed indication that bug 22490 blocks
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sat, 19 Mar 2016 19:47:02 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, 17 Apr 2016 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 124 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.