all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: nickrob@snap.net.nz, emacs-devel@gnu.org
Subject: Re: locate-with-filter
Date: Tue, 28 Mar 2006 22:09:32 -0600 (CST)	[thread overview]
Message-ID: <200603290409.k2T49W729435@raven.dms.auburn.edu> (raw)
In-Reply-To: <E1FLVG6-000271-AC@fencepost.gnu.org> (message from Richard Stallman on Mon, 20 Mar 2006 20:02:02 -0500)

Richard Stallman wrote:

       While grepping, I noticed problems with `list-faces-display' and
       `list-character-sets'.  These say: "Use <mouse-2> or M-x help-follow"
       in their introductory text, even though `M-x help-follow' is bound to
       RET in these buffers.

   How about making them use help-follow-symbol instead of help-follow?
   Wouldn't that make them work right?

No because `help-follow-symbol' does not follow buttons.  It always
displays any available docs, even if the buttons do something
completely unrelated, as is the case with many buttons in the buffers
in question.

The problem is that the "\\[help-follow]" in the docs is not working
right, probably because of the use of
`minor-mode-overriding-map-alist'.  The purpose of \\[...] is to take
user bindings into account.  After the changes you made to
help-follow, binding `help-follow' to anything else but RET does not
work anymore.  Hence, the \\[...] would make no sense even _if_ it
worked correctly.  That is why I suggested to simply hardcode RET in
the docstring and that is what my first two patches below (which I
submitted before) do.  I believe that we must do _something_, because
the current introductory text is quite simply incorrect and misleading.

After these two patches, the only problem that remains is that
rebinding `help-follow' no longer works.  Maybe that problem is not
important enough to worry about.  But I submitted a third patch
(reproduced below) that would fix this problem without any other
change to current behavior.  I could apply that third patch too.  If
not, what about mentioning in the docstrings of `help-follow' and
`help-follow-mouse' that binding them to different keys (than RET or
mouse-{1,2}, respectively) will not work as expected?

Reminder of my patches:

===File ~/faces-diff========================================
*** faces.el	06 Feb 2006 16:01:46 -0600	1.348
--- faces.el	19 Mar 2006 21:21:23 -0600	
***************
*** 1205,1211 ****
  	  (concat
  	   "Use "
  	   (if (display-mouse-p) "\\[help-follow-mouse] or ")
! 	   "\\[help-follow] on a face name to customize it\n"
  	   "or on its sample text for a description of the face.\n\n")))
  	(setq help-xref-stack nil)
  	(dolist (face faces)
--- 1205,1211 ----
  	  (concat
  	   "Use "
  	   (if (display-mouse-p) "\\[help-follow-mouse] or ")
! 	   "RET on a face name to customize it\n"
  	   "or on its sample text for a description of the face.\n\n")))
  	(setq help-xref-stack nil)
  	(dolist (face faces)
============================================================

===File ~/mule-dialog-diff==================================
*** mule-diag.el	24 Sep 2005 09:35:46 -0500	1.98
--- mule-diag.el	19 Mar 2006 21:19:26 -0600	
***************
*** 162,168 ****
  	 (substitute-command-keys
  	  (concat "Use "
  		  (if (display-mouse-p) "\\[help-follow-mouse] or ")
! 		  "\\[help-follow]:\n")))
  	(insert "  on a column title to sort by that title,")
  	(indent-to 56)
  	(insert "+----DIMENSION\n")
--- 162,168 ----
  	 (substitute-command-keys
  	  (concat "Use "
  		  (if (display-mouse-p) "\\[help-follow-mouse] or ")
! 		  "RET:\n")))
  	(insert "  on a column title to sort by that title,")
  	(indent-to 56)
  	(insert "+----DIMENSION\n")
============================================================

===File ~/help-mode-diff====================================
*** help-mode.el	19 Mar 2006 17:03:47 -0600	1.44
--- help-mode.el	19 Mar 2006 21:45:44 -0600	
***************
*** 619,636 ****
      (apply function args)))
  
  ;; The doc string is meant to explain what buttons do.
! (defun help-follow-mouse ()
!   "Follow the cross-reference that you click on."
!   (interactive)
!   (error "No cross-reference here"))
  
  ;; The doc string is meant to explain what buttons do.
! (defun help-follow ()
!   "Follow cross-reference at point.
  
  For the cross-reference format, see `help-make-xrefs'."
!   (interactive)
!   (error "No cross-reference here"))
  
  (defun help-follow-symbol (&optional pos)
    "In help buffer, show docs for symbol at POS, defaulting to point.
--- 619,643 ----
      (apply function args)))
  
  ;; The doc string is meant to explain what buttons do.
