From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maske Newsgroups: gmane.emacs.help Subject: Re: Help with hooks Date: Sun, 10 Sep 2023 14:03:52 +0200 Message-ID: <9a1233e3-d710-c1b5-5ec5-ecc3958a279a@gmail.com> References: <988fce74-dd23-b32f-cf7d-c48ac2783777@gmail.com> <87v8cpes6f.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19519"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Cc: help-gnu-emacs@gnu.org To: tpeplt Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 10 14:09:46 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 1qfJG5-0004tu-EZ for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 10 Sep 2023 14:09:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfJFP-0000ot-M6; Sun, 10 Sep 2023 08:09:03 -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 1qfJFO-0000oW-Jq for help-gnu-emacs@gnu.org; Sun, 10 Sep 2023 08:09:02 -0400 Original-Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfJFL-0000GJ-PL for help-gnu-emacs@gnu.org; Sun, 10 Sep 2023 08:09:02 -0400 Original-Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-403061cdf2bso8255155e9.2 for ; Sun, 10 Sep 2023 05:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694347738; x=1694952538; darn=gnu.org; h=in-reply-to:content-language:references:cc:to:subject:from :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=LyBOmZPHjEllRe4IArkacXCCOiZVyCG4J4ra6jkCzcQ=; b=GCtfNzAUuxVz44AzJ3rvOouuLp6OHQrbAjy42vHD66vsj2YtyPBE+eeWJ3c/p5GG+J hkSP8zIMcnxmBuZOB/MoaMoHFRrXimw7/vLHJZE6djfyAOE10xL1Td6Un2mTX10bblSQ E23tR+D8uuzI2KnX2k5WwXXbQS/m91jIEB7so1BGOEwC/LRtR+i0veQjfcra66muEl8J EjvuUdrsklt2VPjzY4lX/Sl6W9NOYMkJr+lNS3UiGaTrDAVNMH647yaGg7aabzwDTU69 eWkXiyPti0atNZMeTkN9ZrBWzU+xOIYAhvftFH27WLeMjkjxTq2OLxMFu6cs9ZtQGL/p k6Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694347738; x=1694952538; h=in-reply-to:content-language:references:cc:to:subject:from :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=LyBOmZPHjEllRe4IArkacXCCOiZVyCG4J4ra6jkCzcQ=; b=k9F1BB+gWTF81Jck5gbEucKRhzvRx9pZii9A+kIDaFJqgFeQXF9La9JShToDSN4KgK oIPRTDMi/EWFSfCzvvPnM+dWbEfTsalRgPwNT9Y4x7+N1YP2ZD+d93dDq31LUCXo1lUn E04XkFhgIh9aC6DWfQAJ0UI1HYoJWT8ajTzdO7xQOiIl6VIHLJZsbXbGuTkEn4+epUt8 lzTqBaSH6BimXoyy/MO0r53OOqZEmaQVd+2mqYsbbpOXmmMSQ7mZRBuCV0UqWYbPyq08 dTAwEvltoJliL4y8H8Ol3YZaBb4Idth9HU7R8SBqcamuiMXWadXkJP6xATU7uvMIe44N +5Eg== X-Gm-Message-State: AOJu0YzDWtHnEzgsMCW4aqr8Gf/aWuz3BVce8O9yiCFlwOD5oLLEMp6n dTcGqppnWNjdpUBVZIjL3W8+C59X+hw= X-Google-Smtp-Source: AGHT+IGiAMg5SaB1fAf0WU+xvL8CT+Thio6D7wKTPKWaKFYe3Zwwil7TJovQvOCNZ2zFqtxPiqXS+Q== X-Received: by 2002:a7b:c855:0:b0:3fb:a100:2581 with SMTP id c21-20020a7bc855000000b003fba1002581mr7067188wml.14.1694347737863; Sun, 10 Sep 2023 05:08:57 -0700 (PDT) Original-Received: from [192.168.0.97] (static-75-196-7-89.ipcom.comunitel.net. [89.7.196.75]) by smtp.gmail.com with ESMTPSA id 2-20020a05600c22c200b003fefca26c72sm7102940wmg.23.2023.09.10.05.08.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Sep 2023 05:08:57 -0700 (PDT) Content-Language: en-GB In-Reply-To: <87v8cpes6f.fsf@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=maske1foro@gmail.com; helo=mail-wm1-x331.google.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 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, HTML_MESSAGE=0.001, NICE_REPLY_A=-1.473, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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:145096 Archived-At: Hi tpeplt! I suppose then, that I used correctly the hook, but there could be a bug in the package? I am yanking below what you asked for: 1. Type C-h v org-pomodoro-started-hook org-pomodoro-started-hook is a variable defined in org-pomodoro.el. Value (toggle-tab-bar-mode-from-frame  toggle-menu-bar-mode-from-frame  toggle-tool-bar-mode-from-frame  delete-other-windows) View as literal Set Documentation Hooks run when a pomodoro is started. References References in org-pomodoro.el: (defvar org-pomodoro-started-hook ...) 1 reference Find all references Debugging Forget Source Code ;; Defined in ~/.emacs.d/elpa/org-pomodoro-20220318.1618/org-pomodoro.el Symbol Properties variable-documentation   "Hooks run when a pomodoro is started." 2. Type C-h f toggle-tool-bar-mode-from-frame toggle-tool-bar-mode-from-frame is an autoloaded, interactive and natively compiled function defined in tool-bar.el. Signature (toggle-tool-bar-mode-from-frame &optional ARG) Documentation Toggle tool bar on or off, based on the status of the current frame. See tool-bar-mode for more information. Key Bindings This command is not in any keymaps. References toggle-tool-bar-mode-from-frame is unused in tool-bar.el. Find all references Functions used by toggle-tool-bar-mode-from-frame Debugging Enable edebug Enable tracing Disassemble Forget Source Code ;; Defined in z:/emacs-i686/emacs-29.1/share/emacs/29.1/lisp/tool-bar.el ;;;###autoload ;; Used in the Show/Hide menu, to have the toggle reflect the current frame. (defun toggle-tool-bar-mode-from-frame (&optional arg)   "Toggle tool bar on or off, based on the status of the current frame. See `tool-bar-mode' for more information."   (interactive (list (or current-prefix-arg 'toggle)))   (if (eq arg 'toggle)       (tool-bar-mode (if (> (frame-parameter nil 'tool-bar-lines) 0) 0 1))     (tool-bar-mode arg))) Symbol Properties event-symbol-element-mask   (toggle-tool-bar-mode-from-frame 0) event-symbol-elements   (toggle-tool-bar-mode-from-frame) function-history   ("tool-bar.elc"    (autoload "tool-bar"      ("loaddefs.elc" . 1270775)      t nil)) modifier-cache   ((0 . toggle-tool-bar-mode-from-frame)) El 04/09/2023 a las 19:58, tpeplt escribió: > The following message is a courtesy copy of an article > that has been posted to gnu.emacs.help as well. > > Maske writes: > >> I am having constantly troubles with hooks (basically, I don't know >> how them work). >> >> For example, this has no effect, is it possible to know why? >> >> (add-hook 'org-pomodoro-started-hook 'toggle-tool-bar-mode-from-frame) >> (add-hook 'org-pomodoro-started-hook 'toggle-menu-bar-mode-from-frame) >> (add-hook 'org-pomodoro-started-hook 'toggle-tab-bar-mode-from-frame) >> > Some information that might help in diagnosing your problem: > > 1. Type C-h v org-pomodoro-started-hook > > and then paste that description (from the *Help* buffer) into a > message to this group. > > 2. Type C-h f toggle-tool-bar-mode-from-frame > > and then paste that description into the same message. > > It is possible, for example, that the Emacs Lisp code that reads the > ‘org-pomodoro-started-hook’ variable is not running, for some reason. > > Also, if possible, provide whatever other code or documentation about > the package that you are using that specified setting the > ‘org-pomodoro-started-hook’ variable. > > --