Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 4 down vote accepted
emacs --eval '(setq-default truncate-lines t)'
share|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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