From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#31231: Symbol search broken in NEWS and ChangeLogs Date: Wed, 25 Apr 2018 22:38:10 +0300 Organization: LINKOV.NET Message-ID: <87muxrmesl.fsf@mail.linkov.net> References: <87604kqpji.fsf@mail.linkov.net> <83vacjw4dn.fsf@gnu.org> <87y3he7vn4.fsf@mail.linkov.net> <83sh7mwt2u.fsf@gnu.org> <8736zlznjq.fsf@mail.linkov.net> <83a7ttwcxx.fsf@gnu.org> <87wowwmn3z.fsf@mail.linkov.net> <83wowwuidr.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1524685267 14713 195.159.176.226 (25 Apr 2018 19:41:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Apr 2018 19:41:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 31231@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 25 21:41:02 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBQHm-0003gA-ME for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Apr 2018 21:41:02 +0200 Original-Received: from localhost ([::1]:38714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBQJr-0007aZ-VG for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Apr 2018 15:43:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBQJj-0007a0-AA for bug-gnu-emacs@gnu.org; Wed, 25 Apr 2018 15:43:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBQJi-00009j-CL for bug-gnu-emacs@gnu.org; Wed, 25 Apr 2018 15:43:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59896) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fBQJi-00009a-8X for bug-gnu-emacs@gnu.org; Wed, 25 Apr 2018 15:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fBQJi-0006PZ-1o for bug-gnu-emacs@gnu.org; Wed, 25 Apr 2018 15:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Apr 2018 19:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31231 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31231-submit@debbugs.gnu.org id=B31231.152468538024631 (code B ref 31231); Wed, 25 Apr 2018 19:43:02 +0000 Original-Received: (at 31231) by debbugs.gnu.org; 25 Apr 2018 19:43:00 +0000 Original-Received: from localhost ([127.0.0.1]:39559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBQJg-0006PD-Fl for submit@debbugs.gnu.org; Wed, 25 Apr 2018 15:43:00 -0400 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:39737 helo=homiemail-a12.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBQJe-0006P1-Mq for 31231@debbugs.gnu.org; Wed, 25 Apr 2018 15:42:58 -0400 Original-Received: from homiemail-a12.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTP id 35BCB26206A; Wed, 25 Apr 2018 12:42:58 -0700 (PDT) Original-Received: from localhost.linkov.net (m91-129-103-238.cust.tele2.ee [91.129.103.238]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a12.g.dreamhost.com (Postfix) with ESMTPSA id 519D9262065; Wed, 25 Apr 2018 12:42:57 -0700 (PDT) In-Reply-To: <83wowwuidr.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 25 Apr 2018 05:31:12 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:145751 Archived-At: >> > Emacs itself does, not just in Info. The standalone Info reader (pa= rt >> > of the Texinfo package) has a slightly different solution. >> >> Then using the same solution as not just for Info, Emacs will automati= cally >> substitute ASCII characters for undisplayable Unicode ones in all >> other places like NEWS and ChangeLogs. > > You for some reason elided the part where I explained why an > Emacs-only solution is unacceptable. You said that using Unicode quotes will make it harder to view the files on text terminals that don't support UTF-8. This means that we have to find another solution. Maybe just removing quote characters is enough= . If not, then modifying the syntax of =E2=80=98'=E2=80=99 to =E2=80=98expr= ession quote=E2=80=99 looks good since it will correctly handle spell-checking words with an apostrophe with this patch that solves the problem for ChangeLogs: diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index 4c64ae1..629470a 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -1024,6 +1024,12 @@ change-log-indent (defvar smerge-resolve-function) (defvar copyright-at-end-flag) =20 +(defvar change-log-mode-syntax-table + (let ((st (make-syntax-table))) + (modify-syntax-entry ?' "' " st) + st) + "Syntax table used while in `change-log-mode'.") + ;;;###autoload (define-derived-mode change-log-mode text-mode "Change Log" "Major mode for editing change logs; like Indented Text mode. >> It's a good habit to use symbol search to search symbols because >> it reduces the likelihood of errors, so using it should be >> encouraged in NEWS and ChangeLogs. > > I think you are trying to use features that make no sense in > text-based modes. Just because the text mentions symbols quoted in > some way doesn't yet mean that text is like a program source. NEWS and ChangeLogs are not just conventional prose, they are technical writings with symbol references, so they should be handled exactly the same way as Emacs Info manuals, docstrings and code comments. > Maybe we should have separate (sub)commands for when symbols are > mentioned within human-readable text. Tweaking what a word is due to > this is a too large hammer, IMO. Maybe creating a new minor mode for NEWS files that in addition to modifying the syntax of quotes will also highlight quoted symbols with a special face like is used currently in Info.