Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
12 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
37 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
43 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 ...
0
votes
0answers
19 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
9 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
32 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
75 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
23 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
98 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
31 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
666 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
97 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
116 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
52 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
92 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
30 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> ...
4
votes
2answers
321 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
17 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
454 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
78 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
76 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. ...
0
votes
1answer
115 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
511 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.,...
4
votes
1answer
297 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
132 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
106 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
106 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 ...
4
votes
2answers
232 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 ...
5
votes
2answers
154 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
51 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
686 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
224 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 ...
4
votes
2answers
121 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 ...
4
votes
1answer
51 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
1answer
250 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
369 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 ...
3
votes
1answer
98 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
66 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
579 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
179 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. ...
8
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
243 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
990 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 ...
4
votes
3answers
226 views

Turn off mouse highlighting in org-agenda

When I am viewing my org-agenda, whatever line I have the mouse point on is highlighted. Since I never act on these lines with the mouse, and since the line where point is is also highlighted, the ...
3
votes
2answers
1k views

Mouse pointer between characters and the text cursor misplacement

Mouse cursor position interpretation in emacs drives me nuts. Why draw the mouse cursor in emacs window with vertical thin bar if you cannot effectively position it between characters? Selecting ...
0
votes
1answer
138 views

Yank from mouse in helm modes

For many built-in commands that require user input in the minibuffer I can yank from the middle mouse button (mouse-yank-primary with <down-mouse-2>). Some examples where this works are rgrep, ...
3
votes
1answer
133 views

Expand/shrink region after double-clicking mouse-1

How can I change the default double-mouse-1 word selection behavior so that I can move the point around right afterwards to extend/shrink the region? By default, if I forward/backward-char after ...
3
votes
1answer
152 views

Right-click to select one character under the mouse pointer?

I'm using GUI emacs 24.4.9.0, so I can click to move the cursor, and double-click to select a word under the mouse pointer as a region. How can I configure emacs so that right-click selects a ...