From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: Re: M-x man could better guess neighboring word Date: Fri, 14 Dec 2007 10:40:55 +0100 Message-ID: <47624FA7.1030009@gmx.at> References: <8763z1d7hg.fsf@jidanni.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050200010601030503050508" X-Trace: ger.gmane.org 1197626020 24920 80.91.229.12 (14 Dec 2007 09:53:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Dec 2007 09:53:40 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: jidanni@jidanni.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 14 10:53:52 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J37Er-0004OF-Lx for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Dec 2007 10:53:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J37EZ-0006h9-CW for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Dec 2007 04:53:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J372H-0003Mp-32 for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2007 04:40:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J372C-0003M0-Ru for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2007 04:40:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J372B-0003Lj-P1 for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2007 04:40:44 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1J372B-0002g2-9A for bug-gnu-emacs@gnu.org; Fri, 14 Dec 2007 04:40:43 -0500 Original-Received: (qmail invoked by alias); 14 Dec 2007 09:40:40 -0000 Original-Received: from N744P007.adsl.highway.telekom.at (EHLO [62.47.36.231]) [62.47.36.231] by mail.gmx.net (mp048) with SMTP; 14 Dec 2007 10:40:40 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18yA8UKVw4yL3Vqv1cHQ4WK+ikcU6h39wiCQjhWQz SMcoSAaqIfDq+A User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <8763z1d7hg.fsf@jidanni.org> X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:17167 Archived-At: This is a multi-part message in MIME format. --------------050200010601030503050508 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > 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? --------------050200010601030503050508 Content-Type: text/plain; name="man.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="man.patch" *** 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._+:") --------------050200010601030503050508--