! (defun help-follow-mouse (click)
!   "Follow the cross-reference that you CLICK on."
!   (interactive "e")
!   (let* ((start (event-start click))
!  	 (window (car start))
!  	 (pos (car (cdr start))))
!     (with-current-buffer (window-buffer window)
!       (help-follow pos))))
  
  ;; The doc string is meant to explain what buttons do.
! (defun help-follow (&optional pos)
!   "Follow cross-reference at POS, defaulting to point.
  
  For the cross-reference format, see `help-make-xrefs'."
!   (interactive "d")
!   (unless pos
!     (setq pos (point)))
!   (unless (push-button pos)
!     (error "No cross-reference here")))
  
  (defun help-follow-symbol (&optional pos)
    "In help buffer, show docs for symbol at POS, defaulting to point.
============================================================

  parent reply	other threads:[~2006-03-29  4:09 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-11 23:46 locate-with-filter Richard Stallman
2006-03-12 23:59 ` locate-with-filter Luc Teirlinck
2006-03-13  0:18   ` locate-with-filter Luc Teirlinck
2006-03-13  4:39     ` locate-with-filter Eli Zaretskii
2006-03-13 11:30       ` locate-with-filter Peter Breton
2006-03-13 12:55   ` locate-with-filter Richard Stallman
2006-03-14  2:55     ` locate-with-filter Luc Teirlinck
2006-03-14  4:41       ` locate-with-filter Eli Zaretskii
2006-03-14  5:39         ` locate-with-filter Luc Teirlinck
2006-03-14 16:09       ` locate-with-filter Richard Stallman
2006-03-15  5:41         ` locate-with-filter Luc Teirlinck
2006-03-15 13:33           ` locate-with-filter Luc Teirlinck
2006-03-15 13:39             ` locate-with-filter Luc Teirlinck
2006-03-15 20:23           ` locate-with-filter Richard Stallman
2006-03-15 22:47             ` locate-with-filter Luc Teirlinck
2006-03-16 20:18               ` locate-with-filter Richard Stallman
2006-03-17  1:38                 ` locate-with-filter Luc Teirlinck
2006-03-17  2:21                 ` locate-with-filter Luc Teirlinck
2006-03-18  8:44                   ` locate-with-filter Richard Stallman
2006-03-18  8:59                     ` locate-with-filter Nick Roberts
2006-03-18 17:16                       ` locate-with-filter Luc Teirlinck
2006-03-19  4:15                         ` locate-with-filter Nick Roberts
2006-03-19  3:50                           ` locate-with-filter Luc Teirlinck
2006-03-19  4:55                           ` locate-with-filter Luc Teirlinck
2006-03-19  5:09                             ` locate-with-filter Luc Teirlinck
2006-03-19  5:22                               ` locate-with-filter Luc Teirlinck
2006-03-19 21:51                             ` locate-with-filter Richard Stallman
2006-03-20  5:12                               ` locate-with-filter Luc Teirlinck
2006-03-21  1:02                                 ` locate-with-filter Richard Stallman
2006-03-21  1:13                                   ` locate-with-filter Luc Teirlinck
2006-03-29  4:09                                   ` Luc Teirlinck [this message]
2006-03-29 23:02                                     ` locate-with-filter Richard Stallman
2006-03-30  0:29                                       ` locate-with-filter Luc Teirlinck
2006-03-31  3:10                                         ` locate-with-filter Richard Stallman
2006-04-01  1:34                                           ` locate-with-filter Luc Teirlinck
2006-04-01  1:52                                           ` locate-with-filter Luc Teirlinck
2006-03-19  9:09                       ` locate-with-filter Richard Stallman
2006-03-19 20:15                         ` locate-with-filter Nick Roberts
2006-03-19 20:19                           ` locate-with-filter Luc Teirlinck
2006-03-19 22:05                             ` locate-with-filter Nick Roberts
2006-03-20 15:05                           ` locate-with-filter Richard Stallman
2006-03-19  1:28                     ` locate-with-filter Luc Teirlinck
2006-03-19  2:29                       ` locate-with-filter Luc Teirlinck
2006-03-20  6:18                 ` locate-with-filter Stefan Monnier
2006-03-14 16:09       ` locate-with-filter Richard Stallman
2006-03-15  5:37         ` locate-with-filter Luc Teirlinck
2006-03-15  5:48         ` locate-with-filter Luc Teirlinck
2006-03-15 20:23           ` locate-with-filter Richard Stallman

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=200603290409.k2T49W729435@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    --cc=nickrob@snap.net.nz \
    /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.