* Any easy way to disable mouse behavior that can change to other buffers?
@ 2008-11-13 7:55 anhnmncb
2008-11-13 8:44 ` Andy Stewart
0 siblings, 1 reply; 7+ messages in thread
From: anhnmncb @ 2008-11-13 7:55 UTC (permalink / raw)
To: help-gnu-emacs
Mouse when on modeline, and popup buffers menu by C-<left mouse> can be
used to change to other buffers, both of which are not what I want, can
I disable it?
Thank you.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Any easy way to disable mouse behavior that can change to other buffers?
2008-11-13 7:55 Any easy way to disable mouse behavior that can change to other buffers? anhnmncb
@ 2008-11-13 8:44 ` Andy Stewart
2008-11-13 14:58 ` anhnmncb
0 siblings, 1 reply; 7+ messages in thread
From: Andy Stewart @ 2008-11-13 8:44 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I have a easy way that perhaps can help you.
I configuration below in ~/.emacs
(mouse-avoidance-mode "banish")
to make mouse banish when do any action in Emacs.
But I don't like mouse banish to right-top corner of Frame, because that
will make mouse above Tabbar.
So I rewrite function `mouse-avoidance-banish-destination' to make mouse
banish right-bottom corner of Frame.
(defun mouse-avoidance-banish-destination ()
"The position to which Mouse-Avoidance mode `banish' moves the mouse.
You can redefine this if you want the mouse banished to a different corner."
(let* ((pos (window-edges)))
(cons (+ (nth 1 pos) (frame-width) 50)
(+ (nth 1 pos) (frame-height) 50)))) ;make mouse hide in bottom of frame
Enjoy!
-- Andy.
anhnmncb <anhnmncb@sina.com> writes:
> Mouse when on modeline, and popup buffers menu by C-<left mouse> can be
> used to change to other buffers, both of which are not what I want, can
> I disable it?
>
> Thank you.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Any easy way to disable mouse behavior that can change to other buffers?
2008-11-13 8:44 ` Andy Stewart
@ 2008-11-13 14:58 ` anhnmncb
2008-11-14 0:27 ` Andy Stewart
2008-11-14 13:46 ` Kevin Rodgers
0 siblings, 2 replies; 7+ messages in thread
From: anhnmncb @ 2008-11-13 14:58 UTC (permalink / raw)
To: help-gnu-emacs
You misunderstand me...
I want to disable the ability of mouse clicking on modeline which can
make buffer switching, and the buffer list menu popped up by Ctrl-<left
mouse>.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Any easy way to disable mouse behavior that can change to other buffers?
2008-11-13 14:58 ` anhnmncb
@ 2008-11-14 0:27 ` Andy Stewart
2008-11-14 13:46 ` Kevin Rodgers
1 sibling, 0 replies; 7+ messages in thread
From: Andy Stewart @ 2008-11-14 0:27 UTC (permalink / raw)
To: help-gnu-emacs
Sorry that i can't help you.
I don't use mouse....
My computer haven't mouse.
-- Andy
anhnmncb <anhnmncb@sina.com> writes:
> You misunderstand me...
>
> I want to disable the ability of mouse clicking on modeline which can
> make buffer switching, and the buffer list menu popped up by Ctrl-<left
> mouse>.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Any easy way to disable mouse behavior that can change to other buffers?
2008-11-13 14:58 ` anhnmncb
2008-11-14 0:27 ` Andy Stewart
@ 2008-11-14 13:46 ` Kevin Rodgers
2008-11-15 1:23 ` anhnmncb
1 sibling, 1 reply; 7+ messages in thread
From: Kevin Rodgers @ 2008-11-14 13:46 UTC (permalink / raw)
To: help-gnu-emacs
anhnmncb wrote:
> I want to disable the ability of mouse clicking on modeline which can
> make buffer switching,
Wild guess:
(setq mode-line-input-method-map nil)
(setq mode-line-coding-system-map nil)
(setq mode-line-major-mode-keymap nil)
(setq mode-line-minor-mode-keymap nil)
(setq mode-line-buffer-identification-keymap nil)
(setq mode-line-mode-menu nil)
> and the buffer list menu popped up by Ctrl-<left
> mouse>.
(global-unset-key (kbd "<C-down-mouse-1>"))
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Any easy way to disable mouse behavior that can change to other buffers?
2008-11-14 13:46 ` Kevin Rodgers
@ 2008-11-15 1:23 ` anhnmncb
0 siblings, 0 replies; 7+ messages in thread
From: anhnmncb @ 2008-11-15 1:23 UTC (permalink / raw)
To: help-gnu-emacs
Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:
> anhnmncb wrote:
>> I want to disable the ability of mouse clicking on modeline which can
>> make buffer switching,
>
> Wild guess:
>
> (setq mode-line-input-method-map nil)
> (setq mode-line-coding-system-map nil)
> (setq mode-line-major-mode-keymap nil)
> (setq mode-line-minor-mode-keymap nil)
> (setq mode-line-buffer-identification-keymap nil)
> (setq mode-line-mode-menu nil)
>
>> and the buffer list menu popped up by Ctrl-<left
>> mouse>.
>
> (global-unset-key (kbd "<C-down-mouse-1>"))
None works here except <C-down-mouse-1>, I think emacs as an OS lacks a
function that can lock itself after a paticular time, so I don't need to
be afraid the exposure privary(Like someone switch buffer to my diary, I
open it all the time with emacs).
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Any easy way to disable mouse behavior that can change to other buffers?
@ 2008-11-14 14:01 martin rudalics
0 siblings, 0 replies; 7+ messages in thread
From: martin rudalics @ 2008-11-14 14:01 UTC (permalink / raw)
To: anhnmncb; +Cc: help-gnu-emacs
> I want to disable the ability of mouse clicking on modeline which can
> make buffer switching, and the buffer list menu popped up by Ctrl-<left
> mouse>.
You can try to add the 100% untested code below to your .emacs.
martin
(defun my-propertized-buffer-identification (fmt)
"Return a list suitable for `mode-line-buffer-identification'."
(list (propertize fmt
'face 'mode-line-buffer-id
'help-echo
(purecopy "Buffer name"))))
(setq mode-line-buffer-identification (my-propertized-buffer-identification "%12b"))
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-11-15 1:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-13 7:55 Any easy way to disable mouse behavior that can change to other buffers? anhnmncb
2008-11-13 8:44 ` Andy Stewart
2008-11-13 14:58 ` anhnmncb
2008-11-14 0:27 ` Andy Stewart
2008-11-14 13:46 ` Kevin Rodgers
2008-11-15 1:23 ` anhnmncb
-- strict thread matches above, loose matches on Subject: below --
2008-11-14 14:01 martin rudalics
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).