From: Carsten Dominik <carsten.dominik@gmail.com>
To: Levin Du <zsdjw@21cn.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Let tab do org-cycle only at special place.
Date: Wed, 23 May 2007 16:20:09 +0200 [thread overview]
Message-ID: <431a3cfee08266a8b3a5d4c1f4dac538@science.uva.nl> (raw)
In-Reply-To: <200705231756.53173.zsdjw@21cn.com>
Yes, this is a good idea.
The org-mode implementation will use the variable
org-cycle-emulate-tab, in the next version there will be an additional
value for this option to get the bahavior you propose.
Thanks!
- Carsten
On May 23, 2007, at 11:56, Levin Du wrote:
> I've my busy tab key set to a super expand/indent function:
>
> (global-set-key "\t" 'ext-super-tab)
>
> Currently in org-mode, tab is only doing indent in none
> headline/special
> place. I'd like to use tab only at the beginning of headline or
> buffer. So I
> put something like this in my org-conf.el :
>
> (defun org-tab (&optional arg)
> "Do org-cycle only at the beginning of a headline, otherwise do
> the job defined in global keymap."
> (interactive "P")
> (let* ((outline-regexp
> (if (and (org-mode-p) org-cycle-include-plain-lists)
> "\\(?:\\*+\\|\\([ \t]*\\)\\([-+*]\\|[0-9]+[.)]\\) \\)"
> outline-regexp))
> (bob-special (and org-cycle-global-at-bob (bobp)
> (not (looking-at outline-regexp)))))
> (if (or bob-special
> (eq arg t)
> (integerp arg)
> (org-at-table-p 'any)
> (looking-at outline-regexp))
> (org-cycle arg)
> (call-interactively (global-key-binding "\t")))))
>
> (define-key org-mode-map [(tab)] 'org-tab)
>
> Hope this is useful for someone else.
>
> Levin
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477
next prev parent reply other threads:[~2007-05-23 14:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-23 9:56 Let tab do org-cycle only at special place Levin Du
2007-05-23 14:20 ` Carsten Dominik [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-05-22 6:12 levin
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=431a3cfee08266a8b3a5d4c1f4dac538@science.uva.nl \
--to=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=zsdjw@21cn.com \
/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).