From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: Automatic title generation for capture mode Date: Sun, 26 Jun 2011 20:46:05 +0200 Message-ID: <871uygmnwy.wl%dmaus@ictsoc.de> References: <8982FC73-8D15-4B0A-9298-DE7B3F448C1C@gmx.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Sun_Jun_26_20:46:05_2011-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QauLS-0002B1-U6 for emacs-orgmode@gnu.org; Sun, 26 Jun 2011 14:46:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QauLR-0005Pv-4l for emacs-orgmode@gnu.org; Sun, 26 Jun 2011 14:46:10 -0400 Received: from app1a.xlhost.de ([213.202.242.161]:39769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QauLQ-0005Po-PN for emacs-orgmode@gnu.org; Sun, 26 Jun 2011 14:46:08 -0400 In-Reply-To: <8982FC73-8D15-4B0A-9298-DE7B3F448C1C@gmx.de> 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: Jae Hee Lee Cc: emacs-orgmode@gnu.org --pgp-sign-Multipart_Sun_Jun_26_20:46:05_2011-1 Content-Type: text/plain; charset=US-ASCII At Tue, 12 Apr 2011 22:25:53 +0200, Jae Hee Lee wrote: > > Hi all, > > the default remember-mode generates a title automatically from the text input. > > For example, if I enter the command M-x org-remember > and input the content of this e-mail followed by C-c C-c, > the title "(Hi all)" is automatically generated. > > I think this feature is really nice, because sometimes you don't have any specific title for your text or you are just too lazy to think of a title. > Unfortunately, I have no idea how to realize this using the capture-mode templates. > > Is there a way to make a capture-mode template having this feature? You might check out C-h v org-capture-templates RET org-capture-templates is a variable defined in `org-capture.el'. Its value is shown below. Documentation: Templates for the creation of new entries. Each entry is a list with the following items: ... template The template for creating the capture item. If you leave this empty, an appropriate default template will be used. See below for more details. Instead of a string, this may also be one of (file "/path/to/template-file") (function function-returning-the-template) in order to get a template from a file, or dynamically from a function. ... So something like (setq org-capture-templates '(("x" "TEMPLATE NAME" entry (file "~/org/inbox.org")) (my-template-function))) Should work. `my-template-function' would create the template; the buffer that was visitied when the template was called can be get by (org-capture-get :original-buffer) Best, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... dmaus@ictsoc.de --pgp-sign-Multipart_Sun_Jun_26_20:46:05_2011-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EABEIAAYFAk4Hfm0ACgkQma24O1pEeOa2fgEAh+uCwQvjEtTt42jS2bVTKYUN EDPVtqlyRGtnolAT6wQBAL8+JVCq0rh4GJk8gQV5E2HQd+HCjePG0LBMpYzlfpPr =WjxY -----END PGP SIGNATURE----- --pgp-sign-Multipart_Sun_Jun_26_20:46:05_2011-1--