all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#44226: display-fill-column-indicator not ready for prime time
@ 2020-10-25 23:25 積丹尼 Dan Jacobson
  2020-10-26  6:54 ` Kévin Le Gouguec
  0 siblings, 1 reply; 5+ messages in thread
From: 積丹尼 Dan Jacobson @ 2020-10-25 23:25 UTC (permalink / raw)
  To: 44226

emacs-version "27.1"
In 'GNU Emacs NEWS -- history of user-visible changes.'
I saw

;;  Customize the buffer-local user options 'display-fill-column-indicator'
;; and 'display-fill-column-indicator-character' to activate the
;; indicator.

Sounds great. I'm hyped!

Alas,
for my average file.txt
setting display-fill-column-indicator to t did nothing.

OK describe-variable display-fill-column-indicator leads to
(info "(emacs) Displaying Boundaries")
OK, starting over, maybe I need to change display-fill-column-indicator-
character
user-error: Value ‘|’ does not match type choice of display-fill-column-indicator-character
user-error: Value ‘x’ does not match type choice of display-fill-column-indicator-character

OK checking the docs it says

   display-fill-column-indicator-character is a variable defined in ‘C source code’.
   Its value is nil
   ^^^^^^^^^^^^^^^^
     Automatically becomes buffer-local when set.
     Calls these functions when changed: (#<subr set-buffer-redisplay>)
     This variable is safe as a file local variable if its value
     satisfies the predicate ‘(lambda (value) (or (characterp value) (null value)))’.
     You can customize this variable.


   This variable was introduced, or its default value was changed, in
   version 27.1 of Emacs.

   Documentation:
   Character to draw the indicator when ‘display-fill-column-indicator’ is non-nil.
   The default is U+2502 but a good alternative is (ascii 124)
   ^^^^^^^^^^^SO WHY IS IT STILL NIL?              ^^^^^^^^^^ ALSO SAY '|'
   if the font in fill-column-indicator face does not support Unicode characters.
   See Info node ‘Displaying Boundaries’ for details.

OK, let's try some more.
user-error: Value ‘U+2502’ does not match type choice of display-fill-column-indicator-character
user-error: Value ‘│’ does not match type choice of display-fill-column-indicator-character

Conclusion: why not, in the INFO manual, add a full example, of how to
get started with display-fill-column-indicator. In fact, say so, of what
to put in .emacs, to get it working globally.





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

* bug#44226: display-fill-column-indicator not ready for prime time
  2020-10-25 23:25 bug#44226: display-fill-column-indicator not ready for prime time 積丹尼 Dan Jacobson
@ 2020-10-26  6:54 ` Kévin Le Gouguec
  2020-10-26  7:27   ` 積丹尼 Dan Jacobson
  2020-10-26  7:42   ` 積丹尼 Dan Jacobson
  0 siblings, 2 replies; 5+ messages in thread
From: Kévin Le Gouguec @ 2020-10-26  6:54 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 44226

積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:

> Alas,
> for my average file.txt
> setting display-fill-column-indicator to t did nothing.

What about M-x display-fill-column-indicator-mode?

> OK describe-variable display-fill-column-indicator leads to
> (info "(emacs) Displaying Boundaries")
> OK, starting over, maybe I need to change display-fill-column-indicator-
> character
> user-error: Value ‘|’ does not match type choice of display-fill-column-indicator-character
> user-error: Value ‘x’ does not match type choice of display-fill-column-indicator-character

How did you try to set this?  Based on your error message, I'm guessing
M-x set-variable?

Characters in Elisp must be spelled with a leading '?', e.g. ?| or ?x
(info "(elisp) Basic Char Syntax").  This is a bit tricky to type with
M-x set-variable, since hitting '?' in the value prompt brings up the
variable's *Help* buffer.  You need to type:

M-x set-variable RET display-fill-column-indicator RET C-q ? | RET

>    Documentation:
>    Character to draw the indicator when ‘display-fill-column-indicator’ is non-nil.
>    The default is U+2502 but a good alternative is 
>    ^^^^^^^^^^^SO WHY IS IT STILL NIL?              

