"Alan Schmitt" <alan.schm...@polytechnique.org> writes:

> On 3 Feb 2012, at 15:36, François Pinard wrote:

>> Is it unreasonable for me to hope that, instead of `C-c C-j <up>
>> TAB', a mere TAB from within a long text would quickly do what I
>> wanted?

> I have this in my .emacs:

> ;; From
> http://stackoverflow.com/questions/8607656/emacs-org-mode-how-to-fold-block-without-going-to-block-header,
> how to fold a block from inside
> (defun zin/org-cycle-current-headline ()
>   (interactive)
>   (outline-previous-heading)
>   (org-cycle))

> (add-hook 'org-mode-hook
>         (lambda ()
>           (define-key org-mode-map (kbd "C-c t")
> zin/org-cycle-current-headline)
>           ))

> Hope this helps,

Hello, Alan, and gang.

Yes, it does, yet a bit unexpectedly.  I see your usage of "/" to
control the "my" name space.  I also saw ":" and "::".  Maybe I should
change my habits, as I prepend "fp-", which is a bit dumb.  I wonder if
some common wisdom developed in that area, which I should follow.

It also helps as telling that I'm abusing of global-set-key for my Org
mode key bindings, while I should be more particular, as you do. :-)

As for the real problem, my suggestion was really that TAB (and not `C-c
t') be used for such a purpose, in Org mode proper, as it seems to me as
the natural thing to do, and might be generally useful.  However, I'm
not fully sure the suggestion is necessarily a good one, as TAB also has
special meaning here and there (I'm thinking of tables).  Maybe TAB
would be good enough nevertheless to be worth amending?

François

Reply via email to