help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

longlines-mode vs visual-line-mode


From: Lele Gaifax
Subject: longlines-mode vs visual-line-mode
Date: Wed, 02 Jan 2013 13:29:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Hi all,

after upgrading my Emacs (I use the emacs-snapshot package, under
Ubuntu, so it's currently at version 24.3.50, compiled on 2012-12-24), I
noticed that the `longlines-mode' has been obsoleted, and its doc
suggests using the newer `visual-line-mode'.

I'm used to turn on ll-m within `po-edit' subedit session:

  (eval-after-load 'po-mode
    '(progn
       ;; Turn on and off longlines-mode to wrap when editing a message
       ;; and unwrap before putting it back.
       (add-hook 'po-subedit-mode-hook '(lambda () (longlines-mode 1)))
       (add-hook 'po-subedit-exit-hook '(lambda () (longlines-mode 0)))))

I tried to replace `longlines-mode' with `visual-line-mode', but it does
not seem doing the right thing: whenever I complete the subedit session
(C-c C-c), the .po entry contains "hard return" (that is, "\n") chars both
where the mode wrapped the sentence and where I explicitly inserted a
newline.

Also, as asked on the last question on
http://www.emacswiki.org/emacs/VisualLineMode, I wasn't able to
distinguish between "soft" and "hard" returns using the
`visual-line-fringe-indicators' variable, even if it's mentioned by the
function doc.

For now I added 

  (unless (fboundp 'longlines-mode)
    (autoload 'longlines-mode "obsolete/longlines"))

and everything seems good, but I wonder if I'm missing some bit of
configuration to make `visual-line-mode' do the right thing in this
context.

Thanks in advance, and happy GNU year!

ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]