[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What do you think?
From: |
Kim F. Storm |
Subject: |
Re: What do you think? |
Date: |
14 Jan 2002 10:51:13 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
Richard Stallman <address@hidden> writes:
> It might also make sense for a mouse click in the echo area to invoke
> view-messages.
>
> What do people think of that idea?
> It is hard to implement selection from the echo area,
> but this comes a little close to it.
>
My emacs doesn't know about view-messages, so I tried this instead:
(defun mouse-drag-region-or-view-messages (event)
"Call `mouse-drag-region', or, if in the echo area, `view-messages'.
\"The echo area\" means any inactive miniwindow.
Like mouse-drag-region, this must be bound to a button-down mouse event."
(interactive "e")
(let ((w (posn-window (event-start event))))
(if (or (not (window-minibuffer-p w))
(minibuffer-window-active-p w))
(mouse-drag-region event)
;; Discard the up event.
(read-event)
(save-excursion
(set-buffer "*Messages*")
(goto-char (point-max))
(display-buffer (current-buffer))))))
I actually like the fact that the messages buffer is not selected.
I've already moved my hand to the mouse to display it, so if I want to
select it or copy stuff from it, it's easily done.
--
Kim F. Storm <address@hidden> http://www.cua.dk