From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Christophe Helary Subject: Re: capture template and writeroom mode ? Date: Tue, 4 Jul 2017 11:59:19 +0900 Message-ID: <902AEE15-DBA8-4E73-8EA5-A08F6802EDA3@gmail.com> References: <3565C34A-73CA-4A0C-ACA4-19655368A25E@gmail.com> <877ezqkwrr.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSE3l-0004GH-35 for emacs-orgmode@gnu.org; Mon, 03 Jul 2017 22:59:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSE3k-0004iJ-Gw for emacs-orgmode@gnu.org; Mon, 03 Jul 2017 22:59:29 -0400 In-Reply-To: <877ezqkwrr.fsf@gnu.org> 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" To: Bastien Cc: Org-mode Thank you Bsstien. > On Jul 3, 2017, at 12:46, Bastien wrote: >=20 >> What would be the best way to have writeroom mode called in one >> given capture template and not the others ? >=20 > I would you a (file+)function to get the location: >=20 > `(file+function "path/to/file" function-finding-location)' > A function to find the right location in the file. >=20 > `(function function-finding-location)' > Most general way: write your own function which both visits > the file and moves point to the right location. >=20 > 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") = =20 "* %^{Titre} [%<%H:%M>]\n%?\n") ;;; :clock-in t = :clock-resume t) =20 Jean-Christophe=20=