From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matt McClure Newsgroups: gmane.emacs.devel Subject: Make fci-mode coexist better with line-move-visual Date: Fri, 12 Jul 2013 16:03:07 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b111f5fd5094804e155ff1f X-Trace: ger.gmane.org 1373659399 32555 80.91.229.3 (12 Jul 2013 20:03:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Jul 2013 20:03:19 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 12 22:03:23 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UxjYk-0004kQ-CE for ged-emacs-devel@m.gmane.org; Fri, 12 Jul 2013 22:03:18 +0200 Original-Received: from localhost ([::1]:34815 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxjYj-0000B0-UT for ged-emacs-devel@m.gmane.org; Fri, 12 Jul 2013 16:03:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxjYd-00007M-7Z for emacs-devel@gnu.org; Fri, 12 Jul 2013 16:03:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxjYb-0002u5-72 for emacs-devel@gnu.org; Fri, 12 Jul 2013 16:03:11 -0400 Original-Received: from mail-pb0-x230.google.com ([2607:f8b0:400e:c01::230]:33145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxjYa-0002tm-PA for emacs-devel@gnu.org; Fri, 12 Jul 2013 16:03:09 -0400 Original-Received: by mail-pb0-f48.google.com with SMTP id ma3so9332751pbc.35 for ; Fri, 12 Jul 2013 13:03:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=r3TFPuTujmDnns5FOJ8DN4/Wzb0gqY7AsDOVsUm0q84=; b=ospUo7NRxJp8vQn2bD3IGpzNmqjyhsgMZMngEWL7gCVcu4N0QfxLY6/xEHLExUKrYp GlSWjsWOzmc7kZMTp8ENqQ6FhDqFKTYfA4Q8FaOUlwKLe2JeNsTe+sK9kOI4aX0D4MkL FdXFCzJYBLhENyqUt3stt2bsrxDULkG1Kia4uGa85QFxc/HNbyiZWhYJsLE9RfyvDUap Xrr2vdF09Sbnc3a0GMbe4CDL8oMGpeJC6lq39VslwJiB5rboCViHLGwRRPLiT7e1mqkz HhiKcjAP5mEDRD8L2BDdkVMzv2NsYiv5/ZLl+8PVoRLUwRdeXhEDSNc7SX5jIK6KqaF7 lf+g== X-Received: by 10.66.243.5 with SMTP id wu5mr39717888pac.44.1373659387461; Fri, 12 Jul 2013 13:03:07 -0700 (PDT) Original-Received: by 10.69.0.35 with HTTP; Fri, 12 Jul 2013 13:03:07 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:161840 Archived-At: --047d7b111f5fd5094804e155ff1f Content-Type: text/plain; charset=ISO-8859-1 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 --047d7b111f5fd5094804e155ff1f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I'm interested in isolating and fixing whatever prevents `line-mov= e-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-m= ode` and `line-move-visual`?

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

Background:

The Fill-C= olumn-Indicator README[2] says:

> If line-move-= visual is t, then vertical navigation can behave oddly in several edge case= s while fci-mode is enabled (this is due to a bug in Emacs's C code). A= ccordingly, 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 s= uppressed by setting fci-handle-line-move-visual to nil. (But you shouldn&#= 39;t want to do this. There's no reason to use line-move-visual if trun= cate-lines is t, and it doesn't make sense to use something like fci-mo= de when truncate-lines is nil.)

This is a small test case that shows the unexpected beh= avior:

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

Observe that the point lands in column 2 in the above e= xample, whereas without `line-move-visual`, it lands in column 1 as expecte= d:

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



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