unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Cc: 38185@debbugs.gnu.org
Subject: bug#38185: isearch-yank-word-or-char grabs periods at ends of words when used on man pages
Date: Thu, 14 Nov 2019 06:41:08 +0100	[thread overview]
Message-ID: <87zhgzqakr.fsf@gnus.org> (raw)
In-Reply-To: <878soo7g49.5.fsf@jidanni.org> ("積丹尼 Dan Jacobson"'s message of "Sun, 10 Nov 2019 08:02:46 +0800")

積丹尼 Dan Jacobson <jidanni@jidanni.org> 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





  reply	other threads:[~2019-11-14  5:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-10  0:02 bug#38185: isearch-yank-word-or-char grabs periods at ends of words when used on man pages 積丹尼 Dan Jacobson
2019-11-14  5:41 ` Lars Ingebrigtsen [this message]
2019-11-14  5:43   ` Lars Ingebrigtsen
2019-11-16 20:25   ` Juri Linkov
2019-11-17  5:51     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zhgzqakr.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=38185@debbugs.gnu.org \
    --cc=jidanni@jidanni.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).