unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29529: next-line-add-newlines shouldn't be respected in next-line-or-history-element
@ 2017-12-01 22:49 E. Choroba
  2017-12-03 16:00 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: E. Choroba @ 2017-12-01 22:49 UTC (permalink / raw)
  To: 29529

Hi,

I don't like the "end of buffer" errors, so I have switched 
next-line-add-newlines to t. In recent Emacs versions, though, this makes it 
impossible to browse the minibuffer history with cursor arrows: <down> adds a 
newline into the minibufer instead of showing the next history element. M-n 
works correctly, though.

Steps to reproduce (tested in 25.3.1):

emacs -Q
(setq next-line-add-newlines t) C-x C-e
C-x C-f <down>

Solution:

Set the variable to nil locally in next-line-or-history-element.

Patch:

diff -u <(zcat /usr/local/share/emacs/25.3/lisp/simple.el.gz) ~/simple.el
--- /dev/fd/63  2017-12-01 23:45:06.338468797 +0100
+++ /home/choroba/simple.el     2017-12-01 23:45:04.166450109 +0100
@@ -2038,6 +2038,7 @@
    (interactive "^p")
    (or arg (setq arg 1))
    (let* ((old-point (point))
+         (next-line-add-newlines nil)
          ;; Remember the original goal column of possibly multi-line input
          ;; excluding the length of the prompt on the first line.
          (prompt-end (minibuffer-prompt-end))


Cheers,

Ch.





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

end of thread, other threads:[~2017-12-03 16:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-01 22:49 bug#29529: next-line-add-newlines shouldn't be respected in next-line-or-history-element E. Choroba
2017-12-03 16:00 ` Eli Zaretskii

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