From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Carsten Dominik Newsgroups: gmane.emacs.bugs,gmane.emacs.orgmode Subject: bug#14346: [O] bug#14346: 24.3; beginning-of-visual-line jumps to previous line in org-mode Date: Fri, 10 May 2013 09:00:03 +0200 Message-ID: <31DFE408-7E8F-4CCA-B6DA-439D9A311C51@gmail.com> References: <8338u3m2ke.fsf@gnu.org> <831u9nm2dm.fsf@gnu.org> <83y5bvkki7.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_1197003D-E6BC-4DA4-86A5-0D0991A42EEB" X-Trace: ger.gmane.org 1368169268 2925 80.91.229.3 (10 May 2013 07:01:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 May 2013 07:01:08 +0000 (UTC) Cc: 14346@debbugs.gnu.org, emacs-orgmode@gnu.org To: E Sabof Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 10 09:01:03 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1UahK9-00081C-SY for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 May 2013 09:01:02 +0200 Original-Received: from localhost ([::1]:43177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UahK9-0003ZT-He for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 May 2013 03:01:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UahK4-0003Vi-Ua for bug-gnu-emacs@gnu.org; Fri, 10 May 2013 03:00:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UahK2-00009q-Nv for bug-gnu-emacs@gnu.org; Fri, 10 May 2013 03:00:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59432) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UahK2-00009c-G1 for bug-gnu-emacs@gnu.org; Fri, 10 May 2013 03:00:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UahKA-0005yP-1R for bug-gnu-emacs@gnu.org; Fri, 10 May 2013 03:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Carsten Dominik Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 May 2013 07:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14346 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14346-submit@debbugs.gnu.org id=B14346.136816922022827 (code B ref 14346); Fri, 10 May 2013 07:01:01 +0000 Original-Received: (at 14346) by debbugs.gnu.org; 10 May 2013 07:00:20 +0000 Original-Received: from localhost ([127.0.0.1]:35308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UahJS-0005w0-HF for submit@debbugs.gnu.org; Fri, 10 May 2013 03:00:20 -0400 Original-Received: from mail-wi0-f171.google.com ([209.85.212.171]:52247) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UahJO-0005vg-Rv for 14346@debbugs.gnu.org; Fri, 10 May 2013 03:00:16 -0400 Original-Received: by mail-wi0-f171.google.com with SMTP id hn3so288455wib.10 for <14346@debbugs.gnu.org>; Fri, 10 May 2013 00:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :cc:message-id:references:to:x-mailer; bh=9H7CzsETLoV0WbOPPCA6GNDHy2FJo5T6Y29FFS1MSIY=; b=N+tSLkPATIPBs9ffhZWS/6Bb6i/ISBGuxFyKFZRxocyRbkUDjzj7SM6H6a/FXmNf0F K82an56X1X3ROQU0uMthmG+GRHEXRY/uLWSucfUS5Sw/39NO86+tb93lxenvUyO399q0 XptAZWbxUJOQ77V71Wjt16qK0ButvItk4viW82C2H+3fOgAj2D5y2vuenC4gwlc9Vu8l 6LS6evH5bizTvh4RQr2hHeZmrBkOZvRcM+bxumsJPq+9hVmsoxuYBeSSRgEONB7usts/ zHwD/jgReEzV5KSSOky1OjduVIIsS/9nTm9S4qeUpQa5WeQuGek9qxLX0mXZA3i1TtTH 2FiA== X-Received: by 10.194.133.198 with SMTP id pe6mr22406450wjb.9.1368169205615; Fri, 10 May 2013 00:00:05 -0700 (PDT) Original-Received: from 192.168.2.5 ([86.85.85.170]) by mx.google.com with ESMTPSA id ge7sm1631927wib.6.2013.05.10.00.00.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 May 2013 00:00:04 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1503) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:74117 gmane.emacs.orgmode:71983 Archived-At: --Apple-Mail=_1197003D-E6BC-4DA4-86A5-0D0991A42EEB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 On 7.5.2013, at 03:34, E Sabof wrote: > 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.=20 >=20 > (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)))))))) >=20 > (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)))))))) I have implemented these in Org master, so this will eventually mode = into emacs as well. - Carsten >=20 > Evgeni >=20 >=20 > 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: >=20 > (setq disable-point-adjustment > (preceding-or-following-character-visible-p)) >=20 > 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. >=20 > Evgeni >=20 >=20 > 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. >=20 > 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. >=20 >=20 --Apple-Mail=_1197003D-E6BC-4DA4-86A5-0D0991A42EEB Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=iso-8859-1
On 7.5.2013, at 03:34, E Sabof <esabof@gmail.com> wrote:

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))))))))

I have implemented these in Org master, so this will eventually mode into emacs as well.

- Carsten


Evgeni


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 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 <eliz@gnu.org> wrote:
> Date: Sat, 4 May 2013 12:17:35 +0100
> From: E Sabof <esabof@gmail.com>
> 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.



--Apple-Mail=_1197003D-E6BC-4DA4-86A5-0D0991A42EEB--