unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: tpeplt <tpeplt@gmail.com>
To: Maske <maske1foro@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Help with hooks
Date: Sun, 10 Sep 2023 19:36:44 -0400	[thread overview]
Message-ID: <871qf5lhwz.fsf@gmail.com> (raw)
In-Reply-To: <9a1233e3-d710-c1b5-5ec5-ecc3958a279a@gmail.com> (Maske's message of "Sun, 10 Sep 2023 14:03:52 +0200")

Maske <maske1foro@gmail.com> writes:

>
> Source Code
> ;; Defined in ~/.emacs.d/elpa/org-pomodoro-20220318.1618/org-pomodoro.el
>

This might have no effect on your problem, but when I looked at the
‘org-pomodoro’ package in the ‘melpa-stable’ repository
(http://stable.melpa.org/packages/), the version number for the package
is 2.1.0, rather than your package’s version number (20220318.1618).
Either this is an experimental version of the package or there is an
upgrade that you could install for ‘org-pomodoro’.

The function ‘org-pomodoro-start’ in the package calls ‘run-hooks’ using
‘org-pomodoro-started-hook’.  Is it possible that this function is not
being called in your setup?  You might want to call that function
directly to see whether it would cause the toggling that you want.
(Unfortunately, the package does not install any documentation to
describe how it should be used.)  In addition to running the hooks, the
package attempts to play a sound.  You might not hear the sound
depending on your configuration, but if you do hear the start sound,
then that should indicate that ‘org-pomodoro-start’ also attempted to
run the hooks.

Here is the definition of the function as it exists in org-pomodoro.el
version 2.1.0:

(defun org-pomodoro-start (&optional state)
  "Start the `org-pomodoro` timer.
The argument STATE is optional.  The default state is `:pomodoro`."
  (when org-pomodoro-timer (cancel-timer org-pomodoro-timer))

  ;; add the org-pomodoro-mode-line to the global-mode-string
  (unless global-mode-string (setq global-mode-string '("")))
  (unless (memq 'org-pomodoro-mode-line global-mode-string)
    (setq global-mode-string (append global-mode-string
                                     '(org-pomodoro-mode-line))))

  (org-pomodoro-set (or state :pomodoro))

  (when (eq org-pomodoro-state :pomodoro)
    (org-pomodoro-maybe-play-sound :start)
    (run-hooks 'org-pomodoro-started-hook))
  (org-pomodoro-update-mode-line)
  (org-agenda-maybe-redo))

--



  reply	other threads:[~2023-09-10 23:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-03 17:05 Help with hooks Maske
2023-09-04 17:58 ` tpeplt
     [not found]   ` <87cyyxpzhp.fsf@dataswamp.org>
2023-09-09 10:41     ` Maske
2023-09-10 20:43       ` Emanuel Berg
2023-09-12 13:02         ` Mailing lists help [it was: Help with hooks] Maske
2023-09-12 13:16           ` Po Lu
2023-09-12 13:28             ` Maske
2023-09-12 13:39               ` Po Lu
2023-09-12 15:10           ` Eric S Fraga
2023-09-12 16:04             ` Emanuel Berg
2023-09-12 17:27             ` Maske
2023-09-10 12:03   ` Help with hooks Maske
2023-09-10 23:36     ` tpeplt [this message]
2023-09-11 13:00       ` tpeplt
2023-09-15 13:46       ` Maske
2023-09-16  3:09         ` tpeplt

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=871qf5lhwz.fsf@gmail.com \
    --to=tpeplt@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=maske1foro@gmail.com \
    /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.
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).