[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: move-beginning-of-line moves to the very beginning instead of where
From: |
Emanuel Berg |
Subject: |
Re: move-beginning-of-line moves to the very beginning instead of where it should |
Date: |
Sun, 07 Sep 2014 20:24:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Though visual-line-mode can be practical sometimes, I
recommend auto-fill-mode or a version thereof. That
fills paragraphs as you type. Only, sometimes when you
edit stuff (after you have written a paragraph) you
have to (re)fill manually, with M-q (unless the edit
was an append).
But if you practice your thinking/spelling/typing
skills you more and more seldom have to do that. The
rare cases when you do have to do it manually are a
good barter for the big advantage of having the file
look as it does data-wise on you display.
C-a isn't the same everywhere even so. In the
message-mode, it is message-beginning-of-line which has
to do with the header section of an email where C-a
sensibly isn't the beginning of the header, but the
beginning of the header data.
Here is a cool DWIM version for writers of code. (He
who wrote it must be a real hacker himself.)
(defun back-to-dwim ()
(interactive)
(let ((point (point)))
(back-to-indentation)
(if (= point (point))
(move-beginning-of-line nil) ))) ; ARG (nil =
this line)
It seems the C-a in message-mode works the same way:
place point anywhere on a header line to the right of
the comma, and hit `C-a C-a'!
Interestingly for this issue the defun uses
move-beginning-of-line which docstring says it acts on
displayed lines, so that should (?) get "filled text
C-a behavior" for visual-line-mode broken lines - feel
free to try that, and report back what happened!
--
underground experts united