GNU bug report logs -
#50900
27.2; Evaluating open-line with a negative argument changes the behavior of self-insert
Previous Next
Reported by: Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>
Date: Wed, 29 Sep 2021 19:08:02 UTC
Severity: normal
Tags: moreinfo
Found in version 27.2
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.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 50900 in the body.
You can then email your comments to 50900 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#50900
; Package
emacs
.
(Wed, 29 Sep 2021 19:08:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 29 Sep 2021 19:08:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
In order to reproduce this bug, I deleted my ~/.config/emacs/init.el
file and made sure that no other Emacs configuration file existed in
$HOME.
Steps to reproduce this bug:
1. Evaluate (open-line -1)
2. Insert text in any buffer
You will see that whenever a character is inserted, the point is moved
to the beginning of the line.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50900
; Package
emacs
.
(Wed, 29 Sep 2021 19:13:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 50900 <at> debbugs.gnu.org (full text, mbox):
Rodrigo Morales <moralesrodrigo1100 <at> gmail.com> writes:
> In order to reproduce this bug, I deleted my ~/.config/emacs/init.el
> file and made sure that no other Emacs configuration file existed in
> $HOME.
That shouldn't be necessary -- "emacs -Q" will start an Emacs without
any local customisations.
> Steps to reproduce this bug:
>
> 1. Evaluate (open-line -1)
> 2. Insert text in any buffer
I'm unable to reproduce the problem in Emacs 27.2 (or 28). I said:
emacs -Q
M-: (open-line -1)
And then I just get this backtrace:
Debugger entered--Lisp error: (error "Negative repetition argument -1")
self-insert-command(-1)
newline(-1)
open-line(-1)
eval((open-line -1) t)
eval-expression((open-line -1) nil nil 127)
funcall-interactively(eval-expression (open-line -1) nil nil 127)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
> You will see that whenever a character is inserted, the point is moved
> to the beginning of the line.
I don't see that, either. What does `C-h f open-line RET' say for you?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 29 Sep 2021 19:13:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50900
; Package
emacs
.
(Wed, 29 Sep 2021 20:25:01 GMT)
Full text and
rfc822 format available.
Message #13 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Sorry, I wasn't clear in my previous message.
Before you evaluate the expression, you have to be in a buffer with no
read-only-mode. This means that if you tried to reproduce the issue in
the "*GNU Emacs*" buffer, you didn't fully reproduce the bug. For
some reason, the bug doesn't happen when the expression is evaluated
in a buffer with read-only-mode.
Here are more clearer steps:
1. Execute "emacs -Q"
2. Evaluate (open-line -1) in the "*scratch*" buffer.
3. Move your cursor to the "*scratch*" buffer.
4. Insert any text
5. (At this point, whenever you insert a character, the cursor is
moved to the beginning of the line which makes it seem that you are
typing from left to right.)
I was able to reproduce this issue in emacs 27.2 (in two systems) and
emacs 26.2 (in one system).
On Wed, 29 Sept 2021 at 14:07, Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>
wrote:
>
> In order to reproduce this bug, I deleted my ~/.config/emacs/init.el
> file and made sure that no other Emacs configuration file existed in
> $HOME.
>
> Steps to reproduce this bug:
>
> 1. Evaluate (open-line -1)
> 2. Insert text in any buffer
>
> You will see that whenever a character is inserted, the point is moved
> to the beginning of the line.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50900
; Package
emacs
.
(Wed, 29 Sep 2021 20:38:02 GMT)
Full text and
rfc822 format available.
Message #16 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> 5. (At this point, whenever you insert a character, the cursor is
> moved to the beginning of the line which makes it seem that you are
> typing from left to right.)
Typo: "right-to-left" instead of "from left to right"
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50900
; Package
emacs
.
(Wed, 29 Sep 2021 20:52:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 50900 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
This is a response to the message of Lars. Apparently, we get the same
backtrace.
```
Debugger entered--Lisp error: (error "Negative repetition argument -1")
self-insert-command(-1)
newline(-1)
open-line(-1)
eval((open-line -1) t)
eval-expression((open-line -1) nil nil 127)
funcall-interactively(eval-expression (open-line -1) nil nil 127)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
```
This is what C-h f open-line RET shows
```
open-line is an interactive compiled Lisp function in ‘simple.el’.
It is bound to C-o, <insertline>.
(open-line N)
Probably introduced at or before Emacs version 19.29.
Insert a newline and leave point before it.
If there is a fill prefix and/or a ‘left-margin’, insert them on
the new line if the line would have been blank.
With arg N, insert N newlines.
```
On Wed, 29 Sept 2021 at 15:38, Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>
wrote:
> > 5. (At this point, whenever you insert a character, the cursor is
> > moved to the beginning of the line which makes it seem that you are
> > typing from left to right.)
>
> Typo: "right-to-left" instead of "from left to right"
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50900
; Package
emacs
.
(Wed, 29 Sep 2021 21:08:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 50900 <at> debbugs.gnu.org (full text, mbox):
A recipe:
emacs -Q
M-: (open-line -1)
C-x o
foobar
IOW, do not quit the debugger. That "bug" was not present in Emacs 24, it
exists in Emacs 25 and later. But I'm not sure it qualifies as a "bug".
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50900
; Package
emacs
.
(Thu, 30 Sep 2021 07:07:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 50900 <at> debbugs.gnu.org (full text, mbox):
Gregory Heytings <gregory <at> heytings.org> writes:
> A recipe:
>
> emacs -Q
> M-: (open-line -1)
> C-x o
> foobar
>
> IOW, do not quit the debugger. That "bug" was not present in Emacs
> 24, it exists in Emacs 25 and later. But I'm not sure it qualifies as
> a "bug".
Heh. It's an oddity for sure. And fixing it's pretty easy -- I've now
made `newline' check the argument earlier (before it starts binding all
those variables that affect... stuff).
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 28.1, send any further explanations to
50900 <at> debbugs.gnu.org and Rodrigo Morales <moralesrodrigo1100 <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 30 Sep 2021 07:07: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
.
(Thu, 28 Oct 2021 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 152 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.