Subject: bug#38185: isearch-yank-word-or-char grabs periods at ends of words when used on man pages

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 14 Nov 2019 06:41:08 +0100

積丹尼 Dan Jacobson <[email-masked]> writes:

> When used on man pages, isearch-yank-word-or-char also gets periods at
> the ends of words, along with the word. Commas, however, thankfully, are
> not gotten.
>
>     C-w runs the command isearch-yank-word-or-char (found in
>     overriding-terminal-local-map), which is an interactive compiled Lisp
>     function in ‘isearch.el’.
>
>     (isearch-yank-word-or-char)
>
>     Pull next character, subword or word from buffer into search string.
>     Subword is used when ‘subword-mode’ is activated.

The command calls

(isearch--yank-char-or-syntax '(?w) 'forward-word arg)

so I guess this means that "." has word syntax in Man buffers, but ","
doesn't?

I guess that makes sense -- you can have stuff like "foo.bar" that
should be considered a single "word", but I agree that it doesn't make
much sense to have a terminating "." be part of a word.

I'm not sure how to fix that, though -- switch isearch-yank-word-or-char
to something like ffap instead of using syntax classes?

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