SIGforum
Need help with emacs (my text editor)

This topic can be found at:
https://sigforum.com/eve/forums/a/tpc/f/320601935/m/5510090005

April 14, 2023, 02:32 PM
Pipe Smoker
Need help with emacs (my text editor)
I've lomg used emacs for my MacBook text editor. It used to be
provided in every macOS (and osx). But it's not in Big Sur so I got
it with homebrew. But now these statements in my ~/.emacs file no
longer set my tab width to 4. Any ideas?

   (setq default-major-mode 'text-mode)
   (setq text-mode-hook 'turn-on-auto-fill)
   (setq default-fill-column 75)
   (setq default-tab-width 4)
   (setq tab-width 4)




Serious about crackers.
April 14, 2023, 02:52 PM
ensigmatic
Change tab width in emacs



"America is at that awkward stage. It's too late to work within the system,,,, but too early to shoot the bastards." -- Claire Wolfe
"If we let things terrify us, life will not be worth living." -- Seneca the Younger, Roman Stoic philosopher
April 14, 2023, 03:59 PM
Pipe Smoker
^^^^^^^^
I tried several permutations but none worked. I have emacs version 27.2



Serious about crackers.
April 14, 2023, 04:29 PM
V-Tail
Can't help you with emacs, I'm a vi user.

:set tabstop=4



הרחפת שלי מלאה בצלופחים
April 15, 2023, 06:24 AM
henryaz
 
I prefer tabs set at 4 also, but like V-Tail, I use vi.
 
One thing that bothered me for a while was the tabstop in the pager app (more or less). You can set tabstops for those as well, by placing these lines in your user profile (.bashrc, .zshrc, etc.)
 
PAGER=less
LESS="-x4"
export LESS

Sorry, no help for emacs.



When in doubt, mumble
April 16, 2023, 11:26 AM
Pipe Smoker
quote:
Originally posted by ensigmatic:
Change tab width in emacs

Woo hoo! In the link that you provided there is:
(setq-default tab-width 4)

Slightly different than the syntax that worked for the Apple-supplied emacs:
(setq default-tab-width 4)

When I put that new form, along with some other stuff in the link, into my ~/.emacs file it didn’t work. But just a while ago I eliminated the “other stuff” and it worked!.

I thank you, ensigmatic!



Serious about crackers.
April 16, 2023, 11:44 AM
ensigmatic
quote:
Originally posted by Pipe Smoker:
I thank you, ensigmatic!
You're welcome. Glad you were finally able to get it working.



"America is at that awkward stage. It's too late to work within the system,,,, but too early to shoot the bastards." -- Claire Wolfe
"If we let things terrify us, life will not be worth living." -- Seneca the Younger, Roman Stoic philosopher