Re: [O] Stop clock on closing emacs

2014-02-08 Thread Igor Sosa Mayor
Am Mon, Feb 03, 2014 at 01:39:25PM +0100, Sebastien Vauban wrote: > A variation: > > --8<---cut here---start->8--- > ;; ask the user if they wish to clock out before killing Emacs > (defun my/org-query-clock-out () > "Ask the user before clocking o

Re: [O] Stop clock on closing emacs

2014-02-03 Thread Sebastien Vauban
Igor Sosa Mayor wrote: > Am Sat, Feb 01, 2014 at 01:03:07PM +0100, Florian Beck wrote: >> Use `kill-emacs-hook': >> >> (defun org-clock-out-maybe () >> "Stop a currently running clock." >> (org-clock-out nil t)) >> >> (add-hook 'kill-emacs-hook 'org-clock-out-maybe) > > Thanks a lot. This is

Re: [O] Stop clock on closing emacs

2014-02-01 Thread Igor Sosa Mayor
Am Sat, Feb 01, 2014 at 02:58:23PM +0100, Florian Beck wrote: > ... I call `save-all-buffer' in the exit hook. > > Sorry for the confusion. on the contrary! Your hint was very helpful! I have finally this working and I'm very happy with it! -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.co

Re: [O] Stop clock on closing emacs

2014-02-01 Thread Florian Beck
On 01.02.2014 14:07, Igor Sosa Mayor wrote: Thanks a lot. This is much better. But: are you really using this idea? The problem is that the kill-emacs-hook does not ask for save the modified buffer. That means: I see that the end time is being put into the org buffer, but the buffer/file is not

Re: [O] Stop clock on closing emacs

2014-02-01 Thread Igor Sosa Mayor
Am Sat, Feb 01, 2014 at 01:03:07PM +0100, Florian Beck wrote: > Use `kill-emacs-hook': > > (defun org-clock-out-maybe () > "Stop a currently running clock." > (org-clock-out nil t)) > > (add-hook 'kill-emacs-hook 'org-clock-out-maybe) Thanks a lot. This is much better. But: are you really us

Re: [O] Stop clock on closing emacs

2014-02-01 Thread Florian Beck
On 01.02.2014 11:45, Igor Sosa Mayor wrote: I would like emacs/orgmode to insert the time I'm closing emacs as end time of the running clock. Use `kill-emacs-hook': (defun org-clock-out-maybe () "Stop a currently running clock." (org-clock-out nil t)) (add-hook 'kill-emacs-hook 'org-clock

Re: [O] Stop clock on closing emacs

2014-02-01 Thread Igor Sosa Mayor
Am Sat, Feb 01, 2014 at 11:53:09AM +0530, Rustom Mody wrote: > In (info "(org)Clocking Work Time") > > is given this: > (setq org-clock-persist 'history) > (org-clock-persistence-insinuate) I have both in my configuration and the clock is not being stopped when I close emacs. It is saved and

Re: [O] Stop clock on closing emacs

2014-01-31 Thread Rustom Mody
Igor wrote > Hi, > > is there any hook to stop automatically a running clock when closing > emacs? > > I can't find anything neither in the manual nor in internet... In (info "(org)Clocking Work Time") is given this: (setq org-clock-persist 'history) (org-clock-persistence-insinuate) They d

[O] Stop clock on closing emacs

2014-01-31 Thread Igor Sosa Mayor
Hi, is there any hook to stop automatically a running clock when closing emacs? I can't find anything neither in the manual nor in internet... many thanks in advance. -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid