all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: jidanni@jidanni.org
Cc: bug-gnu-emacs@gnu.org
Subject: Re: M-x man could better guess neighboring word
Date: Fri, 14 Dec 2007 10:40:55 +0100	[thread overview]
Message-ID: <47624FA7.1030009@gmx.at> (raw)
In-Reply-To: <8763z1d7hg.fsf@jidanni.org>

[-- Attachment #1: Type: text/plain, Size: 396 bytes --]

> My cursor is at "_":
> jidanni@fartzwadd:~$ crontab _
> and I do M-x man, and it doesn't prompt me with the default of
> crontab, instead I have to move the cursor back a bit and try again.
> emacs-version "22.1.1"

Please try the attached patch.  Would you find it useful to
search previous lines, the remainder of the current line,
following lines?  Should we skip any non-whitespace chars?


[-- Attachment #2: man.patch --]
[-- Type: text/plain, Size: 457 bytes --]

*** man.el.~1.167.2.6.~	Thu Nov 29 19:51:20 2007
--- man.el	Fri Dec 14 10:22:56 2007
***************
*** 652,657 ****
--- 652,658 ----
        (if pos (goto-char pos))
        ;; Default man entry title is any word the cursor is on, or if
        ;; cursor not on a word, then nearest preceding word.
+       (skip-chars-backward " \t")
        (skip-chars-backward "-a-zA-Z0-9._+:")
        (let ((start (point)))
  	(skip-chars-forward "-a-zA-Z0-9._+:")


  reply	other threads:[~2007-12-14  9:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-14  8:07 M-x man could better guess neighboring word jidanni
2007-12-14  9:40 ` martin rudalics [this message]
2007-12-15  1:33   ` jidanni
2007-12-16 10:11     ` martin rudalics
2007-12-17 13:38       ` jidanni
2007-12-17 22:19         ` martin rudalics
2007-12-18  1:53           ` jidanni

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

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

  git send-email \
    --in-reply-to=47624FA7.1030009@gmx.at \
    --to=rudalics@gmx.at \
    --cc=bug-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.