From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Unsafe local variable in eglot.el Date: Thu, 09 Mar 2023 13:56:23 +0200 Message-ID: <831qly2l5k.fsf@gnu.org> References: <83mt4m2w23.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10285"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 09 12:57:21 2023 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 1paEtc-0002VD-DK for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Mar 2023 12:57:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paEsu-0003QQ-2Z; Thu, 09 Mar 2023 06:56:36 -0500 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 1paEss-0003Py-A7 for emacs-devel@gnu.org; Thu, 09 Mar 2023 06:56:34 -0500 Original-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 1paEsq-0007jW-Kl; Thu, 09 Mar 2023 06:56:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=XzGnpSe3CNKMs9u06sY1usvabOv/r/ejbd1jThV9fX4=; b=SwtQKTI4c9WjN9s3yCfe P4SIKZkQDx95M1pqUrMv9ul6pk0ANaxQ/V2DnSlx0iryyuFRhgDXA5b32HeEr8FBYZEDi+J8a9zR0 ZCwuK8zCzktihQEza3LNcSb6zlHhz54Agbh8spZGgA0FoZ4RE+e237h+V+acJPXTZ5kuaJsvIa1Yu kuAtCatAb4RQ8YPLu/+r7fE1w7/4/yAiRBnNSNsV1SQpKu8sumAj39tHfBB8YblwSlLUi6YL/ycw/ vM8fsow7QHTXDtxBlhpyuP8I/JvHkEHeFTqiJhAeU1vm3rT5ZYkpavHUNuEqE5kAdYsS6kWYZ7v9q iWzpsKVBq6eVQg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paEsl-0004Y1-9v; Thu, 09 Mar 2023 06:56:29 -0500 In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Thu, 9 Mar 2023 09:31:36 +0000) 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:304188 Archived-At: > From: João Távora > Date: Thu, 9 Mar 2023 09:31:36 +0000 > Cc: emacs-devel@gnu.org > > On Thu, Mar 9, 2023 at 8:00 AM Eli Zaretskii wrote: > > > > João, > > > > This recent change: > > > > commit 0a4b1c0102d4062d24e19340f863b9df25e07ab3 > > Author: Joao Távora > > AuthorDate: Wed Mar 1 13:24:07 2023 +0000 > > Commit: Joao Távora > > CommitDate: Wed Mar 1 13:27:06 2023 +0000 > > > > ; Eglot: improve bug-reference-url-format/bug-reference-url-regexp > > > > * lisp/progmodes/eglot.el (eglot--debbugs-or-github-bug-uri): New helper. > > > > causes trouble when visiting eglot.el. > > I've reproduced it with > > cd path/to/Emacs > src/emacs -Q lisp/progmodes/eglot.el > > But curiously, this doesn't reproduce it > > src/emacs -Q > C-h f eglot RET > C-x o TAB RET ;; to visit the "eglot.el" link > > Why is that? I don't know. Maybe the latter already has bug-reference.el loaded? > Anyway, I just followed the docstring: > > bug-reference-url-format is a variable defined in `bug-reference.el'. > > Its value is `eglot--debbugs-or-github-bug-uri' > Local in buffer eglot.el; global value is nil > > Format used to turn a bug number into a URL. > The bug number is supplied as a string, so this should have a single %s. > This can also be a function designator; it is called without arguments > and should return a string. > It can use `match-string' to get parts matched against > `bug-reference-bug-regexp', specifically: > 1. issue kind (bug, patch, rfe &c) > 2. issue number. > > There is no default setting for this, it must be set per file. > If you set it to a symbol in the file Local Variables section, > you need to add a `bug-reference-url-format' property to it: > (put 'my-bug-reference-url-format 'bug-reference-url-format t) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > so that it is considered safe, see `enable-local-variables'. Maybe for the above to work it requires bug-reference.el to be loaded? Tassilo, any ideas? > But is a significant number of people using older emacsen to edit > Emacs's lisp/progmodes/eglot.el? I do that all the time, since my production sessions always run a released Emacs. Moreover, since Eglot is an ELPA package, I'm quite sure people who use Emacs 28 would do that.