Good question (it is nil for me as well right after startup with emacs
-Q).  Maybe it's set when display-fill-column-indicator-mode is called?

>                                                    (ascii 124)
>                                                    ^^^^^^^^^^ ALSO SAY '|'

I agree that either the character, or its name ("VERTICAL LINE") would
be more informative, to save the reader a roundtrip to ascii(7).

> OK, let's try some more.
> user-error: Value ‘U+2502’ does not match type choice of display-fill-column-indicator-character
> user-error: Value ‘│’ does not match type choice of display-fill-column-indicator-character

Cf above: you need to spell this with Elisp's character syntax, so
#x2502 or ?|.





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

* bug#44226: display-fill-column-indicator not ready for prime time
  2020-10-26  6:54 ` Kévin Le Gouguec
@ 2020-10-26  7:27   ` 積丹尼 Dan Jacobson
  2020-10-26 10:32     ` Lars Ingebrigtsen
  2020-10-26  7:42   ` 積丹尼 Dan Jacobson
  1 sibling, 1 reply; 5+ messages in thread
From: 積丹尼 Dan Jacobson @ 2020-10-26  7:27 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: 44226

>>>>> "KLG" == Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

KLG> What about M-x display-fill-column-indicator-mode?

Ah ha!

Well all of this suffering could have been avoided,

if in the News file, it just said that, instead of saying:

     ** Emacs now optionally displays a fill column indicator.
     This is similar to what 'fill-column-indicator' package provides, but
     much faster and compatible with 'show-trailing-whitespace'.

     Customize the buffer-local user options 'display-fill-column-indicator'
     and 'display-fill-column-indicator-character' to activate the
     indicator.

     The indicator is not displayed at all in minibuffer windows and
     in tooltips, as it is not useful there.

     There are 2 new buffer local variables and 1 face to customize this
     mode, they are described in the manual "(emacs) Display".

without ever mentioning display-fill-column-indicator-mode.

Indeed the relative Help and INFO pages I mentioned don't mention it either.





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

* bug#44226: display-fill-column-indicator not ready for prime time
  2020-10-26  6:54 ` Kévin Le Gouguec
  2020-10-26  7:27   ` 積丹尼 Dan Jacobson
@ 2020-10-26  7:42   ` 積丹尼 Dan Jacobson
  1 sibling, 0 replies; 5+ messages in thread
From: 積丹尼 Dan Jacobson @ 2020-10-26  7:42 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: 44226

OK, let's say the user reads about

    display-fill-column-indicator-mode is an autoloaded interactive
    compiled Lisp function in ‘display-fill-column-indicator.el’...

OK, but to finally find
(global-display-fill-column-indicator-mode)
he still needs to look at the .el file.





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

* bug#44226: display-fill-column-indicator not ready for prime time
  2020-10-26  7:27   ` 積丹尼 Dan Jacobson
@ 2020-10-26 10:32     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-26 10:32 UTC (permalink / raw)
  To: 積丹尼 Dan Jacobson; +Cc: 44226, Kévin Le Gouguec

積丹尼 Dan Jacobson <jidanni@jidanni.org> writes:

> Indeed the relative Help and INFO pages I mentioned don't mention it either.

The manual (now) says:

---
Alternatively you can type @w{@kbd{M-x display-fill-column-indicator-mode}}
or @w{@kbd{M-x global-display-fill-column-indicator-mode}} which
enables the indicator locally or globally, respectively, and also
chooses the character to use if none is already set.  It is possible
to use the first one to activate the indicator in a hook and the
second one to enable it globally.
---

So there doesn't seem to be anything here to do, and I'm closing this
bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2020-10-26 10:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-25 23:25 bug#44226: display-fill-column-indicator not ready for prime time 積丹尼 Dan Jacobson
2020-10-26  6:54 ` Kévin Le Gouguec
2020-10-26  7:27   ` 積丹尼 Dan Jacobson
2020-10-26 10:32     ` Lars Ingebrigtsen
2020-10-26  7:42   ` 積丹尼 Dan Jacobson

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.