From: Luc Teirlinck <teirllm@dms.auburn.edu>
Subject: Re: Reducing mouse-dependency In Emacs.
Date: Mon, 11 Aug 2003 21:49:53 -0500 (CDT) [thread overview]
Message-ID: <200308120249.h7C2nrw21487@raven.dms.auburn.edu> (raw)
The following (still strictly experimental) version of automatic
help-echo display eliminates the main obnoxiousness of the original
version. In the original version, you could be asked a question in
the minibuffer, have to think about the answer, and suddenly the
question disappears for some useless help-echo. The following version
prevents that. It will only display the help-echo if the minibuffer
is empty or contains "Quit". So, if you have "Mark set" in the echo
area, you have to do C-g or otherwise clear the echo area (say by
moving point) to get the help-echo. Seems better than to miss an
important message, if not paying attention, by having it overridden by
help-echo. Anyway, I wound up finding the original version unbearable
in actual use. I found the one below much better.
===File ~/newhelp-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 for use in `run-with-idle-timer' and
prevents display 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 "%s" short))
((stringp echo) (message "%s" 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 #'maybe-display-help)))
(defun maybe-display-help ()
(unless (and (current-message)
(not (string= (current-message) "Quit")))
(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)
============================================================
next reply other threads:[~2003-08-12 2:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-12 2:49 Luc Teirlinck [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-08-13 5:36 Reducing mouse-dependency In Emacs 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
2003-08-12 1:29 Luc Teirlinck
2003-08-12 1:43 ` Luc Teirlinck
2003-08-10 3:42 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
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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200308120249.h7C2nrw21487@raven.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).