emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] TAB from within a text


From: Alan Schmitt
Subject: Re: [O] TAB from within a text
Date: Fri, 03 Feb 2012 15:50:02 +0100

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

Hi, everybody.

Writing a longish text for my coworkers this morning, I notice that I do
not know a quick way for collapsing the whole set of paragraphs I'm
currently writing, when their header happens to be many screenfuls above
point.  I have to first return to that header and do TAB there.  Even
this return was not evident to me at first. I wrongly thought that `C-c
C-u' would do it, but it jumps far too much and lands one level higher
than I expected.  Then, /(org)Motion node/ taught me that I could use
`C-c C-j <up>' to this purpose; which is slightly convoluted to me, as I
always perceived `C-c C-j' as a kind of sophisticated "reveal".

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,

Alan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]