emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Capture templates with "function" type


From: Bastien
Subject: Re: [O] Capture templates with "function" type
Date: Tue, 05 Nov 2013 18:25:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Hi Brett,

Brett Viren <address@hidden> writes:

> (defun bv-daily-log-file ()
>   (find-file (concat "~/org/web/notes/" 
>                   (format-time-string "%Y-%m-%d") ".org"))
>   (goto-char (point-max))
>   (newline 2)
> )

You may try this (not tested myself):

(defun bv-daily-log-file ()
  (save-window-excursion
    (find-file (concat "~/org/web/notes/" 
                       (format-time-string "%Y-%m-%d") ".org"))
    (goto-char (point-max))
    (newline 2)))

The trick is to use `save-window-excursion'.

-- 
 Bastien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]