Gnus development mailing list
 help / color / mirror / Atom feed
* Those `mailcrypt' "push OK" boxes
@ 1999-04-24  3:34 François Pinard
  1999-04-24 15:36 ` Gareth Jones
  1999-04-25 14:08 ` Stainless Steel Rat
  0 siblings, 2 replies; 11+ messages in thread
From: François Pinard @ 1999-04-24  3:34 UTC (permalink / raw)
  Cc: Len Budney

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



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~1999-04-26  4:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-24  3:34 Those `mailcrypt' "push OK" boxes François Pinard
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

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