From: Rainer M Krug <Rainer@krugs.de>
To: Alan Schmitt <alan.schmitt@polytechnique.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-tree-to-indirect-buffer - naming and prefix in define keyboard key
Date: Wed, 10 Jun 2015 14:59:57 +0200 [thread overview]
Message-ID: <m2ioav4t2q.fsf@krugs.de> (raw)
In-Reply-To: <m23821vyyl.fsf@charm-ecran.irisa.fr> (Alan Schmitt's message of "Tue, 09 Jun 2015 14:38:26 +0200")
[-- Attachment #1: Type: text/plain, Size: 2156 bytes --]
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> On 2015-06-09 10:36, Rainer M Krug <Rainer@krugs.de> writes:
>
>> While writing this, I discovered the C-u prefix to keep the last opened
>> indirect buffer open.
>>
>> But I still have two question:
>>
>> 1) How can I map the command C-u M-x ~org-tree-to-indirect-buffer~ to a
>> keyboard shortcut?
>
> According to http://ergoemacs.org/emacs/elisp_universal_argument.html
> the universal argument corresponds to an argument '(4). So you could
> try:
>
> #+begin_src emacs-lisp
> (global-set-key
> (kbd "<f8>")
> (lambda ()
> (interactive)
> (org-tree-to-indirect-buffer '(4))))
> #+end_src
Thanks - works perfectly. I just used
#+begin_src emacs-lisp
(define-key org-mode-map "\C-ci" (lambda ()
(interactive)
(org-tree-to-indirect-buffer '(4))))
#+end_src
as it only makes sense in org files (or can I use it in other files as
well?).
>
>> 2) Can I change the naming of the indirect buffer? To prefix the .org
>> buffer name makes sense, but is cluttering my tabbar (yes - I still use
>> it) - so I would prefer to simply use the name of the subtree.
>
> The buffer name is set by the function `org-get-indirect-buffer'.
> You could try to change the name after calling the function … for
> instance by doing
> #+begin_src emacs-lisp
> (rename-buffer (org-get-heading) t)
> #+end_src
> (the t at the end makes sure the name is unique), but for this to work
> you need to go to the buffer that was just created, and I don't know how
> to do that.
Thanks - I will look into this and post a new question.
Thanks a lot,
Rainer
>
> Alan
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer@krugs.de
Skype: RMkrug
PGP: 0x0F52F982
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
prev parent reply other threads:[~2015-06-10 13:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 8:36 org-tree-to-indirect-buffer - naming and prefix in define keyboard key Rainer M Krug
2015-06-09 12:38 ` Alan Schmitt
2015-06-10 12:59 ` Rainer M Krug [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2ioav4t2q.fsf@krugs.de \
--to=rainer@krugs.de \
--cc=alan.schmitt@polytechnique.org \
--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 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.