From unknown Sat Sep 06 10:20:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode Resent-From: Wilhelm Kirschbaum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Nov 2023 18:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67207 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 67207@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170007333921545 (code B ref -1); Wed, 15 Nov 2023 18:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Nov 2023 18:35:39 +0000 Received: from localhost ([127.0.0.1]:53776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3Kjf-0005bN-Bx for submit@debbugs.gnu.org; Wed, 15 Nov 2023 13:35:39 -0500 Received: from lists.gnu.org ([2001:470:142::17]:46558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3KjV-0005aj-7j for submit@debbugs.gnu.org; Wed, 15 Nov 2023 13:35:34 -0500 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 1r3KjO-0006v8-8s for bug-gnu-emacs@gnu.org; Wed, 15 Nov 2023 13:35:18 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r3KjL-0003Jz-CF for bug-gnu-emacs@gnu.org; Wed, 15 Nov 2023 13:35:16 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40859c464daso57182285e9.1 for ; Wed, 15 Nov 2023 10:35:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700073311; x=1700678111; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=w3mqX2iQNuhTUA8C/7jbFz0bhaoYS6P2+umF0l6l5x4=; b=aN57DknP9wLv8elx27dwS8hSyvHo8RHos5vQRqTiX4MKBEqUuaOPVSqBHEXlax1lYh gDv/aoTphYA6ulX6V9OZiNNVDqrlwSkF3X2XseMFm8HmUtIvdhigEwBDP5KA82WufpkN XssV5KXzsGRpstWg9Xazl126MZ9sZVmfLRogrn5sUG7YVBzres6gXyh9r/6U/HJPmCjk 9uwI0DSRL1XO+jIvIeqPoByIwd/5K6NVEMd39LSM0ExamGFIWUbEqYl9bWJq6N8irWsx agib+arDIw1/RKh/NzHLKn3E6AuGexQF2Ocweak/pD/o4nCEaQWFo+LXmfHJUw7KbyKY YJwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700073311; x=1700678111; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=w3mqX2iQNuhTUA8C/7jbFz0bhaoYS6P2+umF0l6l5x4=; b=YFWbIZ3N6Dq0a+7DHKQ6f+ZgkDyi1112MzECbRLTEl8pH3sjnkYXmsyjnuqkqp9vLx 4dIaMZN5mXFfDkAmYYVU2Gt6sYNavprxF+TC8uL+nSQwIcyeVrpw6VMteOJtV1rKjfXb Pk1uLQZJ1jGVyZTY608LTla0ylwDQMiUPmZ+vs9jWVcsoQFQJQlXIwNpwO+0ARFsP/yi fMgxCub+4qQJLLOF1cQn2I7leyn5XLVRNAVgCyyzIn95g14SAw1Xd2oqOUZoWoypwfsB ShdgBkck65TRpJ70SQnxB9A1Zw7gsTBzmsQPwAyYq3jcT+taBQn7GJD/crmtP3lyRH+C A7Xw== X-Gm-Message-State: AOJu0Yz8G0RSkEHhHhUt45BMyt2zFPqrPZa4Ptv9L/2TR8L6uYzajw41 x4s5+qJEBanTR1YIhf6kAgZT+yvolIs= X-Google-Smtp-Source: AGHT+IHyLwXtqsu5hBDzz0gQgGfc/FJcMhCrMUSGi8idUVa8yfMf64ct3mvEZS4YErIHrsPiZSmOUA== X-Received: by 2002:a05:600c:450d:b0:409:5a92:4718 with SMTP id t13-20020a05600c450d00b004095a924718mr10333384wmo.36.1700073311350; Wed, 15 Nov 2023 10:35:11 -0800 (PST) Received: from melissa.local ([2c0f:ef18:1431:0:b09:9616:db04:c248]) by smtp.gmail.com with ESMTPSA id l15-20020a05600c4f0f00b00405959469afsm545317wmq.3.2023.11.15.10.35.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 10:35:10 -0800 (PST) User-agent: mu4e 1.9.3; emacs 30.0.50 From: Wilhelm Kirschbaum Date: Wed, 15 Nov 2023 20:32:42 +0200 Message-ID: <874jhmn9us.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=wkirschbaum@gmail.com; helo=mail-wm1-x32e.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; format=flowed Tags: patch This change was requested by a user and seems to be useful. I am also trying the `submit-emacs-patch` command, so hope I am doing it right. In GNU Emacs 30.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0) of 2023-11-14 built on _ Repository revision: 3074f4cfc2efc5a1d75186ad44790a21cecda3d3 Repository branch: master System Description: Arch Linux Configured using: 'configure --with-sound=yes --with-json --with-pgtk --with-native-compilation=aot --with-xwidgets --with-imagemagick --with-tree-sitter' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-elixir-ts-mode-hook-to-elixir-ts-mode.patch >From 2ce080a17b7e89d63fb22826a91b931f987d8cf2 Mon Sep 17 00:00:00 2001 From: Wilhelm H Kirschbaum Date: Wed, 15 Nov 2023 20:13:02 +0200 Subject: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode-hook): Make hook available to customize. --- lisp/progmodes/elixir-ts-mode.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el index 05edb4159a1..ad7c599edb1 100644 --- a/lisp/progmodes/elixir-ts-mode.el +++ b/lisp/progmodes/elixir-ts-mode.el @@ -74,6 +74,13 @@ elixir-ts-indent-offset :safe 'integerp :group 'elixir-ts) +(defcustom elixir-ts-mode-hook nil + "Hook run after entering `elixir-ts-mode'." + :type 'hook + :options '(eglot-ensure) + :group 'elixir-ts + :version "30.1") + (defface elixir-ts-font-comment-doc-identifier-face '((t (:inherit font-lock-doc-face))) "Face used for @comment.doc tags in Elixir files.") -- 2.42.1 --=-=-=-- From unknown Sat Sep 06 10:20:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Nov 2023 19:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67207 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Wilhelm Kirschbaum Cc: 67207@debbugs.gnu.org Received: via spool by 67207-submit@debbugs.gnu.org id=B67207.17000771095586 (code B ref 67207); Wed, 15 Nov 2023 19:39:02 +0000 Received: (at 67207) by debbugs.gnu.org; 15 Nov 2023 19:38:29 +0000 Received: from localhost ([127.0.0.1]:53854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3LiX-0001S2-Hk for submit@debbugs.gnu.org; Wed, 15 Nov 2023 14:38:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3LiU-0001Rp-K2 for 67207@debbugs.gnu.org; Wed, 15 Nov 2023 14:38:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3LiP-0000J3-R5; Wed, 15 Nov 2023 14:38:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=iskj2QRfC6K+bjzEslxmjMTy3o5cOlhCUxcvTXaYb/g=; b=XIqBKW2Jyy/8 t4vNm7ptCM+N7Xh2OXfN3gzPcQUIDnJ7n6ofCz/9CqOd0GBHBYCb58M6V6KAzsVi8b86/n8LqRrEO HSnCJ8Ke45H/N/fCQtipf9yVa8jaxG7MPNb28Ncb7xf4CyHiAD9Jw8DSmQ8l4JER9RWQCUlifIVoI bUJEAecqCbyyir2YzVj/UfI4dl+DGf8ufUagISGyVrue7UiZv3nA1VucRNfkDZArPvOUYuPM2OyKg WH92lWdqOHArNJurEyB8y/+g2BEqnyrleNLw+Nsho95MA6elrTlzyNap74LtvZXjZt1twVEUh5wuq WEzr3uXAwbtOcVJc0VVcsg==; Date: Wed, 15 Nov 2023 21:38:11 +0200 Message-Id: <835y22ren0.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <874jhmn9us.fsf@gmail.com> (message from Wilhelm Kirschbaum on Wed, 15 Nov 2023 20:32:42 +0200) References: <874jhmn9us.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Wilhelm Kirschbaum > Date: Wed, 15 Nov 2023 20:32:42 +0200 > > This change was requested by a user and seems to be useful. Sorry, I don't understand: what was the request of that user? elixir-ts-mode is defined using define-derived-mode, which automatically creates a mode hook, so why do you need to define it explicitly? From unknown Sat Sep 06 10:20:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode Resent-From: Wilhelm Kirschbaum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Nov 2023 19:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67207 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 67207@debbugs.gnu.org Received: via spool by 67207-submit@debbugs.gnu.org id=B67207.17000780797823 (code B ref 67207); Wed, 15 Nov 2023 19:55:01 +0000 Received: (at 67207) by debbugs.gnu.org; 15 Nov 2023 19:54:39 +0000 Received: from localhost ([127.0.0.1]:53860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3LyB-000225-5e for submit@debbugs.gnu.org; Wed, 15 Nov 2023 14:54:39 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:44452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3Ly6-00021N-0f for 67207@debbugs.gnu.org; Wed, 15 Nov 2023 14:54:38 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-40a4848c6e1so70215e9.1 for <67207@debbugs.gnu.org>; Wed, 15 Nov 2023 11:54:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700078068; x=1700682868; darn=debbugs.gnu.org; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=BlhXcihcj347Ny21oo5ylF1YARjQg0KZan9aiowZ2cY=; b=iu8pU3KmOSsfLCaUO9lNtEqRHRCvRq8fQ6I0w/xL7dQVcnwMcSqcskeALuwYzCFUSV ZasyF2EOoVqQcbXjP20aH+AWFbctU3z5Yx0Ix+bvQrpswRAO4JLVQLBssWJAoK3/dou5 i7yw7U8AGIqNk0O7WzNRF4v7tr9QPUVnemyhkoSsaFyq4PWLLpk/XE0e78Xp6jpIuKVg pssmztFOgBsonEUzFvSn6eSP+qZ3heAe9pT0Ehw4oqiGj9yb5VPOHVS2yTwew039Lvhp BYgerqKINQcl5KmjWNlSVHTqfIfPysEwcGLWIwJJ/2LTSODhKwH5xa/DJ/5s56lcFmdv 9phA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700078068; x=1700682868; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=BlhXcihcj347Ny21oo5ylF1YARjQg0KZan9aiowZ2cY=; b=VqNK+qVer0pTVPbijSRxsDih2kJM1UBhPLUoe+7GY/rpYRylu68gqemjq6m89hESf6 qRKOCMIxb1IHQt0Vt1UOSrGb1b8z4D4JdPBkm3CGP7EQxrLkuL9XAnuc4hGQMwdi3vUV wBzHX8q+b30UH0KZgg6Vt3kBFGLpLyBmtpQF7EMtEVWoTxyBPk4eciMBVn02njEsgl5c 6eNnuSZ3aVTF+ScCLj8lD6+k16ycsBkBg152tRY/xigJdO3YAdeWRwGI3ADp4AgrrTn2 wEm8pn5eW14pODnCydSXF7iS0eTOfOwvEHZ3ohAJ23fhNZwi37ZT8fO4EggLac8PYSKi fVjA== X-Gm-Message-State: AOJu0Yyb+wBbhzQsfGymf7rRGk9qTVETPllV254XmgXLGyAjKTAH4tSS j7c1Osy9QrDLD7+giu0/vAjvYOuVPLu/iQ== X-Google-Smtp-Source: AGHT+IGVAqtuhyeJf6RxzcvlbfoAK1MDtugFR1gww04jmRaurm0iDNrfoPcmF60SlTAqj8SCqs+TGQ== X-Received: by 2002:a05:600c:c14:b0:409:51c2:1192 with SMTP id fm20-20020a05600c0c1400b0040951c21192mr10959286wmb.38.1700078068136; Wed, 15 Nov 2023 11:54:28 -0800 (PST) Received: from melissa.local ([2c0f:ef18:1431:0:b09:9616:db04:c248]) by smtp.gmail.com with ESMTPSA id t14-20020a05600c450e00b004063ea92492sm737407wmo.22.2023.11.15.11.54.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 11:54:27 -0800 (PST) References: <874jhmn9us.fsf@gmail.com> <835y22ren0.fsf@gnu.org> User-agent: mu4e 1.9.3; emacs 30.0.50 From: Wilhelm Kirschbaum Date: Wed, 15 Nov 2023 21:43:06 +0200 In-reply-to: <835y22ren0.fsf@gnu.org> Message-ID: <8734x6rdvz.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Wilhelm Kirschbaum >> Date: Wed, 15 Nov 2023 20:32:42 +0200 >> >> This change was requested by a user and seems to be useful. > > Sorry, I don't understand: what was the request of that user? > elixir-ts-mode is defined using define-derived-mode, which > automatically creates a mode hook, so why do you need to define > it > explicitly? I had exactly the same question. The user wants to manage the elixir-ts-mode hooks from the customize-group menu and not using elisp. This seems to be the way to make it show up on the customize-group menu for elixir-ts-mode. There are some other modes doing the same if you search for `defcustom .*-mode-hook` under the progmode folder. If this is undesirable or if there is another way to make it show up on the customize menu, it will be good to know. From unknown Sat Sep 06 10:20:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Nov 2023 19:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67207 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Wilhelm Kirschbaum , Stefan Monnier Cc: 67207@debbugs.gnu.org Received: via spool by 67207-submit@debbugs.gnu.org id=B67207.17000783008936 (code B ref 67207); Wed, 15 Nov 2023 19:59:02 +0000 Received: (at 67207) by debbugs.gnu.org; 15 Nov 2023 19:58:20 +0000 Received: from localhost ([127.0.0.1]:53865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3M1j-0002K4-V7 for submit@debbugs.gnu.org; Wed, 15 Nov 2023 14:58:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3M1h-0002Jl-MC for 67207@debbugs.gnu.org; Wed, 15 Nov 2023 14:58:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3M1c-00027W-Uv; Wed, 15 Nov 2023 14:58:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=dY2FzfYh0fASy6mRPXBWA6mTWoR2IndOp8ZBPd1h9lU=; b=UDHndF1ixF6E Dyz88Zm96Ltv1DW60pwhdfPrfYbFmyfHq3PxmByQuprQlQiGTyHUdclupAzEH1zsALbWjsHYi/zBX 8d6TI+ICWax3x3Q7VKVHKomqd8ESgcygC0Oo/fM2aU2gqVhSAjYlrEZZeowhTNWmz9LAerAhBJSw/ KfuqcLYe515h4z2Q5CdDzFT97ehwSNiGxGdCU/VTEv6t2ztotG6g1trurc4XAWMLlfnA0ErqxW196 ZbQJc0GoSwaXGVLp+ZPxzjc0hxYEroW52/YCuH0yC5e8FOlG8k3iz5lwY6A+3tpWp5aa3w1fNz/BP TKZnew/BdcThdeImcJ3/fQ==; Date: Wed, 15 Nov 2023 21:58:03 +0200 Message-Id: <834jhmrdpw.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <8734x6rdvz.fsf@gmail.com> (message from Wilhelm Kirschbaum on Wed, 15 Nov 2023 21:43:06 +0200) References: <874jhmn9us.fsf@gmail.com> <835y22ren0.fsf@gnu.org> <8734x6rdvz.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Wilhelm Kirschbaum > Cc: 67207@debbugs.gnu.org > Date: Wed, 15 Nov 2023 21:43:06 +0200 > > Eli Zaretskii writes: > > >> From: Wilhelm Kirschbaum > >> Date: Wed, 15 Nov 2023 20:32:42 +0200 > >> > >> This change was requested by a user and seems to be useful. > > > > Sorry, I don't understand: what was the request of that user? > > elixir-ts-mode is defined using define-derived-mode, which > > automatically creates a mode hook, so why do you need to define > > it > > explicitly? > > I had exactly the same question. The user wants to manage the > elixir-ts-mode hooks from the customize-group menu and not using > elisp. This seems to be the way to make it show up on the > customize-group menu for elixir-ts-mode. There are some other > modes doing the same if you search for `defcustom .*-mode-hook` > under the progmode folder. > > If this is undesirable or if there is another way to make it show > up on the customize menu, it will be good to know. Adding Stefan to the discussion. Stefan, does this mean define-derived-mode has some deficiency? Many/most modes defined using it don't have an explicit hook definition, so should we now define a mode hook for all of them? From unknown Sat Sep 06 10:20:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Nov 2023 22:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67207 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: Wilhelm Kirschbaum , 67207@debbugs.gnu.org Received: via spool by 67207-submit@debbugs.gnu.org id=B67207.17000889915777 (code B ref 67207); Wed, 15 Nov 2023 22:57:01 +0000 Received: (at 67207) by debbugs.gnu.org; 15 Nov 2023 22:56:31 +0000 Received: from localhost ([127.0.0.1]:54124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3OoB-0001V7-7K for submit@debbugs.gnu.org; Wed, 15 Nov 2023 17:56:31 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3Oo8-0001Ut-Vf for 67207@debbugs.gnu.org; Wed, 15 Nov 2023 17:56:29 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0D0EA8076C; Wed, 15 Nov 2023 17:56:24 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1700088983; bh=gXOSoZWzcufzVHwNyQvG8GO87lD8jAf+ExIVJot9/B8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Nej+epqt7CCEExUaVRT6OXDT/Q6V3WTQvx7jOTmF81s1cRdLJ+SPtIa7FbM3w7tBl Mo/3JnWxIUSx0/HoV42gbB1N2wrNwi3cet6tnb+Kn4SXyoG2ncAFM5+s561hQSBtft TbmvCw8T2kmAeWpoHGAcBCcSuR4JBFYhFwBs68cg6PHbfP00Mgzz/sPcxHdXswagHw UwUdvVpmh1eVaX5rB+FC1QoCt72Cf143PCFJMJcSimDzuc1NPmfgPc0rdsPJnqrDMt TB6lDbfvYtGaw7mWPYAh/kulpPi3RliqVbkBoqfM0u3kLGrUKzRtyaKJfaDdYgJTCp /3DnRyudvE+4Q== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3ACBF80675; Wed, 15 Nov 2023 17:56:23 -0500 (EST) Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2B181120351; Wed, 15 Nov 2023 17:56:23 -0500 (EST) From: Stefan Monnier In-Reply-To: <834jhmrdpw.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Nov 2023 21:58:03 +0200") Message-ID: References: <874jhmn9us.fsf@gmail.com> <835y22ren0.fsf@gnu.org> <8734x6rdvz.fsf@gmail.com> <834jhmrdpw.fsf@gnu.org> Date: Wed, 15 Nov 2023 17:53:52 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.093 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Stefan, does this mean define-derived-mode has some deficiency? > Many/most modes defined using it don't have an explicit hook > definition, so should we now define a mode hook for all of them? Usually we don't have good ideas of `:options` to provide for hook variables, so it's not very useful to expose them to Custom. Also, it's not rare for hook variables to be modified by other packages, which again votes in favor of not exposing them to Custom. But some mode maintainers do like to expose them to Custom for their users' convenience. Usually I look at it as a hint that there's something missing elsewhere (for the patch at hand, maybe some kind of `global-eglot-mode` would be a better answer in the longer term). We could try and extend `define-derived-mode` to allow it to expose the hook to Custom, with `:options` and whatnot, but it doesn't seem worth the trouble since the maintainer can use a separate explicit `defcustom` instead, as the OP's patch does. Stefan From unknown Sat Sep 06 10:20:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode Resent-From: Wilhelm Kirschbaum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Nov 2023 08:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67207 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: Eli Zaretskii , 67207@debbugs.gnu.org Received: via spool by 67207-submit@debbugs.gnu.org id=B67207.170029771226483 (code B ref 67207); Sat, 18 Nov 2023 08:56:02 +0000 Received: (at 67207) by debbugs.gnu.org; 18 Nov 2023 08:55:12 +0000 Received: from localhost ([127.0.0.1]:47782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4H6e-0006t5-BC for submit@debbugs.gnu.org; Sat, 18 Nov 2023 03:55:12 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:60843) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4H6b-0006sp-Ce for 67207@debbugs.gnu.org; Sat, 18 Nov 2023 03:55:10 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4084095722aso2521275e9.1 for <67207@debbugs.gnu.org>; Sat, 18 Nov 2023 00:55:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700297702; x=1700902502; darn=debbugs.gnu.org; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=/06uGW1tjbpAiPoAXc69P8JX5qYt0QNkUmaMOoHoO3w=; b=QY/YKA/rT/Y3O1vLC3GkYE7+hD4kT90qbToDOL1wUMoYirHgcLQqS4vh6O2Xv0sIAg 7rt5flUcmv32mpJt4JH6s30jmvu5FLMtPiTX2Cz7F78c4pswrUMngl7T18o1LLHrTIH6 Uux9iz3n1QseVEf4Px1MnfVYd8BByubKn7YjMnj0aSYQiIUETjdRQVeQYZu/LtEDDcbC /cLEV/ashy/5RWr8hBznifdlY567mtpW54DVUuYIgUs2w5AfyCMSi6Gg1SKlm3eKiKjg UFBNyb7kdIeJnOMj8aFraY6WU8rW0NmbRWDqNJHKFU96vybUdGq+pjyTai3edk8xOJ9Z LmuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700297702; x=1700902502; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/06uGW1tjbpAiPoAXc69P8JX5qYt0QNkUmaMOoHoO3w=; b=SFpNuLBSnLcXPeLKhF36cJ1d3zoySLz+vpDGni6gH+lbizds01sXNkV/1/NN+Mz8l/ aSaMejWmcrXDvE5CYzOppJMWJeFuW4Ot2k22vlfKO3GuzDhwYmeiSaxn5GYooefgBvNb wBlK2Klrw65IlX5yl+bH/D3mqSkjVB/t5OkKVZQ0UD1jorWByOLjWfJ/g/939bDHXGXp QLN2dEkP2UWmI7k4t5k8fH4DLQePvMw+JiPjGiHAjKZsy6SQZaM6H81Ky0cHN89b2FZo 61l/K7pHPnn3UI5MIwagDTC3P9zKbMNhtVg5huDXq5IagJjnV+9xorLTht04/VA0ofJ/ 0qxQ== X-Gm-Message-State: AOJu0YxEEZNT/P3uy7wtoIn3lGvuo36ec2celi1Zs+UTLfpnoZIN2+jz xrlEYM5x6WSVW4GTiK0RlrxEDJdYve85CiTP X-Google-Smtp-Source: AGHT+IF3Ju5uMrdnxajhHBmEznyw7DTtL3QZD3+otNfwbF8WI18s8C3y90WcttqMlDH0q+2gJFIt+w== X-Received: by 2002:a5d:59a1:0:b0:32f:9a76:ea0f with SMTP id p1-20020a5d59a1000000b0032f9a76ea0fmr1530743wrr.46.1700297701586; Sat, 18 Nov 2023 00:55:01 -0800 (PST) Received: from melissa.local ([2c0f:ef18:1431:0:b09:9616:db04:c248]) by smtp.gmail.com with ESMTPSA id f11-20020adfc98b000000b00327b5ca093dsm4767873wrh.117.2023.11.18.00.55.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Nov 2023 00:55:01 -0800 (PST) References: <874jhmn9us.fsf@gmail.com> <835y22ren0.fsf@gnu.org> <8734x6rdvz.fsf@gmail.com> <834jhmrdpw.fsf@gnu.org> User-agent: mu4e 1.9.3; emacs 30.0.50 From: Wilhelm Kirschbaum Date: Sat, 18 Nov 2023 10:32:22 +0200 In-reply-to: Message-ID: <87edgnzbj2.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: >> Stefan, does this mean define-derived-mode has some deficiency? >> Many/most modes defined using it don't have an explicit hook >> definition, so should we now define a mode hook for all of >> them? > > Usually we don't have good ideas of `:options` to provide for > hook > variables, so it's not very useful to expose them to Custom. > After I had a look how it works, it seems pretty convenient for users relying on customize menus and not knowing which hooks might be useful. There are some modes using this feature, but its not consistently used. For the elixir-ts-mode users, it appears there are very few people not running either eglot or lsp-mode, so having eglot-ensure hook on the menu makes sense to me. Discovering features and minor modes in Emacs is not as intuitive to newcomers and some direction of which options are available might help a bit. > Also, it's not rare for hook variables to be modified by other > packages, > which again votes in favor of not exposing them to Custom. > > But some mode maintainers do like to expose them to Custom for > their > users' convenience. Usually I look at it as a hint that there's > something missing elsewhere (for the patch at hand, maybe some > kind of > `global-eglot-mode` would be a better answer in the longer > term). Yes, agreed. If a user can toggle somewhere that they want to run a language server for this mode, or better a project then the need to have the hook for eglot-ensure won't be needed anymore. > > We could try and extend `define-derived-mode` to allow it to > expose the > hook to Custom, with `:options` and whatnot, but it doesn't seem > worth > the trouble since the maintainer can use a separate explicit > `defcustom` > instead, as the OP's patch does. Won't it make sense to define a hook to custom anyways, so that users get used to the idea of using the customize menus to add hooks? Instead of only a handful of modes having it available? Then it can be additionally configured by the maintainer. Only after using Emacs for 5+ years now I am only now discovering the convenience of the customize menu, probably getting too lazy to update init.el. Wilhelm From unknown Sat Sep 06 10:20:57 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Wilhelm Kirschbaum Subject: bug#67207: closed (Re: bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode) Message-ID: References: <83r0knml84.fsf@gnu.org> <874jhmn9us.fsf@gmail.com> X-Gnu-PR-Message: they-closed 67207 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 67207@debbugs.gnu.org Date: Sat, 18 Nov 2023 10:05:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1700301902-907-1" This is a multi-part message in MIME format... ------------=_1700301902-907-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 67207@debbugs.gnu.org. --=20 67207: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67207 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1700301902-907-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 67207-done) by debbugs.gnu.org; 18 Nov 2023 10:04:05 +0000 Received: from localhost ([127.0.0.1]:47836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4IBJ-0000DO-Gy for submit@debbugs.gnu.org; Sat, 18 Nov 2023 05:04:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:32986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4IBI-0000Cu-4O for 67207-done@debbugs.gnu.org; Sat, 18 Nov 2023 05:04:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r4IBC-0003uY-2L; Sat, 18 Nov 2023 05:03:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=4hKdRHML3RwFL6FTSWY6N+cKSnTx5J4fxs31R32OFQI=; b=UitSuq2Wmvgh R+FhNDUuu7AXqp226Jr6DmChLY43O8hqiqgkx8P6uGJXqslXNWkH8kfeQwpYQ5rHSWJUJXVDMF63b H+HbcyWFH3Ar4yN+LbQ/gg8gTBZO/5lbab0Om0v7cRAzWhKgCUFwyfFzjvIrVEeC5OiMq0sy+4gPr 3ufvIC4PNeHSIt8O//W1gvukn/e5EdwlPJvWUJxxdJEtqjW0Qo6CVWDF3yYwFgEn7+hPg1bqERmxO E1a5xh9XKDiTSdVF2mm1V/JlbuGmE8MGESUfjGATRIVqvQtB8yYPjhE2mUOQEwi0snKV3Xa5QK7vG RR2+WhDIT+ocQAgUqnOSXA==; Date: Sat, 18 Nov 2023 12:03:55 +0200 Message-Id: <83r0knml84.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (message from Stefan Monnier on Wed, 15 Nov 2023 17:53:52 -0500) Subject: Re: bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode References: <874jhmn9us.fsf@gmail.com> <835y22ren0.fsf@gnu.org> <8734x6rdvz.fsf@gmail.com> <834jhmrdpw.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67207-done Cc: wkirschbaum@gmail.com, 67207-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Monnier > Cc: Wilhelm Kirschbaum , 67207@debbugs.gnu.org > Date: Wed, 15 Nov 2023 17:53:52 -0500 > > > Stefan, does this mean define-derived-mode has some deficiency? > > Many/most modes defined using it don't have an explicit hook > > definition, so should we now define a mode hook for all of them? > > Usually we don't have good ideas of `:options` to provide for hook > variables, so it's not very useful to expose them to Custom. > > Also, it's not rare for hook variables to be modified by other packages, > which again votes in favor of not exposing them to Custom. > > But some mode maintainers do like to expose them to Custom for their > users' convenience. Usually I look at it as a hint that there's > something missing elsewhere (for the patch at hand, maybe some kind of > `global-eglot-mode` would be a better answer in the longer term). > > We could try and extend `define-derived-mode` to allow it to expose the > hook to Custom, with `:options` and whatnot, but it doesn't seem worth > the trouble since the maintainer can use a separate explicit `defcustom` > instead, as the OP's patch does. Thanks, I installed the change and added a comment regarding the reasons. Closing. ------------=_1700301902-907-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Nov 2023 18:35:39 +0000 Received: from localhost ([127.0.0.1]:53776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3Kjf-0005bN-Bx for submit@debbugs.gnu.org; Wed, 15 Nov 2023 13:35:39 -0500 Received: from lists.gnu.org ([2001:470:142::17]:46558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3KjV-0005aj-7j for submit@debbugs.gnu.org; Wed, 15 Nov 2023 13:35:34 -0500 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 1r3KjO-0006v8-8s for bug-gnu-emacs@gnu.org; Wed, 15 Nov 2023 13:35:18 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r3KjL-0003Jz-CF for bug-gnu-emacs@gnu.org; Wed, 15 Nov 2023 13:35:16 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-40859c464daso57182285e9.1 for ; Wed, 15 Nov 2023 10:35:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700073311; x=1700678111; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:user-agent:from:to:cc :subject:date:message-id:reply-to; bh=w3mqX2iQNuhTUA8C/7jbFz0bhaoYS6P2+umF0l6l5x4=; b=aN57DknP9wLv8elx27dwS8hSyvHo8RHos5vQRqTiX4MKBEqUuaOPVSqBHEXlax1lYh gDv/aoTphYA6ulX6V9OZiNNVDqrlwSkF3X2XseMFm8HmUtIvdhigEwBDP5KA82WufpkN XssV5KXzsGRpstWg9Xazl126MZ9sZVmfLRogrn5sUG7YVBzres6gXyh9r/6U/HJPmCjk 9uwI0DSRL1XO+jIvIeqPoByIwd/5K6NVEMd39LSM0ExamGFIWUbEqYl9bWJq6N8irWsx agib+arDIw1/RKh/NzHLKn3E6AuGexQF2Ocweak/pD/o4nCEaQWFo+LXmfHJUw7KbyKY YJwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700073311; x=1700678111; h=mime-version:message-id:date:subject:to:from:user-agent :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=w3mqX2iQNuhTUA8C/7jbFz0bhaoYS6P2+umF0l6l5x4=; b=YFWbIZ3N6Dq0a+7DHKQ6f+ZgkDyi1112MzECbRLTEl8pH3sjnkYXmsyjnuqkqp9vLx 4dIaMZN5mXFfDkAmYYVU2Gt6sYNavprxF+TC8uL+nSQwIcyeVrpw6VMteOJtV1rKjfXb Pk1uLQZJ1jGVyZTY608LTla0ylwDQMiUPmZ+vs9jWVcsoQFQJQlXIwNpwO+0ARFsP/yi fMgxCub+4qQJLLOF1cQn2I7leyn5XLVRNAVgCyyzIn95g14SAw1Xd2oqOUZoWoypwfsB ShdgBkck65TRpJ70SQnxB9A1Zw7gsTBzmsQPwAyYq3jcT+taBQn7GJD/crmtP3lyRH+C A7Xw== X-Gm-Message-State: AOJu0Yz8G0RSkEHhHhUt45BMyt2zFPqrPZa4Ptv9L/2TR8L6uYzajw41 x4s5+qJEBanTR1YIhf6kAgZT+yvolIs= X-Google-Smtp-Source: AGHT+IHyLwXtqsu5hBDzz0gQgGfc/FJcMhCrMUSGi8idUVa8yfMf64ct3mvEZS4YErIHrsPiZSmOUA== X-Received: by 2002:a05:600c:450d:b0:409:5a92:4718 with SMTP id t13-20020a05600c450d00b004095a924718mr10333384wmo.36.1700073311350; Wed, 15 Nov 2023 10:35:11 -0800 (PST) Received: from melissa.local ([2c0f:ef18:1431:0:b09:9616:db04:c248]) by smtp.gmail.com with ESMTPSA id l15-20020a05600c4f0f00b00405959469afsm545317wmq.3.2023.11.15.10.35.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 10:35:10 -0800 (PST) User-agent: mu4e 1.9.3; emacs 30.0.50 From: Wilhelm Kirschbaum To: bug-gnu-emacs@gnu.org Subject: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode Date: Wed, 15 Nov 2023 20:32:42 +0200 Message-ID: <874jhmn9us.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=wkirschbaum@gmail.com; helo=mail-wm1-x32e.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; format=flowed Tags: patch This change was requested by a user and seems to be useful. I am also trying the `submit-emacs-patch` command, so hope I am doing it right. In GNU Emacs 30.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0) of 2023-11-14 built on _ Repository revision: 3074f4cfc2efc5a1d75186ad44790a21cecda3d3 Repository branch: master System Description: Arch Linux Configured using: 'configure --with-sound=yes --with-json --with-pgtk --with-native-compilation=aot --with-xwidgets --with-imagemagick --with-tree-sitter' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-elixir-ts-mode-hook-to-elixir-ts-mode.patch >From 2ce080a17b7e89d63fb22826a91b931f987d8cf2 Mon Sep 17 00:00:00 2001 From: Wilhelm H Kirschbaum Date: Wed, 15 Nov 2023 20:13:02 +0200 Subject: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode * lisp/progmodes/elixir-ts-mode.el (elixir-ts-mode-hook): Make hook available to customize. --- lisp/progmodes/elixir-ts-mode.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el index 05edb4159a1..ad7c599edb1 100644 --- a/lisp/progmodes/elixir-ts-mode.el +++ b/lisp/progmodes/elixir-ts-mode.el @@ -74,6 +74,13 @@ elixir-ts-indent-offset :safe 'integerp :group 'elixir-ts) +(defcustom elixir-ts-mode-hook nil + "Hook run after entering `elixir-ts-mode'." + :type 'hook + :options '(eglot-ensure) + :group 'elixir-ts + :version "30.1") + (defface elixir-ts-font-comment-doc-identifier-face '((t (:inherit font-lock-doc-face))) "Face used for @comment.doc tags in Elixir files.") -- 2.42.1 --=-=-=-- ------------=_1700301902-907-1-- From unknown Sat Sep 06 10:20:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67207: [PATCH] Add elixir-ts-mode-hook to elixir-ts-mode Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Nov 2023 03:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67207 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Wilhelm Kirschbaum Cc: Eli Zaretskii , 67207@debbugs.gnu.org Received: via spool by 67207-submit@debbugs.gnu.org id=B67207.170036518724613 (code B ref 67207); Sun, 19 Nov 2023 03:40:02 +0000 Received: (at 67207) by debbugs.gnu.org; 19 Nov 2023 03:39:47 +0000 Received: from localhost ([127.0.0.1]:49713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4Yew-0006Ov-OI for submit@debbugs.gnu.org; Sat, 18 Nov 2023 22:39:47 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:50377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4Yer-0006OY-QM for 67207@debbugs.gnu.org; Sat, 18 Nov 2023 22:39:44 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 201561000AD; Sat, 18 Nov 2023 22:39:35 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1700365170; bh=C640h0OyPqu5ciMnZEvqTsGAWR6IaeuS8McMD4i7Xik=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=KHa7z2FHJRFNRdPAhxC34u9VS/XfLXp0c3rDnN96DQyc+NHVqTXHq7xl+BvjE5eHp RyxBAjC3FLAFmGM120S1cAmZy71IXrLqncNSxs3A7U7qjhBjSZTkVAuNnpbNtyfcee 89x8CNrSvUvbQcIKOtQTMLp3YstC6y4dPw6u/tdbbuYG+RNhrGSe2/EfA7aH6oDpqG QJcKZENwkCU/q902yEImUqi/66IS7K1kiGMul71e+vKk6JMx7c2scZv5i2bsYT0Y7E i9UiO9tpRm8eqz73rAiVAswQJAVCFcSDp5OXvEDuFaL4U7ZWqWCHTM2Lf7cZKLbmAZ f4nFOpVBnippw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4C7E7100043; Sat, 18 Nov 2023 22:39:30 -0500 (EST) Received: from pastel (unknown [45.72.227.120]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 245E9120488; Sat, 18 Nov 2023 22:39:30 -0500 (EST) From: Stefan Monnier In-Reply-To: <87edgnzbj2.fsf@gmail.com> (Wilhelm Kirschbaum's message of "Sat, 18 Nov 2023 10:32:22 +0200") Message-ID: References: <874jhmn9us.fsf@gmail.com> <835y22ren0.fsf@gnu.org> <8734x6rdvz.fsf@gmail.com> <834jhmrdpw.fsf@gnu.org> <87edgnzbj2.fsf@gmail.com> Date: Sat, 18 Nov 2023 22:39:30 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.130 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>> Stefan, does this mean define-derived-mode has some deficiency? >>> Many/most modes defined using it don't have an explicit hook >>> definition, so should we now define a mode hook for all of them? >> Usually we don't have good ideas of `:options` to provide for hook >> variables, so it's not very useful to expose them to Custom. > After I had a look how it works, it seems pretty convenient for users > relying on customize menus and not knowing which hooks might be useful. > There are some modes using this feature, but its not consistently used. Yes but it's unreliable: as soon as some code uses `add-hook` on this hook variable, Custom gets all confused because it doesn't know why/where the variable has a different value from the one it expected. > Won't it make sense to define a hook to custom anyways, so that users > get used to the idea of using the customize menus to add hooks? As long as Custom breaks down when someone uses `add-hook`, I don't feel comfortable exposing unsuspecting users to the brittleness of hooks in Custom :-( Custom's main audience is specifically those users who don't (want to) know about such tricky interactions. > Only after using Emacs for 5+ years now I am only now discovering the > convenience of the customize menu, probably getting too lazy to update > init.el. :-) Stefan