all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
[parent not found: <mailman.67.1162475959.2155.help-gnu-emacs@gnu.org>]
* Re: Need an enabler for a bad habit.
@ 2006-11-02 14:00 martin rudalics
  0 siblings, 0 replies; 20+ messages in thread
From: martin rudalics @ 2006-11-02 14:00 UTC (permalink / raw)
  Cc: help-gnu-emacs

 > The only drawback I can see with it
 > is that it removes the "pop up the message buffer" function.

(defun mouse-drag-region (start-event)
   "Set the region to the text that the mouse is dragged over.
Highlight the drag area as you move the mouse.
This must be bound to a button-down mouse event.
In Transient Mark mode, the highlighting remains as long as the mark
remains active.  Otherwise, it remains until the next input event.

If the click is in the echo area, pop up the messages buffer and
run a command."
   (interactive "e")
   (let ((w (posn-window (event-start start-event))))
     (if (and (window-minibuffer-p w)
	     (not (minibuffer-window-active-p w)))
	(save-excursion
	  ;; Swallow the up-event.
	  (read-event)
	  (set-buffer (get-buffer-create "*Messages*"))
	  (goto-char (point-max))
	  (display-buffer (current-buffer))
	  (call-interactively 'execute-extended-command))
       ;; Give temporary modes such as isearch a chance to turn off.
       (run-hooks 'mouse-leave-buffer-hook)
       (mouse-drag-track start-event t))))

^ permalink raw reply	[flat|nested] 20+ messages in thread
[parent not found: <mailman.51.1162452995.2155.help-gnu-emacs@gnu.org>]
* Re: Need an enabler for a bad habit.
@ 2006-11-02  7:36 martin rudalics
  0 siblings, 0 replies; 20+ messages in thread
From: martin rudalics @ 2006-11-02  7:36 UTC (permalink / raw)


You probably want something like the below.  Replace
`execute-extended-command' by whatever you need.

(defun mouse-drag-region (start-event)
   "Set the region to the text that the mouse is dragged over.
Highlight the drag area as you move the mouse.
This must be bound to a button-down mouse event.
In Transient Mark mode, the highlighting remains as long as the mark
remains active.  Otherwise, it remains until the next input event.

If the click is in the echo area, run a command."
   (interactive "e")
   (let ((w (posn-window (event-start start-event))))
     (if (and (window-minibuffer-p w)
	     (not (minibuffer-window-active-p w)))
	(save-excursion
	  ;; Swallow the up-event.
	  (read-event)
	  (call-interactively 'execute-extended-command))
       ;; Give temporary modes such as isearch a chance to turn off.
       (run-hooks 'mouse-leave-buffer-hook)
       (mouse-drag-track start-event t))))

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Need an enabler for a bad habit.
@ 2006-10-31 16:59 William Case
  2006-11-03 19:30 ` William Case
  0 siblings, 1 reply; 20+ messages in thread
From: William Case @ 2006-10-31 16:59 UTC (permalink / raw)


Hi;

Is there a way to click on the mini-buffer or use a shortcut key so that
my cursor is placed in the mini-buffer before I begin to type a command?

I know, I know.  There is no need.  I can just start to type my command
and it will automatically appear in the mini-buffer.  This has to do
with my own uncorrectable bad habit, not necessity.

The mini-buffer looks and feels like a command line.  I have the habit
of wanting to click on it before typing a command.  If I am not paying
attention to my actions, but rather thinking about something one the
screen, I keep clicking and clicking.  Of course, nothing happens. 

After 2 1/2 years of not being able to kick the habit, is there a way I
can set up my emacs to show a blinking cursor in the mini-buffer and be
done with it?

-- 
Regards Bill

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

end of thread, other threads:[~2006-11-03 19:30 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.472.1162314011.27805.help-gnu-emacs@gnu.org>
2006-10-31 17:34 ` Need an enabler for a bad habit Pascal Bourguignon
2006-11-01  9:33   ` Mathias Dahl
2006-11-01 11:25     ` William Case
     [not found]     ` <mailman.12.1162380544.2155.help-gnu-emacs@gnu.org>
2006-11-01 15:05       ` Mathias Dahl
2006-11-01 16:38         ` William Case
2006-11-01 17:55           ` Peter Dyballa
2006-11-01 20:17           ` Kevin Rodgers
2006-11-01 23:12             ` William Case
2006-11-02 18:54               ` Kevin Rodgers
2006-11-01 23:28             ` William Case
     [not found]         ` <mailman.19.1162399165.2155.help-gnu-emacs@gnu.org>
2006-11-01 16:45           ` David Kastrup
2006-11-01 17:03           ` Mathias Dahl
2006-11-03 17:59             ` Drew Adams
     [not found] <mailman.67.1162475959.2155.help-gnu-emacs@gnu.org>
2006-11-02 14:23 ` Mathias Dahl
2006-11-02 16:31   ` Drew Adams
2006-11-02 14:00 martin rudalics
     [not found] <mailman.51.1162452995.2155.help-gnu-emacs@gnu.org>
2006-11-02  9:42 ` Mathias Dahl
  -- strict thread matches above, loose matches on Subject: below --
2006-11-02  7:36 martin rudalics
2006-10-31 16:59 William Case
2006-11-03 19:30 ` William Case

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.