From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Morgan Willcock Newsgroups: gmane.emacs.devel Subject: Setup process for etags-regen-mode (Emacs 30.0.91 feedback) Date: Fri, 20 Sep 2024 19:14:09 +0100 Message-ID: <878qvm42ha.fsf@ice9.digital> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29940"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Dmitry Gutov To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 20 20:15:14 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sri9v-0007ck-RR for ged-emacs-devel@m.gmane-mx.org; Fri, 20 Sep 2024 20:15:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sri96-0008Pw-HX; Fri, 20 Sep 2024 14:14:21 -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 1sri94-0008PW-1x for emacs-devel@gnu.org; Fri, 20 Sep 2024 14:14:18 -0400 Original-Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sri92-00043w-0a for emacs-devel@gnu.org; Fri, 20 Sep 2024 14:14:17 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 60CD7240006; Fri, 20 Sep 2024 18:14:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ice9.digital; s=gm1; t=1726856050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=bUZ+7tLNIicNQBjH62UmdUVsRee+2r0fXFnHJBmZSdg=; b=XBIHtQht81/PcUc1QsbNYuYZ5nU2zOa8FU/Zvl6olonodxEU0TtSh2Q033J0eZ0NXsSUb4 y+taJ1rTQyNCNNBneJFFoKuPG2CSXjbLjchwUml+nDOHiE82LmDT+7siwHA/j3T3plvh+0 y/83BFt0/kMQ+3qaQJ8/qKU1crA3pFul6zCy+4NRBqVo/Y/risEfm/ste1qx+xJ7yfliW0 OtSWbl+C9wLGqZajug4WZulCcOQSaDkufRnCmMlL8A+HiZlq+kdE3wJeJZptlUYz+c/xeF G5a+K09WbU0YOYO3X35SZoNaeciv3qmDKgNfN3gTCHXVA2OWggUQSpRhypStWw== X-GND-Sasl: morgan@ice9.digital Received-SPF: pass client-ip=2001:4b98:dc4:8::221; envelope-from=morgan@ice9.digital; helo=relay1-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323857 Archived-At: When testing etags-regen-mode in the Emacs 30 pre-release I've found it to be working well for my use-case, but one thing which appears to be missing is an easy way for additional completion functions to opt-in to the etags-regen-mode setup process. Currently the completion functions which get advice added to them (to call etags-regen--maybe-generate) are hard coded in the mode definition: (if etags-regen-mode (progn (advice-add 'etags--xref-backend :before #'etags-regen--maybe-generate ) (advice-add 'tags-completion-at-point-function :before #'etags-regen--maybe-generate)) (advice-remove 'etags--xref-backend #'etags-regen--maybe-generate) (advice-remove 'tags-completion-at-point-function #'etags-regen--maybe-generate) (etags-regen--tags-cleanup)) I was looking for a stable entry point to opt-in to using it, rather than having to do something like this: (advice-add 'my-completion-function-which-does-things-with-tags :before #'etags-regen--maybe-generate) (Where the "--" in the function name is a sign that I probably shouldn't be doing that.) I wasn't sure whether it was intentional to hard-code the functions to advise while etags-regen-mode was still so new, or whether opting in other functions hadn't been considered. Would it be possible to store the completion functions which will be advised as a separate list, so that other packages can add completion functions to that list and get the TAGS generation to trigger? Or is this an intentional boundary? Thanks, Morgan -- Morgan Willcock