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

From: Juri Linkov <[email-masked]>
Date: Sat, 16 Nov 2019 22:25:18 +0200

> (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?

isearch-yank-word-or-char was intended to yank exactly the same text
as navigated by forward-word.

However, I can't reproduce this issue in Man buffers: forward-word
doesn't consider "." as part of a word.  Ah, this is because I fixed
this long ago in the init file ~/.emacs as:

  ;; Don't use `man-mode-syntax-table' that sets word syntax to `.', `_', `:'.
  (add-hook 'Man-mode-hook
            (lambda ()
              (set-syntax-table text-mode-syntax-table)))