From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: org-tree-to-indirect-buffer - naming and prefix in define keyboard key Date: Tue, 09 Jun 2015 14:38:26 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2InZ-0006FG-CQ for emacs-orgmode@gnu.org; Tue, 09 Jun 2015 08:38:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z2InV-0004gY-Vd for emacs-orgmode@gnu.org; Tue, 09 Jun 2015 08:38:33 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:1419) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2InV-0004fj-Pd for emacs-orgmode@gnu.org; Tue, 09 Jun 2015 08:38:29 -0400 In-Reply-To: (Rainer M. Krug's message of "Tue, 09 Jun 2015 10:36:36 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rainer M Krug Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2015-06-09 10:36, Rainer M Krug 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 "") (lambda () (interactive) (org-tree-to-indirect-buffer '(4)))) #+end_src > 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 =E2=80=A6 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. Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Weekly CO=E2=82=82 average (2015-05-30, Mauna Loa Observatory): 403.41 ppm --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJVdt5DAAoJEAQNCjtO0uXHroMH/0A37XSxo8l2cwluG63v9YCh o+eSbTzkUvYgmx1umzkK17JsJsFGPCLUJTDvx+3LvdTrK5IZ2msbY4Bv7Yjzz+Us OB+hXMUmNpWzAmG65GN68bUJJH6gkGlyZzQD2kWtJ7a+wURQro/yb0W7gMqyDdB3 jLcU04YYRFyyZlLnsnkJ/K9mF5RX7BAQ/Fce/9LI6AXL9oqhLEN2H2EUzGVKMZ4K 0a2qkj3BoJEsHV5sbP5c5mMRNnpX20cJoSV6Y/G31/lIGqKmRWzI0nZZ44mjW9lE ZcLVZQNVUrZOUq8jowgAk5GUlMl3RvsdQqpWHwnMIe9MgxvwZU8emsbELfOF1e0= =JtOa -----END PGP SIGNATURE----- --=-=-=--