all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: Reducing mouse-dependency In Emacs.
Date: Mon, 11 Aug 2003 10:52:10 -0500 (CDT)	[thread overview]
Message-ID: <200308111552.h7BFqAj20828@raven.dms.auburn.edu> (raw)
In-Reply-To: <usmo8spas.fsf@elta.co.il> (message from Eli Zaretskii on 11 Aug 2003 08:04:27 +0200)

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)
============================================================

  reply	other threads:[~2003-08-11 15:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-10  3:42 Reducing mouse-dependency In Emacs Luc Teirlinck
2003-08-10  6:08 ` Eli Zaretskii
2003-08-10 14:53   ` Luc Teirlinck
2003-08-11 12:53   ` Richard Stallman
2003-08-10 16:50 ` Stefan Monnier
2003-08-10 23:09   ` Luc Teirlinck
2003-08-11  4:05     ` Luc Teirlinck
2003-08-11 23:16       ` Richard Stallman
2003-08-11  6:04     ` Eli Zaretskii
2003-08-11 15:52       ` Luc Teirlinck [this message]
2003-08-11 17:52         ` Eli Zaretskii
2003-08-11 14:54     ` Stefan Monnier
2003-08-12  2:30       ` Luc Teirlinck
2003-08-12  6:28         ` Eli Zaretskii
2003-08-12 16:08           ` Luc Teirlinck
  -- strict thread matches above, loose matches on Subject: below --
2003-08-12  1:29 Luc Teirlinck
2003-08-12  1:43 ` Luc Teirlinck
2003-08-12  2:49 Luc Teirlinck
2003-08-13  5:36 Luc Teirlinck
2003-08-13  7:47 ` Miles Bader
2003-08-13 12:59   ` Luc Teirlinck
2003-08-13 22:56     ` Nick Roberts
2003-08-14  0:35       ` Luc Teirlinck
2003-08-14  1:42         ` Miles Bader
2003-08-14  1:04       ` Luc Teirlinck
2003-08-13 14:32   ` Luc Teirlinck

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=200308111552.h7BFqAj20828@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.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.