emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Allen Li <darkfeline@felesatra.moe>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Query when exiting with running clock
Date: Wed, 03 Mar 2021 22:54:23 -0500	[thread overview]
Message-ID: <87mtvjd15c.fsf@kyleam.com> (raw)
In-Reply-To: <CADbSrJzNAwgTaPD1zUFVP=Ntuak2ccGBJvSKzW0gg3XxiykkOA@mail.gmail.com>

Allen Li writes:

> Thanks for your feedback.  I have addressed your comments.  Please see
> the new patches.

Thanks.  Pushed with a few modifications and a commit on top that adds a
NEWS entry.

1:  39422ba4a ! 1:  303e7c28e org-clock: Query when exiting with running clock
    @@ Commit message
         * lisp/org-clock.el (org-clock-kill-emacs-query): New function.
         (org-clock-ask-before-exiting): New user option.
     
    +    [km: added package-version keyword, fixed function name typo]
    +
     
      ## Notes (amlog) ##
         Message-Id: <CADbSrJzNAwgTaPD1zUFVP=Ntuak2ccGBJvSKzW0gg3XxiykkOA@mail.gmail.com>
    @@ lisp/org-clock.el: (defcustom org-clock-auto-clockout-timer nil
      
     +(defcustom org-clock-ask-before-exiting t
     +  "If non-nil, ask if the user wants to clock out before exiting Emacs.
    -+  This variable only has effect if set with \\[customize]."
    ++This variable only has effect if set with \\[customize]."
     +  :set (lambda (symbol value)
     +         (if value
     +             (add-hook 'kill-emacs-query-functions #'org-clock-kill-emacs-query)
     +           (remove-hook 'kill-emacs-query-functions #'org-clock-kill-emacs-query))
     +         (set symbol value))
    -+  :type 'boolean)
    ++  :type 'boolean
    ++  :package-version '(Org . "9.5"))
     +
      (defvar org-clock-in-prepare-hook nil
        "Hook run when preparing the clock.
    @@ lisp/org-clock.el: (defun org-clock-load ()
     +(defun org-clock-kill-emacs-query ()
     +  "Query user when killing Emacs.
     +This function is added to `kill-emacs-query-functions'."
    -+  (let ((buf (org-clock-buffer)))
    ++  (let ((buf (org-clocking-buffer)))
     +    (when (and buf (yes-or-no-p "Clock out and save? "))
     +      (with-current-buffer buf
     +        (org-clock-out)
2:  d612adc77 = 2:  16b5ee0ef org-clock: Replace org-clocking-buffer with org-clock-is-active
-:  --------- > 3:  4d463ee4b ORG-NEWS: Add entry for org-clock-ask-before-exiting


      reply	other threads:[~2021-03-04  3:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12  8:55 [PATCH] Query when exiting with running clock Allen Li
2021-02-03  5:45 ` Kyle Meyer
2021-03-03  2:08   ` Allen Li
2021-03-04  3:54     ` Kyle Meyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtvjd15c.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=darkfeline@felesatra.moe \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).