* TAB from within a text
@ 2012-02-03 14:36 François Pinard
2012-02-03 14:50 ` Alan Schmitt
2012-02-03 15:25 ` Nick Dokos
0 siblings, 2 replies; 5+ messages in thread
From: François Pinard @ 2012-02-03 14:36 UTC (permalink / raw)
To: emacs-orgmode
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?
François
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: TAB from within a text
2012-02-03 14:36 TAB from within a text François Pinard
@ 2012-02-03 14:50 ` Alan Schmitt
2012-02-03 15:30 ` François Pinard
2012-02-03 15:25 ` Nick Dokos
1 sibling, 1 reply; 5+ messages in thread
From: Alan Schmitt @ 2012-02-03 14:50 UTC (permalink / raw)
To: François Pinard; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: TAB from within a text
2012-02-03 14:50 ` Alan Schmitt
@ 2012-02-03 15:30 ` François Pinard
0 siblings, 0 replies; 5+ messages in thread
From: François Pinard @ 2012-02-03 15:30 UTC (permalink / raw)
To: Alan Schmitt; +Cc: emacs-orgmode
"Alan Schmitt" <alan.schmitt@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: TAB from within a text
2012-02-03 14:36 TAB from within a text François Pinard
2012-02-03 14:50 ` Alan Schmitt
@ 2012-02-03 15:25 ` Nick Dokos
2012-02-03 15:36 ` François Pinard
1 sibling, 1 reply; 5+ messages in thread
From: Nick Dokos @ 2012-02-03 15:25 UTC (permalink / raw)
To: =?utf-8?Q?Fran=C3=A7ois?= Pinard; +Cc: nicholas.dokos, emacs-orgmode
François Pinard <pinard@iro.umontreal.ca> 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".
>
Checking the navigation menu, I thought that
C-c C-p == outline-previous-visible-heading
C-c C-b == org-backward-same-level
C-c C-u == outline-up-heading
(in particular, C-c C-p in this case) would be the more natural choices for
navigation.
C-c C-j == org-goto does a lot more than that - in particular, it is modal
and you have to get out of the mode, e.g. by selecting a location and pressing
<RET>.
> 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?
>
It does seem unreasonable to me, looking from the outside in: TAB is
overworked, overloaded and much too smart for its own good, and you are
asking it to be smarter and do more :-) But I wouldn't dismiss it as
impossible: org itself came about from a similar idea applied to outline.el
Whether it's worth it, I don't know: C-c C-p TAB has worked for me and has
seemed painless enough to me so as not to go looking for something "better".
Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: TAB from within a text
2012-02-03 15:25 ` Nick Dokos
@ 2012-02-03 15:36 ` François Pinard
0 siblings, 0 replies; 5+ messages in thread
From: François Pinard @ 2012-02-03 15:36 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode
Nick Dokos <nicholas.dokos@hp.com> writes:
> [Your suggestion of overloading TAB] does seem unreasonable to me, TAB
> is overworked, overloaded and much too smart for its own good [...]
> C-c C-p TAB [...] has seemed painless enough to me so as not to go
> looking for something "better".
Sold! :-) Thanks, Nick, for your wise comments.
François
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-02-03 15:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-03 14:36 TAB from within a text François Pinard
2012-02-03 14:50 ` Alan Schmitt
2012-02-03 15:30 ` François Pinard
2012-02-03 15:25 ` Nick Dokos
2012-02-03 15:36 ` François Pinard
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.