[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [RFC] Repeat Heading movement commands
From: |
Kyle Meyer |
Subject: |
Re: [O] [RFC] Repeat Heading movement commands |
Date: |
Sun, 29 Mar 2015 16:05:40 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Jacob Gerlach <address@hidden> wrote:
> Hi List,
>
> I often find myself wanting to move up by several headings:
>
> C-c C-p, C-c C-p, C-c C-p...
> (I don't usually know ahead of time how many I want to move, so I
> can't use a numeric prefix arg)
>
> I like how `set-mark-command' works with non-nil `set-mark-repeat-pop'
> to avoid the need to repeat a prefix key and wanted to try something
> similar for C-p. I came up with the following:
>
> (define-key org-mode-map
> (kbd "C-p")
> (lambda (arg)
> (interactive "p")
> (if (not (eq last-command 'org-previous-visible-heading))
> (previous-line arg)
> (org-previous-visible-heading arg)
> (setq this-command 'org-previous-visible-heading))))
>
> So now I can do:
> C-c C-p, C-p, C-p...
> And repeatedly move by headlines.
With org-use-speed-commands set to t, this could be "C-c C-p p p".
--
Kyle
- [O] [RFC] Repeat Heading movement commands, Jacob Gerlach, 2015/03/29
- Re: [O] [RFC] Repeat Heading movement commands,
Kyle Meyer <=
- Re: [O] [RFC] Repeat Heading movement commands, John Kitchin, 2015/03/29
- Re: [O] [RFC] Repeat Heading movement commands, Kyle Meyer, 2015/03/29
- Re: [O] [RFC] Repeat Heading movement commands, Xavier Maillard, 2015/03/29
- Re: [O] [RFC] Repeat Heading movement commands, Kyle Meyer, 2015/03/29
- Re: [O] [RFC] Repeat Heading movement commands, Suvayu Ali, 2015/03/29
- Re: [O] [RFC] Repeat Heading movement commands, Jacob Gerlach, 2015/03/29