GNU bug report logs - #22248
gnus-article-mode omits apostrophe from isearch string

Previous Next

Packages: emacs, gnus;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 27 Dec 2015 01:19:01 UTC

Severity: normal

Tags: fixed, patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22248 in the body.
You can then email your comments to 22248 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#22248; Package emacs. (Sun, 27 Dec 2015 01:19:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 27 Dec 2015 01:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: gnus-article-mode omits apostrophe from isearch string
Date: Sun, 27 Dec 2015 02:28:05 +0200
Trying to put an expression like (setq var 'foo) into the isearch ring
by moving point at its beginning and typing C-s C-w C-w C-w ...
doesn't add apostrophe in Gnus because gnus-article-mode modifies
syntax of ' to whitespace:

  (defvar gnus-article-mode-syntax-table
    (let ((table (copy-syntax-table text-mode-syntax-table)))
      ;; make M-. in article buffers work for `foo' strings
      (modify-syntax-entry ?' " " table)
      (modify-syntax-entry ?` " " table)

and lax-whitespace search together with isearch-yank-word-or-char
squeeze apostrophe in a sequence of space characters.

One solution is to modify syntax of ' and ` in gnus-article-mode-syntax-table
to syntax discussed in bug#22238, i.e. not whitespace and not part
of a symbol, still allowing M-. in article buffers work for `foo' strings,
and allowing isearch to search in other buffers the same string yanked
to the search ring from Gnus.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#22248; Package emacs,gnus. (Sun, 07 Feb 2016 05:49:01 GMT) Full text and rfc822 format available.

Message #8 received at 22248 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 22248 <at> debbugs.gnu.org
Subject: Re: bug#22248: gnus-article-mode omits apostrophe from isearch string
Date: Sun, 07 Feb 2016 16:48:01 +1100
Juri Linkov <juri <at> linkov.net> writes:

> Trying to put an expression like (setq var 'foo) into the isearch ring
> by moving point at its beginning and typing C-s C-w C-w C-w ...
> doesn't add apostrophe in Gnus because gnus-article-mode modifies
> syntax of ' to whitespace:
>
>   (defvar gnus-article-mode-syntax-table
>     (let ((table (copy-syntax-table text-mode-syntax-table)))
>       ;; make M-. in article buffers work for `foo' strings
>       (modify-syntax-entry ?' " " table)
>       (modify-syntax-entry ?` " " table)
>
> and lax-whitespace search together with isearch-yank-word-or-char
> squeeze apostrophe in a sequence of space characters.
>
> One solution is to modify syntax of ' and ` in gnus-article-mode-syntax-table
> to syntax discussed in bug#22238, i.e. not whitespace and not part
> of a symbol, still allowing M-. in article buffers work for `foo' strings,
> and allowing isearch to search in other buffers the same string yanked
> to the search ring from Gnus.

Sounds good.  Could you supply a patch for doing that?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#22248; Package emacs,gnus. (Thu, 26 Jan 2017 22:33:02 GMT) Full text and rfc822 format available.

Message #11 received at 22248 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 22248 <at> debbugs.gnu.org
Subject: Re: bug#22248: gnus-article-mode omits apostrophe from isearch string
Date: Thu, 26 Jan 2017 23:26:18 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Juri Linkov <juri <at> linkov.net> writes:
>
>> Trying to put an expression like (setq var 'foo) into the isearch ring
>> by moving point at its beginning and typing C-s C-w C-w C-w ...
>> doesn't add apostrophe in Gnus because gnus-article-mode modifies
>> syntax of ' to whitespace:
>>
>>   (defvar gnus-article-mode-syntax-table
>>     (let ((table (copy-syntax-table text-mode-syntax-table)))
>>       ;; make M-. in article buffers work for `foo' strings
>>       (modify-syntax-entry ?' " " table)
>>       (modify-syntax-entry ?` " " table)
>>
>> and lax-whitespace search together with isearch-yank-word-or-char
>> squeeze apostrophe in a sequence of space characters.
>>
>> One solution is to modify syntax of ' and ` in gnus-article-mode-syntax-table
>> to syntax discussed in bug#22238, i.e. not whitespace and not part
>> of a symbol, still allowing M-. in article buffers work for `foo' strings,
>> and allowing isearch to search in other buffers the same string yanked
>> to the search ring from Gnus.
>
> Sounds good.  Could you supply a patch for doing that?

Did you have a look at doing this?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#22248; Package emacs,gnus. (Sun, 29 Jan 2017 00:51:02 GMT) Full text and rfc822 format available.

Message #14 received at 22248 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 22248 <at> debbugs.gnu.org
Subject: Re: bug#22248: gnus-article-mode omits apostrophe from isearch string
Date: Sun, 29 Jan 2017 02:18:42 +0200
>>> Trying to put an expression like (setq var 'foo) into the isearch ring
>>> by moving point at its beginning and typing C-s C-w C-w C-w ...
>>> doesn't add apostrophe in Gnus because gnus-article-mode modifies
>>> syntax of ' to whitespace:
>>>
>>>   (defvar gnus-article-mode-syntax-table
>>>     (let ((table (copy-syntax-table text-mode-syntax-table)))
>>>       ;; make M-. in article buffers work for `foo' strings
>>>       (modify-syntax-entry ?' " " table)
>>>       (modify-syntax-entry ?` " " table)
>>>
>>> and lax-whitespace search together with isearch-yank-word-or-char
>>> squeeze apostrophe in a sequence of space characters.
>>>
>>> One solution is to modify syntax of ' and ` in gnus-article-mode-syntax-table
>>> to syntax discussed in bug#22238, i.e. not whitespace and not part
>>> of a symbol, still allowing M-. in article buffers work for `foo' strings,
>>> and allowing isearch to search in other buffers the same string yanked
>>> to the search ring from Gnus.
>>
>> Sounds good.  Could you supply a patch for doing that?
>
> Did you have a look at doing this?

Looks like the patch could be as simple as this

diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index e1af859..12fa97c 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -1708,9 +1708,10 @@ (defvar gnus-article-mode-syntax-table
     ;; (modify-syntax-entry ?- "w" table)
     (modify-syntax-entry ?> ")<" table)
     (modify-syntax-entry ?< "(>" table)
-    ;; make M-. in article buffers work for `foo' strings
-    (modify-syntax-entry ?' " " table)
-    (modify-syntax-entry ?` " " table)
+    ;; make M-. in article buffers work for `foo' strings,
+    ;; and still allow C-s C-w to yank ' to the search ring
+    (modify-syntax-entry ?' "'" table)
+    (modify-syntax-entry ?` "'" table)
     table)
   "Syntax table used in article mode buffers.
 Initialized from `text-mode-syntax-table'.")




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#22248; Package emacs,gnus. (Tue, 31 Jan 2017 16:37:02 GMT) Full text and rfc822 format available.

Message #17 received at 22248 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 22248 <at> debbugs.gnu.org
Subject: Re: bug#22248: gnus-article-mode omits apostrophe from isearch string
Date: Tue, 31 Jan 2017 17:36:20 +0100
Juri Linkov <juri <at> linkov.net> writes:

> Looks like the patch could be as simple as this

Thanks; applied.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 31 Jan 2017 16:37:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 22248 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 31 Jan 2017 16:37:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 01 Mar 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.