* capture template and writeroom mode ?
@ 2017-07-02 14:27 Jean-Christophe Helary
2017-07-03 3:46 ` Bastien
0 siblings, 1 reply; 3+ messages in thread
From: Jean-Christophe Helary @ 2017-07-02 14:27 UTC (permalink / raw)
To: Org-mode
What would be the best way to have writeroom mode called in one given capture template and not the others ?
Jean-Christophe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: capture template and writeroom mode ?
2017-07-02 14:27 capture template and writeroom mode ? Jean-Christophe Helary
@ 2017-07-03 3:46 ` Bastien
2017-07-04 2:59 ` Jean-Christophe Helary
0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2017-07-03 3:46 UTC (permalink / raw)
To: Jean-Christophe Helary; +Cc: Org-mode
Hi Jean-Christophe,
Jean-Christophe Helary <jean.christophe.helary@gmail.com> writes:
> What would be the best way to have writeroom mode called in one
> given capture template and not the others ?
I would you a (file+)function to get the location:
`(file+function "path/to/file" function-finding-location)'
A function to find the right location in the file.
`(function function-finding-location)'
Most general way: write your own function which both visits
the file and moves point to the right location.
then tell the function to use writeroom-mode.
I've not tested, though.
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: capture template and writeroom mode ?
2017-07-03 3:46 ` Bastien
@ 2017-07-04 2:59 ` Jean-Christophe Helary
0 siblings, 0 replies; 3+ messages in thread
From: Jean-Christophe Helary @ 2017-07-04 2:59 UTC (permalink / raw)
To: Bastien; +Cc: Org-mode
Thank you Bsstien.
> On Jul 3, 2017, at 12:46, Bastien <bzg@gnu.org> wrote:
>
>> What would be the best way to have writeroom mode called in one
>> given capture template and not the others ?
>
> I would you a (file+)function to get the location:
>
> `(file+function "path/to/file" function-finding-location)'
> A function to find the right location in the file.
>
> `(function function-finding-location)'
> Most general way: write your own function which both visits
> the file and moves point to the right location.
>
> then tell the function to use writeroom-mode.
I'm already using the file+datetree target so I guess that's not possible, unless I define a function that triggers the writeroom mode *and* adds the datetree...
("j" "Journal" entry (file+datetree "~/org/journal.org")
"* %^{Titre} [%<%H:%M>]\n%?\n") ;;; :clock-in t :clock-resume t)
Jean-Christophe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-04 2:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-02 14:27 capture template and writeroom mode ? Jean-Christophe Helary
2017-07-03 3:46 ` Bastien
2017-07-04 2:59 ` Jean-Christophe Helary
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).