Python Forum
How do i get emacs to show a 79 character line limit ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do i get emacs to show a 79 character line limit ?
#1
"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).
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
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

Reply
#3
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.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#4
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
Reply
#5
(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?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#6
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.
Reply
#7
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).
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#8
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)))
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Writing string to file results in one character per line RB76SFJPsJJDu3bMnwYM 4 1,370 Sep-27-2022, 01:38 PM
Last Post: buran
  PIL Image im.show() no show! Pedroski55 2 966 Sep-12-2022, 10:19 PM
Last Post: Pedroski55
  How can I add an end line character after every value that I receive? GiggsB 11 5,164 Mar-06-2022, 08:51 PM
Last Post: GiggsB
  PIL Image im.show() no show! Pedroski55 6 4,889 Feb-08-2022, 06:32 AM
Last Post: Pedroski55
  [solved] unexpected character after line continuation character paul18fr 4 3,397 Jun-22-2021, 03:22 PM
Last Post: deanhystad
  new line character project_science 3 2,118 Jan-01-2021, 02:32 PM
Last Post: project_science
  Line of code to show dictionary doesn't work MaartenRo 2 2,429 Jul-28-2020, 03:58 PM
Last Post: deanhystad
  SyntaxError: unexpected character after line continuation character siteshkumar 2 3,177 Jul-13-2020, 07:05 PM
Last Post: snippsat
  Jupiter Notebook does not show output line Renym 3 2,647 Apr-26-2020, 11:21 AM
Last Post: jefsummers
  Regex won't replace character with line break Tomf96 2 2,551 Jan-12-2020, 12:14 PM
Last Post: Tomf96

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020