From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50202: bibtex-mode: unescaped dollar sign in file field leads to wrong highlighting Date: Thu, 25 Aug 2022 13:41:00 -0400 Message-ID: References: <87mtbw4acj.fsf@gnus.org> <87zgftqbam.fsf@gnu.org> <87sflkjn5i.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27895"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 50202@debbugs.gnu.org, Yuu Yin To: Roland Winkler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 25 19:42:32 2022 Return-path: Envelope-to: geb-bug-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 1oRGsA-00071B-VG for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 19:42:31 +0200 Original-Received: from localhost ([::1]:47866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRGs9-00027p-Mj for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Aug 2022 13:42:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRGri-00025u-9c for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 13:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33221) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRGri-0002oS-18 for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 13:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRGrh-00071T-Ki for bug-gnu-emacs@gnu.org; Thu, 25 Aug 2022 13:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Aug 2022 17:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50202 X-GNU-PR-Package: emacs Original-Received: via spool by 50202-submit@debbugs.gnu.org id=B50202.166144927426939 (code B ref 50202); Thu, 25 Aug 2022 17:42:01 +0000 Original-Received: (at 50202) by debbugs.gnu.org; 25 Aug 2022 17:41:14 +0000 Original-Received: from localhost ([127.0.0.1]:51203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRGqv-00070O-QA for submit@debbugs.gnu.org; Thu, 25 Aug 2022 13:41:14 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:34013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRGqr-000707-U9 for 50202@debbugs.gnu.org; Thu, 25 Aug 2022 13:41:11 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4EE971001D2; Thu, 25 Aug 2022 13:41:04 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AD8CA100130; Thu, 25 Aug 2022 13:41:02 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1661449262; bh=Svbpn+aDS7j8uSOgJTBoO1oj59zugBrdz1eVfiC8IOU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=l13I0+uZS4jMc3Lt4+8PvgF9MAuWxOxysAcBEfPyU0WHes+aBjXmpHLA+/gtZDzif kwW02Nx1ZnUs7zzYzQxLE9bUTg3RBpGzc+8g2CGx8pEuiwUe5PNuLWcsA3rlskW2TL Hhg7+SBy5ORy+Dh1dgZ9XszucHdbD3UxpdKlEVjZ2JCLaymD7gUs/iasoD1woj8WJk iotEBPaj24KsnSAxkpNnSljZb7Xq8XEi4byJcgoY5AgGjeE+wjKOBUPUQcvipHXxIh Z7YWeHuCvFbDhgLbWNXBm306mbCPD87BJaasXV6ih5HdkUamSWVXEwTz9TZPJ4LRlJ psE2zhLzI41lg== Original-Received: from pastel (unknown [45.72.195.111]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7D702120341; Thu, 25 Aug 2022 13:41:02 -0400 (EDT) In-Reply-To: <87sflkjn5i.fsf@gnu.org> (Roland Winkler's message of "Thu, 25 Aug 2022 11:36:25 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240734 Archived-At: >> But I wonder how important it is for `bibtex-mode` to try and recognize >> the (La)TeX meaning of the $ character. >> Maybe we should just give $ the punctuation syntax in the syntax-table. > > The (La)TeX meaning of the $ character is relevant for titles that my > contain formulas. The question is what is in the end more acceptable: > formulas in titles that do not receive special treatment by font-lock. > Or $ being mis-treated in url and file fields (which goes beyond these > fields). Maybe it is best to let the user decide whether $ should be > treated as math delimiter (the default) or as punctation. The downside of treating $ as punctuation is that $^2$ won't be highlighted specially, but the upside is that "foo$bar" won't be mishighlighted in a url. To me the highlighting of math formulas is sufficiently secondary that I'd err on the safe side (i.e. avoid mishighlighting). The other option is to try and make this choice on a field-by-field basis, which seems like a lot of work for fairly little benefit. Stefan