bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31231: Symbol search broken in NEWS and ChangeLogs


From: Eli Zaretskii
Subject: bug#31231: Symbol search broken in NEWS and ChangeLogs
Date: Sun, 22 Apr 2018 20:13:56 +0300

> From: Juri Linkov <address@hidden>
> Date: Sat, 21 Apr 2018 23:21:05 +0300
> 
> Symbol search ‘M-s _’ fails to find symbols in NEWS and ChangeLogs where
> symbols are quoted by apostrophes whose syntax is word-constituent.

These files use modes that are descendants of text-mode, so the notion
of a symbol in general makes little sense there.  IOW, this is plain
text, not a program.

> 1. Modify syntax tables to redefine syntax of ‘'’ back to its default
>    that is punctuation or to expression quote:
> 
>    (defvar change-log-mode-syntax-table
>      (let ((st (make-syntax-table)))
>        (modify-syntax-entry ?' "'   " st)
>        st)
>      "Syntax table used while in `change-log-mode'.")
> 
> This solution is not applicable to NEWS files where
> text-mode syntax tables are inherited via outline-mode
> whose syntax table can't be changed.
> 
> 2. In these files replace apostrophes by “LEFT SINGLE QUOTATION MARK” and
>    “RIGHT SINGLE QUOTATION MARK” like are used in Info and Help buffers.

Thanks, but I don't like any of these 2 alternatives.  The first one
will get in the way of spell-checking words with an apostrophe, the
second one will make it harder to view the files on text terminals
that don't support UTF-8.

Is this really such a bad problem that it requires us to tweak
text-based modes?  What happens if you try searching for the symbol as
a simple string? do you get many false positives?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]