Questions tagged [mouse]

for Emacs support of mouse. Emacs mouse interface supports click events, drag events, button-down events, and motion events. Whereas the current buffer handles keystrokes, mouse events in a clicked buffer are independent of the current buffer.

0
votes
0answers
15 views

Outline minor mode + mouse

XEmacs had outl-mouse that used outline-minor-mode plus a few pixmaps and mouse keybindings to let old lazy guys to hide and show (in my use case) sections and subsections etc of my AUCTeX buffers, ...
0
votes
1answer
25 views

Replace clicking a menu bar option from M-` to f10 behavior

When I click on File I want to see and not What can I change to provide this functionality? This question didn't really get the right answer.
0
votes
1answer
43 views

After change from Ubuntu to Lubuntu the mouse wheel (scroll) doesn't work without pressing CTRL together

When I try to scroll with mouse I receive a message saying Wrong type argument: commandp, mouse-5 or Wrong type argument: commandp, mouse-4. This happens after I tried a lot of random fixes. Before ...
1
vote
1answer
21 views

binding M-[ causes mouse focus to insert characters

I have bound M-[ to backward-paragraph. This causes a problem in terminal mode, whereby every time the mouse enters or leaves the frame (i.e., Emacs gains or loses focus), the characters I and O are ...
0
votes
1answer
45 views

Prevent mouse click from changing cursor position while in insert mode

I work on a laptop most of the time and it happens somewhat often that while inserting some text (in evil mode) I will accidentally hit the touchpad with my thumb, changing the cursor position and ...
1
vote
1answer
16 views

right click for menu with choices (to change font size)?

I am using emacs 26.1 under macos. when I right-click with the mouse, emacs seems to want to select the region. alas, I would prefer to see a popup menu where I can select a few choices that I would ...
1
vote
1answer
43 views

How can I change what happens when I click on a pdf-tools link?

I read pdfs with pdf-tools, but I think what I'm asking may apply to more than pdf-tools alone. In any case, as an example, some research paper pdfs have references with clickable links - say a link ...
1
vote
2answers
63 views

How to make an invisible overlay displaying other text clickable

I've been trying to add the ability to unfold with mouse by clicking on ellipsis in my json-mode, but after considerable time spent experimenting and looking through the Elisp manual, I can't figure ...
1
vote
0answers
32 views

Disable mouse drag to select

I often run into an issue where I will click in a Emacs frame to make it active and accidentally slide my cursor so that it changes from a click to a drag. This means that some text is highlighted ...
0
votes
0answers
20 views

Cygwin mintty cut will paste to notepad, but (sometimes) not to cygwin emacs. Why? mouse-yank-primary?

I'm running Windows 7, cygwin emacs-w32 26.1, and mintty 2.9.6. When I select text in mintty (using the mouse), and paste (using C-v) into Notepad (for example), it works the way I would expect it to....
1
vote
1answer
41 views

Update point using mouse

I have been trying to add a custom keyboard command that will find a functions definition using S-mouse1. The issue is that I need two mouse clicks for this to work. The first click is to move ...
3
votes
2answers
80 views

xpm: Change displayed image on mouse-over in `header-line-format`

Q: How do I programmatically instruct Emacs to change a displayed image (XPM) on mouse-over in the header-line-format? For example, the following image has a black circle with a white letter X. On ...
0
votes
2answers
29 views

bind an insertion to a mouse click [duplicate]

I need to change a space to a | here and there and i guessed that the best possibility were to bind a mouse click and the insertion of the pipe (global-set-key [s-mouse-1] '(insert "|")) But when I ...
2
votes
1answer
116 views

How to get xemacs-like Buffers menu entry in emacs?

xemacs has a nicely organized Buffers entry in its built-in menu. As you can see from the snapshot, it's sorted alphabetically and grouped by modes: I can't find how to make emacs do the same. menu-...
1
vote
0answers
37 views

How to avoid entering visual mode when clicking a link while using evil?

Emacs newbie here using spacemacs. How to avoid entering visual mode when clicking a link while using evil? This is particularly problematic in org-mode.
5
votes
1answer
808 views

can scrolling be smoother than single line in emacs/org-mode?

Using the trackpad, the scrolling in emacs/spacemacs is notably less smooth than in modern browsers and other editors. I have to confess that this jerkiness irks me more than I would prefer but I have ...
2
votes
1answer
115 views

Use mouse buttons as modifiers

I want to make use of a Thinkpad trackpoint's thumb buttons which I almost never use in Emacs anyway. I'd like to use them as additional Controls in Emacs, and in Emacs only. I've found this answer, ...
0
votes
1answer
156 views

How to resize vertical split with mouse when using telephone-line instead of mode-line?

According to this StackOverflow answer, one can resize a vertical split with the mouse by dragging the mode-line in a specific spot. I'm using telephone-line and can't find any spot on there to ...
1
vote
1answer
61 views

How to get mouse copy like done on Lisp Machine Zmacs/ZWEI?

I'd like my emacs v25.3.1 running on Mac OS X to have a mouse middle button functionality that copies what you mouse middle on to the insertion point in your buffer. This is great when writing code ...
5
votes
2answers
94 views

local keymap in mode-line doesn't work in terminal

I'm having trouble with getting local keymap:s to work in the mode-line, but only in terminals (with xterm-mouse-mode enabled). This applies to both the standard mode-line entries (like mode-line-...
0
votes
1answer
32 views

How can I return back to point position after jumping by `<down-mouse-1>`?

How can I return back to point position after jumping by <down-mouse-1>? Example: moving in the buffer for a while with C-pbfn, then use mouse for navigation, and press C-u C-<space> ...
5
votes
3answers
401 views

Mouse wheel not working with new mouse

I'm running Emacs 25.1.1 on Debian. No particularly elaborate setup. I recently bought a new mouse, a Logitech MX Anywhere 2S, though I am not using any of the "programmable" features. I simply use ...
2
votes
0answers
19 views

How to reliably redefine scroll wheel in isearch? [I'm using Mitsuharu Yamamoto's Mac port]

I decided to define <wheel-up> and <wheel-down> to isearch-repeat-forward and isearch-repeat-backward in the isearch-mode-map. This works, but if you scroll quickly, it reverts to ...
1
vote
3answers
531 views

Hide mouse pointer while typing

Some programs, like many terminal emulators and gVim, hide the mouse pointer as soon as the keyboard is in use. Obviously, this is helpful when the mouse pointer happens to obscure some text behind it....
2
votes
0answers
82 views

Horizontal Scroll Wheel on Mouseover Buffer

My mouse has a horizontal scroll function, where I can tap the scroll wheel left and right to scroll horizontally. By default, it seems Emacs does nothing with that. The scroll wheel produces <...
0
votes
1answer
88 views

do not move window when “left mouse click on empty part of menubar”

With Emacs GTK, when left clicking with the mouse on an empty part of the menubar, it starts moving the whole window (aka it moves the frame). Emacs is doing this also, when starting it with emacs -Q. ...
1
vote
1answer
126 views

How can Emacs mouse capture in an X11 based terminal be disabled to enable copy and past?

I am using Spacemacs in a terminal in a desktop, ie Konsole and when I try to copy and paste I see that emacs is capturing mouse clicks. Is it possible to disable Emacs mouse capture for copying and ...
1
vote
1answer
586 views

How to use menu bar at the top via mouse?

I am opening emacs in --no-window-system mode and I switched xterm-mouse-mode on. Mouse clicks within a buffer work. However, I want the menu at the top of the window to open when I click on it. I.e.,...
3
votes
1answer
368 views

Keyboard equivalent of left mouse click in org mode

Is there a keyboard equivalent of left mouse click in emacs? Use case here is an .org file I have which contains a no. of URLs I can left click on those URLs to have them open in a browser I was ...
1
vote
1answer
143 views

elisp - detect line change event to trigger function

I want to detect line change event (arrow-,arrow- or mouse click) to trigger my function call. Below example handled arrow- arrow- but can not handle mouse click or C-n C-p line change event. (defun ...
1
vote
1answer
110 views

Making it so that cursor movement after command will deactivate region

I'm overriding double-mouse-1 to do additional stuff on top of its default behavior. To this end, I have a function that (1) does my additional stuff and then (2) calls another function, ora-mark-like-...
1
vote
2answers
116 views

Detecting double click when running from terminal

I'm using this in my .emacs file to make double-clicking the left mouse button run a command: (global-set-key [(double-mouse-1)] 'some-command) This only works in GUI mode; it doesn't work when ...
3
votes
2answers
290 views

How can I move point to where the mouse is pointing now

I want to move point to where the mouse is pointing. This is easy to do interactively: just click and point will move to where the mouse is pointing. However, I need to do this inside elisp code. I ...
4
votes
2answers
172 views

Detect if mouse button is held down?

I have some code that runs in a hook that I want to change to only execute only if the left mouse button is not currently held down. I don't see any obvious functions or variables that let me directly ...
1
vote
0answers
57 views

How to change mouse pointer in mode line or header line?

The mouse pointer shape changes whether its over the buffer, over the mode line, or header line, if that exists. How can I change the mouse pointer shapes for these different areas to something other ...
1
vote
0answers
1k views

Set scroll-amount for mouse wheel in .emacs

What I've tried in .emacs (note: I don't know elisp, and just tried cobbling this stuff together from googling and from other people's stuff) is (mouse-wheel-mode 't) ;;; mouse-wheel enabled (setq ...
2
votes
3answers
727 views

xterm-mouse-mode use mouse on clickable texts

I am using emacs with PuTTY. I have xterm-mouse-mode turned on, and it works nicely, except that nothing happens when I click on "clickable texts" for example on the start page, or in neotree. Is ...
1
vote
0answers
232 views

mouse-wheel-follow-mouse for horizontal scrolling?

I like having mouse-wheel-follow-mouse set to non-nil, so I can use the trackpad to scroll an inactive window. Unfortunately, it doesn't apply to horizontal scrolling, so if I try to scroll an ...
3
votes
2answers
131 views

How to disable query to turn on disabled command?

I have this in my .emacs file to disable mouse right clicks: (put 'mouse-save-then-kill 'disabled "mouse-save-then-kill disabled\n") How can I now disable the query generated by emacs to turn this ...
3
votes
1answer
52 views

What does this 'shift' do here?

I'm trying to understand this value assignment: (setq mouse-wheel-scroll-amount '(2 ((shift) . 1))) I know that shift is a bitwise shift. But I don't understand what is the result of this operation ...
3
votes
2answers
269 views

Dired reuse buffer on mouse click

I am currently using the diredp-toggle-find-file-reuse-dir feature of Dired+ so that selecting a directory in a dired buffer opens the directory in the current buffer as described here. However, it ...
11
votes
3answers
423 views

What is the select word/symbol function bound to <double-mouse-1>

I love the ability to select word/symbol at point which I currently do with double mouse click. I would like to be able to do it from the keyboard, and so I'd like to bind it to a keystroke (or maybe ...
5
votes
4answers
1k views

How to disable mouse in Spacemacs

I'd like to completely disable my mouse in Spacemacs. Following the advice in this answer, I set up the following in my .spacemacs file as (defun dotspacemacs/user-config () "Configuration function ...
2
votes
1answer
103 views

How to find the window under the mouse pointer

Is there a function that finds which Emacs window within a frame the mouse pointer is over without clicking or moving the mouse? I know that (mouse-position) includes the frame the mouse is over, but ...
1
vote
1answer
68 views

Make mouse-2 yank in org headlines

I use mouse-2 quite often for mouse-yank-primary. However, if I am at the start of an org-mode headline, instead of yanking from my cut buffer, it toggles the level of the headline. For example, if I ...
4
votes
1answer
803 views

Drag selected text with the mouse

In many editors it is standard to move selected text by dragging and dropping it with the mouse. In emacs dragging selection with the mouse starts a new selection by default. This is extremely ...
1
vote
3answers
191 views

Stop emacs treating touchpad scrolling like C-g in minibuffer

I have a ThinkPad with a trackpad, and emacs exits from C-s and also from interactive replace using M-%, whenever I brush my hand over the trackpad while touch-typing - which happens far too often. ...
7
votes
5answers
1k views

Generate mouse-2 event from MacBook trackpad

I have Emacs.app version 24.5 (9.0) on a MacBook with Mac OS X 10.11.3 (15D21). How can I generate mouse-2 from my MacBook's trackpad? I've googled and found references to mac-emulate-three-button-...
3
votes
1answer
252 views

How to make mouse-1 behave the same as RET in dired?

When I click with mouse-1 in dired it will open a new frame with the selected file. When I press return on the same file it will open the file in the same frame. How can I synchronize this behavior? I....
4
votes
1answer
1k views

Emacs in PuTTY with xterm-mouse-mode: how to paste?

I'm running Emacs under PuTTY and this works better then I expected. But since I sometimes use the mouse to focus the PuTTY window, I turned xterm-mouse-mode on. This way the focus in the text changes ...