0

The context for my question: Linux Mint 21 Cinnamon, emacs version 28.1.2 compiled from source by myself.

See the image to know what I am speaking about:

enter image description here

being apparently not alone with such kind of question, as there is another not yet answered question here close related to this one (but NOT a duplicate, because it asks for something else).

I have already added the lines:

(setq-default fill-column 73)
(setq-default display-fill-column-indicator-column 73)
(setq-default whitespace-line-column 73)

into .emacs file but it does not have any effect as emacs is still using 80 as the column number to start coloring the line, not 73.

UPDATE: I have already checked out the solutions provided in the answers to the question: How can I get a ruler at column 80? as you can see from what I have already in my .emacs file.

And NO, I don't want a visible RULER at a given position. I want to keep the behavior of coloring the tail part exceeding the maximum specified line length as you can see in provided image.

There is a reason why I have decided to provide an image in my question and the reason is to show clearly what I want to achieve. So you can see in the image that I am not seeking a ruler shown at a given column ... AND you can see from what I have shown to have in my .emacs file that I have already tried the solutions provided in the suggested other question without success.

Claudio
  • 450
  • 3
  • 12
  • https://emacs.stackexchange.com/tags/elisp/info – Drew Mar 16 '23 at 21:31
  • That question sure looks like a duplicate to me. – Drew Mar 16 '23 at 21:34
  • C-h i g(emacs)Displaying Boundaries. BTW, display-fill-column-indicator-column is a variable, so you need to setq it. – NickD Mar 16 '23 at 22:08
  • (display-fill-column-indicator-column 73) in .emacs does not have any effect - what am I doing wrong? C-h i g(emacs)Displaying Boundaries does not help - I am already through that, but without success. – Claudio Mar 16 '23 at 22:15
  • Sorry ... forgot to change the line in the question - have already fixed it in .emacs, but it does not have any effect on the column number used for the indication which stays being 80. – Claudio Mar 16 '23 at 22:18
  • I mean (setq-default display-fill-column-indicator-column 73) ... In between I think that (setq-default whitespace-line-column 73) should be the right one ... but also this does not change 80 tto 73. – Claudio Mar 16 '23 at 22:23
  • 1
    Does this answer your question? How can I get a ruler at column 80? See the answer by Basil, not the accepted answer which is outdated (and also mentions the answer by Basil as the correct one). – NickD Mar 17 '23 at 02:08
  • @NickD: NO it doesn't answer my question as what I am looking for is first not a ruler at column 72 and second I have already tried the solution with whitespace as proposed in the last answer there as you can see in my question what I have already tried without achieving the expected effect. So my question is: "Why does the solution provided in answers to the other question not work for me???" – Claudio Mar 17 '23 at 10:06
  • See my updated question for clarification what I am after and what I have already tried to see that the answers to the other question suggested as helpful does not help me. – Claudio Mar 17 '23 at 10:12
  • https://emacs.stackexchange.com/a/14066/12713 worksforme – nega Mar 17 '23 at 18:17
  • @nega : WHAT exactly works for you? I have tried it and it seems to be the wrong path. It works by disabling whitespace-mode and then marks from column 80. So if you specify column as 80 you think it works, but it does not. Have you tried to change the column to 73? Did it work? If yes, with which emacs version? – Claudio Mar 17 '23 at 21:47

1 Answers1

1
  1. start Emacs with emacs -q to skip your init files
  2. paste the following code into the *scratch* (Lisp interaction) buffer:
(setq-default
 whitespace-line-column 73
 whitespace-style       '(face lines-tail))
  1. do a C-j after the form
  2. paste in some Lorem Ipsum
  3. do M-x whitespace-mode
  4. get highlighted beginning at line 73

screen shot showing text highlighted after a certain column

nega
  • 3,221
  • 15
  • 21