From: Matthew Sauer <improv.philosophy@gmail.com>
To: David Maus <dmaus@ictsoc.de>
Cc: emacs-orgmode@gnu.org, Buck Brody <buckbrody@gmail.com>
Subject: Re: create new files from capture
Date: Mon, 4 Apr 2011 14:49:27 -0500 [thread overview]
Message-ID: <BANLkTikL-aiBWvKDieTF0xx0jZckVDzf1w@mail.gmail.com> (raw)
In-Reply-To: <87pqp1q18t.wl%dmaus@ictsoc.de>
Could one not have it go into a temporary file and then have an exit
hook attatched to a particular template that if a particular property
had been filled in that it would create a new file with that name and
either refile to or cut to and then paste from the kill ring?
Matthew
obviously would require some modification/hacking
On Mon, Apr 4, 2011 at 2:12 PM, David Maus <dmaus@ictsoc.de> wrote:
> At Fri, 1 Apr 2011 13:43:06 -0400,
> Buck Brody wrote:
>> Is there a way to use capture to create new files? Can I fill out
>> the name of the file, and add a date stamp, from within the capture
>> template?
>
> Prompting in the templates happens after the template is placed in the
> target buffer. So AFAIK there is no way to achive this without a
> little bit hacking: You could specify a target function
>
> target Specification of where the captured item should be placed.
> In Org-mode files, targets usually define a node. Entries will
> become children of this node, other types will be added to the
> table or list in the body of this node.
>
> Most target specifications contain a file name. If that file
> name is the empty string, it defaults to `org-default-notes-file'.
> A file can also be given as a variable, function, or Emacs Lisp
> form.
>
> ...
>
> (function function-finding-location)
> Most general way, write your own function to find both
> file and location
>
> That could read the target file name with a prompt.
>
>> I also considered creating a new headline and then exporting the
>> subtree. The problem is that I need to have the title of the new
>> file automatically created based upon the headline, and I can't
>> figure out how to do this.
>
> Same here. The function `org-heading-components' (C-h f
> org-heading-components RET) will get you the title of the headline
> which you would have to transform to a valid file name
> (i.e. `replace-regexp-in-string').
>
> Best,
> -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de
>
next prev parent reply other threads:[~2011-04-04 19:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-01 17:43 create new files from capture Buck Brody
2011-04-04 19:12 ` David Maus
2011-04-04 19:49 ` Matthew Sauer [this message]
2011-04-20 19:00 ` Bill Wishon
2011-04-20 19:22 ` Bill Wishon
2011-04-20 19:44 ` Nick Dokos
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=BANLkTikL-aiBWvKDieTF0xx0jZckVDzf1w@mail.gmail.com \
--to=improv.philosophy@gmail.com \
--cc=buckbrody@gmail.com \
--cc=dmaus@ictsoc.de \
--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.