From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: Reducing mouse-dependency In Emacs. Date: Mon, 11 Aug 2003 10:52:10 -0500 (CDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200308111552.h7BFqAj20828@raven.dms.auburn.edu> References: <200308100342.h7A3gXV19877@raven.dms.auburn.edu> <200308101650.h7AGovxS005131@rum.cs.yale.edu> <200308102309.h7AN9O420410@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1060617410 2480 80.91.224.253 (11 Aug 2003 15:56:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Aug 2003 15:56:50 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Aug 11 17:56:49 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19mF2P-0002No-00 for ; Mon, 11 Aug 2003 17:56:49 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19mF9i-0006x4-00 for ; Mon, 11 Aug 2003 18:04:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19mF1c-00067D-GG for emacs-devel@quimby.gnus.org; Mon, 11 Aug 2003 11:56:00 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19mF1S-000604-8X for emacs-devel@gnu.org; Mon, 11 Aug 2003 11:55:50 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19mF0t-0004oz-Us for emacs-devel@gnu.org; Mon, 11 Aug 2003 11:55:48 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.20) id 19mEzd-0002gu-PQ for emacs-devel@gnu.org; Mon, 11 Aug 2003 11:53:57 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.9/8.12.9) with ESMTP id h7BFrseQ009125; Mon, 11 Aug 2003 10:53:55 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id h7BFqAj20828; Mon, 11 Aug 2003 10:52:10 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: eliz@elta.co.il In-reply-to: (message from Eli Zaretskii on 11 Aug 2003 08:04:27 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15882 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15882 Eli Zaretskii wrote: Why is this distracting? A user who turns such a feature on must be knowing what they are doing. For example, I assume a blind person _wants_ this info to be spelled by the speech synthesizer; otherwise, how would she know about these properties sitting around the text? (I assume that your implementation waits for some amount of time before it displays the text in the echo area, so the text is shown only if one dwells long enough on the text covered by the property.) I only used a rudimentary implementation to experiment. It is provided below. If we would go for a "real" implementation, the variable `delay' would be replaced by a real defcustom for a variable with a longer name and there would be a user option to enable or cancel the timer. In the meantime, one can experiment with (setq delay some_number) Do: `M-x cancel-echo' when you are fed up with it. (Which may happen rather quickly.) Again, this command is only provided for experimentation convenience. Some of the really rough edges could be improved by a more sophisticated implementation. However, I do not know what to do about the fact that the vast majority of things popping up are of the: "mouse-2: do something you do not want to do" type. (In the most often used buffers, dired, *info* and the like.) I find that stuff popping up in the echo area all the time annoying, let alone have it spoken to me. (And a blind person can not use the mouse anyway.) otherwise, how would she know about these properties sitting around the text? That is a problem. That is one of the reasons I provided `next-help-echo-region' and `previous-help-echo-region'. They allow to scan the buffer and check what kind of features are provided. This can be done while the user is focused on this subject, without distracting her while she is working on something else and should be focusing on that. For the seeing non mouse oriented user, my highlighting functions, which I will send somewhat later could be used as a complement to these motion functions. They too are meant more to get some idea of "what is in the buffer" than as permanent highlighting. I do not know how highlighting works in emacspeak. ===File ~/help-timer.el===================================== (defun print-local-help (&optional timer) "Display help related text or overlay properties. This displays a short help message in the echo area, namely the value of the `short-help' text or overlay property at point. If there is no `short-help' property at point, but there is a `help-echo' property whose value is a string, then that is printed instead. The timer argument is meant fro use in `run-with-idle-timer' and prevents displey of a message in case there is no help." (interactive) (let ((short (get-char-property (point) 'short-help)) (echo (get-char-property (point) 'help-echo))) (cond (short (message short)) ((stringp echo) (message echo)) ((not timer) (message "No local help at point"))))) (defvar delay 1) (defvar local-help-timer nil) (unless local-help-timer (setq local-help-timer (run-with-idle-timer delay t #'print-local-help t))) (defun cancel-echo () (interactive) (cancel-timer local-help-timer) (setq local-help-timer nil)) (global-set-key "\C-h\C-l" 'print-local-help) ============================================================