From mboxrd@z Thu Jan 1 00:00:00 1970 From: E Sabof Subject: Re: bug#14346: 24.3; beginning-of-visual-line jumps to previous line in org-mode Date: Tue, 7 May 2013 02:34:40 +0100 Message-ID: References: <8338u3m2ke.fsf@gnu.org> <831u9nm2dm.fsf@gnu.org> <83y5bvkki7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c2a8e43221e404dc16d2d8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZWnl-0006eg-Na for emacs-orgmode@gnu.org; Mon, 06 May 2013 21:34:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZWnh-0003Cq-K4 for emacs-orgmode@gnu.org; Mon, 06 May 2013 21:34:45 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eli Zaretskii , emacs-orgmode@gnu.org Cc: 14346@debbugs.gnu.org --001a11c2a8e43221e404dc16d2d8 Content-Type: text/plain; charset=ISO-8859-1 Even if the behavior doesn't change (soon), could the equivalent of the following be implemented in org-mode? It's the only place where this has been problematic for me. (defadvice org-beginning-of-line (after smart-point-adjustment activate) (setq disable-point-adjustment (or (not (invisible-p (point))) (not (invisible-p (max (point-min) (1- (point)))))))) (defadvice org-end-of-line (after smart-point-adjustment activate) (setq disable-point-adjustment (or (not (invisible-p (point))) (not (invisible-p (max (point-min) (1- (point)))))))) Evgeni On Sat, May 4, 2013 at 2:27 PM, E Sabof wrote: > Wouldn't it be better if forward/backward-char kept the old behavior, and > the rest of the commands did something similar to this in the end: > > (setq disable-point-adjustment > (preceding-or-following-character-visible-p)) > > I'm not entirely sure whether it would be better, but at the moment, I > can't think of a case where it wouldn't. > > Evgeni > > > On Sat, May 4, 2013 at 1:16 PM, Eli Zaretskii wrote: > >> > Date: Sat, 4 May 2013 12:17:35 +0100 >> > From: E Sabof >> > Cc: 14346@debbugs.gnu.org >> > >> > I see what you mean. But it still looks like a bug - whether I follow >> the >> > above recipe, or press C-e C-a, the point will (should?) go to the same >> > position, but the behavior is different. >> >> The behavior depends on the direction point was moving before ending >> up in the invisible text. It's a heuristic, and as every heuristic, >> it sometimes fails. >> > > --001a11c2a8e43221e404dc16d2d8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Even if the behavior doesn't change (soon), could the = equivalent of the following be implemented in org-mode? It's the only p= lace where this has been problematic for me.=A0

(de= fadvice org-beginning-of-line (after smart-point-adjustment activate)
=A0 (setq disable-point-adjustment
=A0 =A0 =A0 =A0 (or (not = (invisible-p (point)))
=A0 =A0 =A0 =A0 =A0 =A0 (not (invisible-p = (max (point-min) (1- (point))))))))

(defadvice org= -end-of-line (after smart-point-adjustment activate)
=A0 (setq disable-point-adjustment
=A0 =A0 =A0 =A0 (or (not = (invisible-p (point)))
=A0 =A0 =A0 =A0 =A0 =A0 (not (invisible-p = (max (point-min) (1- (point))))))))

Ev= geni


On Sat, May 4, 2013 at 2:27 PM, E Sabof = <esabof@gmail.com> wrote:
Wouldn't it be better if forward/backward-char kept th= e old behavior, and the rest of the commands did something similar to this = in the end:

(setq disable-point-adjustment
=A0 =A0 =A0 (preceding-or-following-character-visible-p))
<= br>
I'm not entirely sure whether it would be better, but at = the moment, I can't think of a case where it wouldn't.

Evgeni


On Sat, May 4, = 2013 at 1:16 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Sat, 4 May 2013 12:17:35 +0100 > From: E Sabof <esabof@gmail.com>
> Cc: 14346@d= ebbugs.gnu.org
>
> I see what you mean. But it still looks like a bug - whether I follow = the
> above recipe, or press C-e C-a, the point will (should?) go to the sam= e
> position, but the behavior is different.

The behavior depends on the direction point was moving before ending<= br> up in the invisible text. =A0It's a heuristic, and as every heuristic,<= br> it sometimes fails.


--001a11c2a8e43221e404dc16d2d8--