emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: Org-mode Mode <emacs-orgmode@gnu.org>
Subject: Re: Making TAB a touch more magical
Date: Tue, 3 Nov 2009 10:39:59 +0100	[thread overview]
Message-ID: <26C91EC5-1CF7-4CC5-B5A6-4C4C7E9D29D7@gmail.com> (raw)
In-Reply-To: <F212CCC7-A85C-4BD6-B715-E9272786A5E4@gmail.com>


On Nov 2, 2009, at 2:18 PM, Carsten Dominik wrote:

>
> On Oct 17, 2009, at 2:59 AM, John Wiegley wrote:
>
>> In most "power" outliners on the Mac, pressing TAB indents the  
>> outline level of the current item.  This lets you add subnotes very  
>> quickly by typing M-RET TAB.  (I find M-S-<right> way too  
>> cumbersome to use while typing).
>>
>> Since pressing TAB on a new entry (one with no body) doesn't do  
>> anything right now, I think TAB in that case should do what M-S- 
>> <right> does.  This little snippet achieves that:
>>
>> (defun org-indent-empty-items (arg)
>> (when (eq arg 'empty)
>>   (goto-char (line-end-position))
>>   (cond
>>    ((org-at-item-p) (org-indent-item 1))
>>    ((org-on-heading-p) (org-demote-subtree)))))
>>
>> (add-hook 'org-pre-cycle-hook 'org-indent-empty-items)
>
> Hi John,
>
> this is not a bad idea, but it is a bit unstable because
> the definition of empty entry is a bit unstable, it
> depends on empty lines and how they are treated.
>
> An alternative would be to activate this special feature only  
> immediately
> after starting a new entry, either by looking at last-command, or,  
> maybe better,
> by doing this in entries which only have the stars and maybe a TODO  
> keyword, but
> but no text yet.
>
> Then, TAB could even walk you through a number of indentations, like  
> child,
> and then parent, grandparent,..., all the way to top level, and then  
> back
> to the initial level.

This actually does work now, both in empty headlines, and in empty  
plain list items.
I find it *very* convenient.

>
> - Carsten
>
>>
>> This also works for regular lists.
>>
>> John
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> - Carsten
>
>
>

- Carsten

      parent reply	other threads:[~2009-11-03  9:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-17  0:59 Making TAB a touch more magical John Wiegley
2009-10-17  6:55 ` Carsten Dominik
2009-11-02 13:18 ` Carsten Dominik
2009-11-02 19:56   ` Samuel Wales
2009-11-03  5:29     ` Carsten Dominik
2009-11-03  9:39   ` 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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=26C91EC5-1CF7-4CC5-B5A6-4C4C7E9D29D7@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).