4

I know the command in the .emacs for long line truncation is:

(setq-default truncate-lines t)

or the keystroke:

M-x <RET> toggle-truncate-lines <RET>

but how do I pass these as parameters launching emacs from the shell?

5
emacs --eval '(setq-default truncate-lines t)'
  • Thank you! The quotes make all the difference it seems, I assume without them the shell tries to interpret them as a bash expression rather then a Lisp command passed to emacs? – Hooked Sep 12 '11 at 13:26
  • This parameter didn't enable truncate-line on my end. Something does not allow to enable truncate line by default. @Gilles 'SO- stop being evil' – alper Jan 16 at 12:15
  • 1
    @alper Maybe something in your init file turns it off? Or maybe you're opening a file in a mode that turns it off? What exact commands are you using? Does it make a difference if you add -q to the command line? – Gilles 'SO- stop being evil' Jan 16 at 19:21
  • In my init file file, (global-visual-line-mode 1) was the issue, when I removed it, everything is solved. – alper Jan 17 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.