From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Recenter around #+begin_src when moving to previous/next code block Date: Mon, 16 Sep 2013 06:06:29 +0200 Message-ID: <1CE288EF-D807-4593-9DE3-CA7F5F23F75F@gmail.com> References: <86wqml3uq2.fsf@somewhere.org> <868uyxucoc.fsf@somewhere.org> Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: multipart/signed; boundary="Apple-Mail=_4AB3D82A-B173-4B87-9925-C1C7C6D71148"; protocol="application/pgp-signature"; micalg=pgp-sha1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLQ53-0004sQ-Ku for emacs-orgmode@gnu.org; Mon, 16 Sep 2013 00:06:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLQ4x-0001GT-QU for emacs-orgmode@gnu.org; Mon, 16 Sep 2013 00:06:33 -0400 Received: from mail-ea0-x22a.google.com ([2a00:1450:4013:c01::22a]:34671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLQ4x-0001GL-Ik for emacs-orgmode@gnu.org; Mon, 16 Sep 2013 00:06:27 -0400 Received: by mail-ea0-f170.google.com with SMTP id h14so1738431eak.29 for ; Sun, 15 Sep 2013 21:06:25 -0700 (PDT) In-Reply-To: <868uyxucoc.fsf@somewhere.org> 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: Sebastien Vauban Cc: emacs-orgmode@gnu.org --Apple-Mail=_4AB3D82A-B173-4B87-9925-C1C7C6D71148 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 15.9.2013, at 21:06, Sebastien Vauban = wrote: > Hi Carsten, >=20 > Carsten Dominik wrote: >>> When moving with C-c C-v C-n (or p) from one code block to the next = (or >>> previous), it's much better if the code block gets centered (vs = hidden, >>> forcing the user to scroll down, as it currently is). >>>=20 >>> This is the purpose of this easy patch. >>=20 >> I don't think this patch is the right thing - is feels different from >> standard Emacs behavior. >=20 > I'm not sure to understand which Emacs behavior we would deviate from? = This > is a jump, and it'd be better located at a readable place. Without it, = you're > forced to follow 90% of your jumps by a `C-l'... >=20 > And isn't it very similar to the patch I sent earlier this week = regarding the > recenter after the jump with `C-c C-x C-j'? I'd more easily = understand that > both are either accepted or rejected, but not a mixed case. I think the difference is the following: org-clock-goto is a jump to a specific location and can be expected to be far away, so it is OK to recenter the screen. org-babel-next-src-block is more like forward paragraph, or like a forward search. It is possible that there are several src blocks on a page. Only moving the window content when necessary gives a better sense of space and location. This is why such commands in Emacs only scroll when the target position is off screen. Regards - Carsten >=20 > Anyway, I'm not bothered if it's not in Org, I can simply defadvice = the > functions (the `after' case). So I respect your decision, even if it = puzzles > me: it's just that having to manually recenter after almost all jumps = do not > feel like a right behavior of Org to me, for the beginners who can't = make such > defadvice on their own. >=20 > Best regards, > Seb >=20 > --=20 > Sebastien Vauban --Apple-Mail=_4AB3D82A-B173-4B87-9925-C1C7C6D71148 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJSNoPFAAoJEO+gg/nAZuwMQvkH/0R30VV5udybadLFLAdUXPda alAsNzNtk6+ZDIT+5NQVPvlSwdzoFnfrsOgl/Sf7Nns+FcIkRAqNk2RQKT3T8SKb wTcefDWFjy7nO1FFXrtDd8HNkJOawjNa3GgmRk9W2ZyDeDwynM2Os5TbEFtmL0TQ Dyv2CmYwT/IdxgabpwrOAyos0XzAyDALre6Lesc6eE4RWAyfYDD4K87GWW8tKn4L wFGQhYYtgM9JzkQiTTNDcpdv8ZM5QLWgFQqSjlqZNN85BSwr3JiWdMBn5LxLZqpk K+4jyPCTw9wYAyQB512jQe6OqqfjjTLgfLt9aoktlyrMQ7sOxSpZQjOHLHxetDc= =2Zcs -----END PGP SIGNATURE----- --Apple-Mail=_4AB3D82A-B173-4B87-9925-C1C7C6D71148--