From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: locate-with-filter Date: Sat, 18 Mar 2006 22:55:14 -0600 (CST) Message-ID: <200603190455.k2J4tEK25830@raven.dms.auburn.edu> References: <200603160048.k2G0msu23696@raven.dms.auburn.edu> <200603170221.k2H2L1H14401@raven.dms.auburn.edu> <17435.52238.927514.585806@kahikatea.snap.net.nz> <200603181716.k2IHGpN17847@raven.dms.auburn.edu> <17436.56026.490667.58771@kahikatea.snap.net.nz> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1142744469 5842 80.91.229.2 (19 Mar 2006 05:01:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 19 Mar 2006 05:01:09 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 19 06:01:06 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FKq2L-0008H3-Ra for ged-emacs-devel@m.gmane.org; Sun, 19 Mar 2006 06:01:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FKq2L-0005T7-FE for ged-emacs-devel@m.gmane.org; Sun, 19 Mar 2006 00:01:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FKq26-0005Sr-Rh for emacs-devel@gnu.org; Sun, 19 Mar 2006 00:00:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FKq24-0005Sf-Vx for emacs-devel@gnu.org; Sun, 19 Mar 2006 00:00:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FKq24-0005Sc-Oj for emacs-devel@gnu.org; Sun, 19 Mar 2006 00:00:48 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1FKq7H-0008A8-1x; Sun, 19 Mar 2006 00:06:11 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.13.4+Sun/8.13.3) with ESMTP id k2J50hOS003022; Sat, 18 Mar 2006 23:00:43 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id k2J4tEK25830; Sat, 18 Mar 2006 22:55:14 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: nickrob@snap.net.nz In-reply-to: <17436.56026.490667.58771@kahikatea.snap.net.nz> (message from Nick Roberts on Sun, 19 Mar 2006 16:15:22 +1200) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.1 (manatee.dms.auburn.edu [131.204.53.104]); Sat, 18 Mar 2006 23:00:43 -0600 (CST) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51846 Archived-At: Nick Roberts wrote: > You can always do `C-h v' or `C-h f" to get the docs of something that > the author did not intend as a link. Yes I could but its not quite as convenient. Below is the function that, after Richard's changes, could be bound to `C-c C-c' (in help-mode) and that anybody could rebind to RET. It only differs from the current `help-follow' in that it does not contain: (unless (push-button pos) so that it _consistently_ lists _all_ docs for the symbol under point. So in "the variable `auto-revert-mode'", with point on auto-revert-mode, `C-c C-c' would differ from RET in that it would show all docs for the symbol, whereas RET only shows the variable doc. Together with Richard's changes this more clearly separates two distinct functionalities, that are currently confusingly lumped together: author intended links serving as guidance to the user (followed by the new help-follow), and allowing the user to conveniently access all docs for a symbol that happens to be in the help buffer, even accidentally as the `or' in the "function or face" in the docstring below (followed by help-follow-symbol). (defun help-follow-symbol (&optional pos) "In help buffer, show docs for symbol at POS, defaulting to point. Show all docstrings for that symbol as either a variable, function or face." (interactive "d") (unless pos (setq pos (point))) ;; check if the symbol under point is a function, variable or face (let ((sym (intern (save-excursion (goto-char pos) (skip-syntax-backward "w_") (buffer-substring (point) (progn (skip-syntax-forward "w_") (point))))))) (when (or (boundp sym) (get sym 'variable-documentation) (fboundp sym) (facep sym)) (help-do-xref pos #'help-xref-interned (list sym)))))