0

The problem I have is caused by Emacs.lineSpacing: 1 in my X resources (thanks to NickD for help in pinpointing this), which equates to:

(setq-default line-spacing 1)

With that in effect, I call find-file (C-x C-f) and my minibuffer says:

Find file: ~/.Xresources

There I select the file name and call kill-ring-save (M-w). Now my minibuffer says:

Find file: ~/.Xresources [Saved text until: "~/.Xresources"]

How do I stop that appended message and retain a line spacing of 1?

  • What version of emacs are you running? I cannot reproduce it on emacs 29.0.50 from a couple of months ago. – NickD May 18 '22 at 11:41
  • @NickD 27.2, though I see now that 28.1 is out. Mind you, I suspect I did something in my init file that caused this, but I’ve no idea what. http://reluk.ca/.config/emacs/lisp/initialization.el – Michael Allan May 18 '22 at 18:47
  • 1
    Can't reproduce it on 27.2 either. It's easy to check if your init file is behind this: start emacs with `emacs -Q` and try to reproduce. If you cannot, then your init file is the culprit: try [bisecting it](https://emacs.stackexchange.com/questions/28429/how-do-i-troubleshoot-emacs-problems). – NickD May 18 '22 at 19:22
  • @NickD Turns out I had to bisect `-Q`. The cause is `Emacs.lineSpacing: 1` in my [X resources](http://reluk.ca/.Xresources), which equates to `(setq-default line-spacing 1)`. But why that causes a recursive echo, I don’t know. – Michael Allan May 24 '22 at 02:25
  • 1
    When you call `find-file` the input is read from the [Minibuffer](https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer.html#Minibuffer), not the [Echo-Area](https://www.gnu.org/software/emacs/manual/html_node/elisp/The-Echo-Area.html). `indicate-copied-region` emits a message that tells you the region you have copied. That is what you are seeing as text from the Echo Area in the brackets. – Tobias May 25 '22 at 08:39
  • @Tobias, corrected, thank you. – Michael Allan May 26 '22 at 08:03

1 Answers1

2

This works for me:

(add-hook 'minibuffer-setup-hook (lambda () (setq line-spacing 0)))

It’s easier to figure when you know the cause. Again, thanks to NickD for help with that.

  • After 24 hours you should be able to accept your own answer as solution. This marks the question as solved and it does no longer occur in the list of unanswered questions. To accept this answer, [click on the check mark below the arrow for down-voting](https://meta.stackexchange.com/questions/23138/how-to-accept-the-answer-on-stack-overflow). – Tobias May 26 '22 at 08:31