0

Something is overriding my truncation setting.

I have this in my emacs

(setq-default truncate-lines t)

, but I still have to toggle-truncate-lines on every buffer.

This used to work a few weeks ago, but I can't figure out what causing this;)

Is there maybe a new command I'm supposed to use in Emacs-30?

It seems this is the line that caused it:

;treat txt files as org files
;(add-to-list 'auto-mode-alist '("\\.txt\\'" . org-mode))

Hmm, but now it doesn't truncate org-files.

Is setq-default truncate-lines supposed to work for all modes?

In org-mode, it doesn't truncate

Also, when I enable this line, csharp-mode doesn't truncate

(setq-default truncate-lines t)
Jason Hunter
  • 519
  • 2
  • 9
  • 1
    I put `(setq truncate-lines t)` in my init.el and It works for all buffers. (emacs 27.1) – Francesco Cadei Mar 09 '23 at 15:52
  • 1
    (1) Do you see the same problem if you start Emacs with `emacs -Q` (no init file) and then use that `setq`? If not, bisect your init file to find the culprit. (2) Emacs 30 isn't a release. Consider reporting the problem: `M-x report-emacs-bug`. – Drew Mar 09 '23 at 16:07
  • 1
    A buffer-local variable such as `truncate-lines` might be being set to a `nil` value by a popular minor-mode named `visual-line-mode` that is sometimes added globally by a user with the command `global-visual-line-mode`. Other major-modes and minor-modes might also set `truncate-lines` to a `nil` or `non-nil` value. Maybe grep the user-configuration files for `global-visual-line-mode`, or, of course, bisecting the init file as Drew suggested will also narrow it down until the culprit is found. – lawlist Mar 09 '23 at 16:17
  • 1
    You can examine what modes are turned on in a a buffer with `C-h m` and check if `visual-line-mode` is on. If that's the case for every buffer, then @lawlist's guess is probably correct. – NickD Mar 09 '23 at 16:47

0 Answers0