Gnus development mailing list
 help / color / mirror / Atom feed
From: "François Pinard" <pinard@iro.umontreal.ca>
Cc: Len Budney <lbudney@pobox.com>
Subject: Those `mailcrypt' "push OK" boxes
Date: 23 Apr 1999 23:34:22 -0400	[thread overview]
Message-ID: <oqr9par8sh.fsf@titan.progiciels-bpi.ca> (raw)

Hi, gang.

`mailcrypt' has this habit to write nice boxes with an OK button as windows
over the Emacs frame, forcing my hand to leave the keyboard, play with
the mouse and click on the said button.  This is surely nice, but neither
efficient nor ergonomic.  Maybe I'm not ready for user-friendliness! :-)

So, I decided to counter-attack with the following kludge.  Maybe it could
serve other people as well?



;; Override message-box (so we avoid the mouse from mailcrypt, for example).
(defun message-box (fmt &rest args)
  (let ((string (apply (function format) fmt args)))
    (ediff-select-lowest-window)
    (split-window-vertically)
    (ediff-select-lowest-window)
    (with-temp-buffer
      (switch-to-buffer (current-buffer))
      (insert string)
      (goto-char (point-min))
      (let ((window-min-height 2))
	(shrink-window-if-larger-than-buffer))
      (let ((cursor-in-echo-area t)
	    key)
	(while (not (memq key '(?\C-m ?\C-j)))
	  (setq key (read-char-exclusive (format "OK? [Enter] "))))))
    (delete-window)))
(autoload 'ediff-select-lowest-window "ediff-wind")

-- 
François Pinard                            mailto:pinard@iro.umontreal.ca
Join the free Translation Project!    http://www.iro.umontreal.ca/~pinard



             reply	other threads:[~1999-04-24  3:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-24  3:34 François Pinard [this message]
1999-04-24 15:36 ` Gareth Jones
1999-04-24 16:43   ` François Pinard
1999-04-25 14:08 ` Stainless Steel Rat
1999-04-25 16:27   ` François Pinard
1999-04-25 21:42     ` Stainless Steel Rat
1999-04-25 22:30       ` François Pinard
1999-04-26  1:19         ` Stainless Steel Rat
1999-04-26  1:46           ` François Pinard
1999-04-26  2:18             ` Stainless Steel Rat
1999-04-26  4:23               ` François Pinard

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=oqr9par8sh.fsf@titan.progiciels-bpi.ca \
    --to=pinard@iro.umontreal.ca \
    --cc=lbudney@pobox.com \
    /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.
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 NNTP newsgroup(s).