emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Auto org-mobile-push kills buffer


From: Jorge
Subject: Re: [O] Auto org-mobile-push kills buffer
Date: Sat, 29 Aug 2015 11:35:50 -0300

This has happened two more times.

On Wed, Aug 26, 2015 at 11:43 AM, Jorge <address@hidden> wrote:
> Hi.  I use MobileOrg.  To automate org-mobile-push I have installed
> the code below from
> https://github.com/matburt/mobileorg-android/wiki/FAQ.  However, the
> code sometimes does weird things, such as killing the current buffer
> (happened twice).
> Is this a known bug?  Also, in the last line, why is the lambda quoted?
>
> ;; https://github.com/matburt/mobileorg-android/wiki/FAQ
> (defvar org-mobile-push-timer nil
>   "Timer that `org-mobile-push-timer' used to reschedule itself, or nil.")
>
> (defun org-mobile-push-with-delay (secs)
>   (when org-mobile-push-timer
>     (cancel-timer org-mobile-push-timer))
>   (setq org-mobile-push-timer
>         (run-with-idle-timer
>          (* 1 secs) nil #'org-mobile-push)))
>
> (add-hook 'after-save-hook
>  (lambda ()
>    (when (eq major-mode 'org-mode)
>      (dolist (file (org-mobile-files-alist))
>       (if (string= (file-truename (expand-file-name (car file)))
>   (file-truename (buffer-file-name)))
>            (org-mobile-push-with-delay 30)))
>      )))
>
> ;; refreshes agenda file each day
> (run-at-time "00:05" 86400 '(lambda () (org-mobile-push-with-delay 1)))



reply via email to

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