Python Forum
How do i get emacs to show a 79 character line limit ? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: How do i get emacs to show a 79 character line limit ? (/thread-374.html)



How do i get emacs to show a 79 character line limit ? - Skaperen - Oct-08-2016

"Limit all lines to a maximum of 79 characters." lots of my CLI windows are 166 characters wide.  but i often edit python files there.  i use emacs in a terminal window (the not-X version of emacs).  anyone know how to make emacs color the first 79 character spaces (backgrounds) differently?  i do not want to be popping up new emacs windows.  much of my co already has long lines (easy for me to read).


RE: How do i get emacs to show a 79 character line limit ? - Larz60+ - Oct-08-2016

To change the column limit, customize the variable whitespace-line-column
pdf manual page 83.

Get Manual here: https://www.gnu.org/software/emacs/manual/pdf/emacs.pdf




RE: How do i get emacs to show a 79 character line limit ? - Skaperen - Oct-15-2016

what i would prefer to do is have to first 79 or 80 colums set with one background color and the remainder set with another color, like blue for 1-79 and magenta for 80-EOL.  the character color should not be affected by this.


RE: How do i get emacs to show a 79 character line limit ? - Larz60+ - Oct-15-2016

If it's not already there, you can do it if you are familiar with lisp.

You can also (I think you can still do this) email Richard Stallman [email protected]
who is (or was) pretty good at responding


RE: How do i get emacs to show a 79 character line limit ? - Skaperen - Oct-15-2016

(Oct-15-2016, 04:21 AM)Larz60+ Wrote: If it's not already there, you can do it if you are familiar with lisp.

You can also (I think you can still do this) email Richard Stallman [email protected]
who is (or was) pretty good at responding

i tried lisp many, many years ago.  i had to mop up my lunch from the floor.  anyone have an emacs implementation in python?


RE: How do i get emacs to show a 79 character line limit ? - Larz60+ - Oct-15-2016

You don't like car, cdr and cons? And don't forget this is where lambda came from.

Actually, I don't remember a whole heck of a lot about lisp, but I recall liking it
a lot back when I used it.

A very simple language that can qet very complex!
Forth is another one, but a beautiful stack oriented interpreted language nonetheless.

don't know of a Python version, but emacs has lisp built in.


RE: How do i get emacs to show a 79 character line limit ? - Skaperen - Oct-16-2016

i liked forth.  but i would have liked a cleaner one more.  python is clean :dance:   i may, some day in the future, try to make a stack language to play with based on python one way or the other (such as an interpreter written in python or a rewrite of one of the existing python interpreters ... in any case to work in a python context).


RE: How do i get emacs to show a 79 character line limit ? - nilamo - Oct-17-2016

I actually just did this last week.  Get yourself the column marker lib: https://www.emacswiki.org/emacs/ColumnMarker
Then in your user config, add...
;; add libs to our path
 (add-to-list 'load-path "~/.emacs.d/lisp/")
;; load the lib
 (require 'column-marker)
;; add a highlighter to column 79, for python files
 (add-hook 'python-mode-hook (lambda () () (column-marker-1 79)))