all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Sebastien Vauban <sva-news@mygooglest.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Recenter around #+begin_src when moving to previous/next code block
Date: Mon, 16 Sep 2013 06:06:29 +0200	[thread overview]
Message-ID: <1CE288EF-D807-4593-9DE3-CA7F5F23F75F@gmail.com> (raw)
In-Reply-To: <868uyxucoc.fsf@somewhere.org>

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


On 15.9.2013, at 21:06, Sebastien Vauban <sva-news@mygooglest.com> wrote:

> Hi Carsten,
> 
> 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).
>>> 
>>> This is the purpose of this easy patch.
>> 
>> I don't think this patch is the right thing - is feels different from
>> standard Emacs behavior.
> 
> 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'...
> 
> 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

> 
> 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.
> 
> Best regards,
>  Seb
> 
> -- 
> Sebastien Vauban


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

      reply	other threads:[~2013-09-16  4:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 10:02 [PATCH] Recenter around #+begin_src when moving to previous/next code block Sebastien Vauban
2013-09-15  4:46 ` Carsten Dominik
     [not found]   ` <A29F0253-B563-4C55-9E01-140C253E1760-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-15 19:06     ` Sebastien Vauban
2013-09-16  4:06       ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1CE288EF-D807-4593-9DE3-CA7F5F23F75F@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=sva-news@mygooglest.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.