2

My code

(custom-set-variables
 '(global-display-fill-column-indicator-mode t)
 '(minibuffer-mode-hook `(,@minibuffer-mode-hook
                          ,(lambda ()
                             (display-fill-column-indicator-mode -1)))))

doesn't work.

Say evaluate

(minibuffer-message "\n\n")

I still see a fill column indicator in echo area.


How to implement what the question title said?

Drew
  • 75,699
  • 9
  • 109
  • 225
shynur
  • 4,065
  • 1
  • 3
  • 23
  • 1
    Looks like a bug to me, but maybe I'm missing something. Maybe `minibuffer-message` uses the echo area instead of the minibuffer (the latter is documented). Adding `(sleep 5)` to the function has no effect on this, nor does increasing `minibuffer-message-timeout`. And `(minibuffer-message "Mode: %s\n\n" display-fill-column-indicator-mode)` shows clearly that the minor mode is on, not off. – Drew Jun 18 '23 at 13:59
  • 1
    @Drew: I find that if I switch to `" *Echo Area N*"` then disable `display-fill-column-indicator-mode`, the *fill column indicator* will disappear... I guess there's a doc bug -- `minibuffer-message` doesn't use *minibuffer*. And now the question becomes: is there a hook for *echo area*? – shynur Jun 18 '23 at 14:16
  • If so, then yes, it sounds like it. Please consider reporting it. If for some reason the maintainers think it's not a bug they'll likely say so. Thx. – Drew Jun 18 '23 at 17:15
  • @Drew: I've reported it as bug#64165. Additionally, I think Emacs documentation may need to clarify a few concepts: (1) *echo area* is undoubtedly the display location for *message*s; (2) when *minibuffer* is inactive, *echo area* is that small region at the bottom of the *frame*; (3) when *minibuffer* is active, *echo area* is the region at the end of the *minibuffer*, as stated in the docstring for ‘minibuffer-message’: “*display MESSAGE at the end of the minibuffer.*” I don't know if that's the implementation mechanism, but functionally it is. – shynur Jun 19 '23 at 12:35
  • No. `message` uses the echo area, but `minibuffer-message` uses, as you say, the end of the minibuffer. At least that was always the case in the past. Maybe they changed something at some point. The whole point of `minibuffer-message` was to use the same buffer as your input, instead of swapping the echo area into the same screen space, so you see the `message` but you no longer see your input. – Drew Jun 19 '23 at 14:37

0 Answers0