unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Make fci-mode coexist better with line-move-visual
@ 2013-07-12 20:03 Matt McClure
  2013-07-12 20:46 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Matt McClure @ 2013-07-12 20:03 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1843 bytes --]

I'm interested in isolating and fixing whatever prevents `line-move-visual`
from behaving as expected when `fci-mode` is on. Do you have more
information on what part of the C implementation behaves badly with
`fci-mode` and `line-move-visual`?

I also opened this as a GitHub issue against fci-mode.[1]

Background:

The Fill-Column-Indicator README[2] says:

> If line-move-visual is t, then vertical navigation can behave oddly in
several edge cases while fci-mode is enabled (this is due to a bug in
Emacs's C code). Accordingly, fci-mode sets line-move-visual to nil in
buffers in which it is enabled and restores it to its previous value when
disabled. This can be suppressed by setting fci-handle-line-move-visual to
nil. (But you shouldn't want to do this. There's no reason to use
line-move-visual if truncate-lines is t, and it doesn't make sense to use
something like fci-mode when truncate-lines is nil.)

This is a small test case that shows the unexpected behavior:

    $ open -n -a Emacs --args -Q --no-site-file --eval '(progn (load-file
"fill-column-indicator.el") (fci-mode) (set-variable (quote
line-move-visual) t) (insert "\n\n  \n") (goto-line 2)
(move-beginning-of-line nil) (next-line) (what-cursor-position))'

Observe that the point lands in column 2 in the above example, whereas
without `line-move-visual`, it lands in column 1 as expected:

    $ open -n -a Emacs --args -Q --no-site-file --eval '(progn (load-file
"fill-column-indicator.el") (fci-mode) (insert "\n\n  \n") (goto-line 2)
(move-beginning-of-line nil) (next-line) (what-cursor-position))'

[1]: https://github.com/alpaker/Fill-Column-Indicator/issues/35
[2]:
https://github.com/alpaker/Fill-Column-Indicator/blob/master/README.markdown#other-options


-- 
Matt McClure
http://matthewlmcclure.com
http://www.mapmyfitness.com/profile/matthewlmcclure

[-- Attachment #2: Type: text/html, Size: 2529 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-13  7:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-12 20:03 Make fci-mode coexist better with line-move-visual Matt McClure
2013-07-12 20:46 ` Eli Zaretskii
2013-07-12 21:34   ` Matt McClure
2013-07-13  7:06     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).