From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tpeplt Newsgroups: gmane.emacs.help Subject: Re: Help with hooks Date: Sun, 10 Sep 2023 19:36:44 -0400 Message-ID: <871qf5lhwz.fsf@gmail.com> References: <988fce74-dd23-b32f-cf7d-c48ac2783777@gmail.com> <87v8cpes6f.fsf@gmail.com> <9a1233e3-d710-c1b5-5ec5-ecc3958a279a@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30551"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Maske Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 11 01:37:42 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qfTzq-0007hX-96 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 11 Sep 2023 01:37:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfTzC-00041N-QZ; Sun, 10 Sep 2023 19:37:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qfTzA-00041C-TP for help-gnu-emacs@gnu.org; Sun, 10 Sep 2023 19:37:00 -0400 Original-Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfTyx-0006rc-D2 for help-gnu-emacs@gnu.org; Sun, 10 Sep 2023 19:37:00 -0400 Original-Received: by mail-qk1-x72f.google.com with SMTP id af79cd13be357-76dbe786527so200230885a.2 for ; Sun, 10 Sep 2023 16:36:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694389006; x=1694993806; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:newgroups:references:subject:cc:to:from:from:to:cc :subject:date:message-id:reply-to; bh=fvfi4msmJtnSrGFw1LxN5zZbcweaYjDnDhrUMD2rAUA=; b=q7ZFrhYkmUl0Ysr6dd2lzZ7AYkaZtnV/aRI3gXZyAw2a76zEELa34QFORG+zMy3hfr tgOpd+xnKZNFK9gFQa6A3JnND+YuD1MV8EFkacmpOsYThEEcWQdCK/dn1/LICRyjoFc3 hQNl6BeLfVBchN/yn4v9+MUYkG8Qrpmrt856YR/QWOCT+JjKqfp4UOgwnyWnG5lgXnVa FCEJsiDA2gutR7eCVl7FOlLGtc49k1WYHNUOk0woAPl4N/J/R/55uY4adMqb5RyZ7mh5 4iU1d387R9ikw9v/r8YGeIsQT1y36xdt6/t/aP2sKRK2x/M3vjMkTIA2eLWV+/KANRYY ZYeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694389006; x=1694993806; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:newgroups:references:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fvfi4msmJtnSrGFw1LxN5zZbcweaYjDnDhrUMD2rAUA=; b=HSz9ia+h9qnpQqCFdQl8RgcSmVScYtX28dpqUCkqq1ygVNZZGfP4ZxSaInDPaW4v8M C07FiFOFZh1On9Yu2Z2Lm91U95AcSMwIBBbnNYwil4VOlji3aFnGksPx26y6x+ZW22xj 2UnzxRWYfKiUJAyIa3sbh3B4mvYBIltiYQVfj0JnlrH/8EZpqqVFjFFbFTrJeX61L8Ax pGkHwlsq8ek9KiCHJvbQ1JCRJGMwNsi9puC7UqYCgEOxvKjrn1d4Iy6AiIk92yWzfKt2 xYp8DEi+qyZXdNieA0saDHKzxISRTThHAfXptWLHUbzNPC7yGeaZ5wPGsk+S58+W13UJ aEmQ== X-Gm-Message-State: AOJu0YxFW3NKsZF4v4NIqcJJko0RVlXicJjqqBSvdZq3KfsVeQXQjMnR WxJKUKAuKUbNscPoOB4rHgQ3+OGhOG10tw== X-Google-Smtp-Source: AGHT+IHZ31yt1Ghs6q+uirKILZ+ZxY6WAv+/gt6ellWDP3OQZxBrQq+gVpnlBSqvtmALruhThC+GIA== X-Received: by 2002:a05:620a:3953:b0:76c:d4be:7c93 with SMTP id qs19-20020a05620a395300b0076cd4be7c93mr8401278qkn.20.1694389005842; Sun, 10 Sep 2023 16:36:45 -0700 (PDT) Original-Received: from t530.local ([2600:8806:a821:2b00::354f]) by smtp.gmail.com with ESMTPSA id o13-20020a05620a110d00b00767dba7a4d3sm2141060qkk.109.2023.09.10.16.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 16:36:45 -0700 (PDT) Newgroups: gnu.emacs.help In-Reply-To: <9a1233e3-d710-c1b5-5ec5-ecc3958a279a@gmail.com> (Maske's message of "Sun, 10 Sep 2023 14:03:52 +0200") Received-SPF: pass client-ip=2607:f8b0:4864:20::72f; envelope-from=tpeplt@gmail.com; helo=mail-qk1-x72f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145098 Archived-At: Maske 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 =E2=80=98org-pomodoro=E2=80=99 package in the =E2=80=98melpa-stable=E2=80= =99 repository (http://stable.melpa.org/packages/), the version number for the package is 2.1.0, rather than your package=E2=80=99s version number (20220318.1618). Either this is an experimental version of the package or there is an upgrade that you could install for =E2=80=98org-pomodoro=E2=80=99. The function =E2=80=98org-pomodoro-start=E2=80=99 in the package calls =E2= =80=98run-hooks=E2=80=99 using =E2=80=98org-pomodoro-started-hook=E2=80=99. Is it possible that this func= tion 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 =E2=80=98org-pomodoro-start=E2=80=99 also at= tempted 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)) --