Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
1 vote
1 answer
50 views

Is there a single keyboard shortcut for going to the end of the above line?

I want to go to the end of the above line. I can do this with two keyboard shortcuts, namely <up> followed by C-e. Can it be done in one in an out-of-the-box copy of Emacs? I could surely write ...
J. Mini's user avatar
  • 167
1 vote
1 answer
118 views

Jump/Goto next highlighted symbol in lsp-mode

Lsp-mode has a function lsp-document-highlight bound by default to s-l a h which picks the symbol at point and highlights all (semantic) occurrences. Is there a goto-next-highlight. I checked the ...
Harald's user avatar
  • 352
1 vote
1 answer
141 views

How can I move to the next logical line with the arrow keys?

When I KEY_DOWN, it invokes next-line from simple.el This next-line moves to the same line, if that line spans multiple lines. I don't want this to happen. I want to move to the next logical line;) I ...
Jason Hunter's user avatar
0 votes
2 answers
87 views

how to move past a drawer when point is on an org mode headline?

In org mode, say I'm on a headline, and just below that is a PROPERTIES drawer: *** this is my headline, I want to move past the closed PROPERTIES drawer :PROPERTIES: :CREATED: [2024-01-31T10:54:33-...
Dan Drake's user avatar
  • 687
0 votes
1 answer
91 views

moving cursor forward-sexp goes one char further in evil mode

When I want to highlight the following region (a ( b ( c ) ) ) ) I get (a ( b ( c ) ) ) ) I mark the beginning and do forward-sexp (or sp-forward-sexp, which results in the same outcome) In, insert ...
eugene's user avatar
  • 529
0 votes
0 answers
53 views

How quick jump to specific lines in differents buffers?

Linux Mint 21 Emacs 27.1 Suppose I open 3 different text files. As result open 3 differents buffers. E.g. text_1.txt text_2.txt text_3.txt Is it possible to jump using keybinding to the next lines? ...
a_subscriber's user avatar
  • 4,224
1 vote
1 answer
50 views

M-g M-g <nnn> to end of line (C-e)?

I often have to use this sequence: M-g M-g <nnn> C-e to get to the end of a particular line, for example to place a % or \par in TeX files. Is there some way to combine this into, say (...
sgmoye's user avatar
  • 179
1 vote
1 answer
93 views

Is there a reason for having beginning-of-defun-function/end-of-defun-function global?

I was working on a mode, setq'ed them with my functions and... emacs broke (really) For some reason these variable are global. I made them buffer-local, but is there a good reason for having them ...
Lorenzo Marcantonio's user avatar
1 vote
1 answer
35 views

Trouble maintaining buffer position when using re-builder

I am having trouble maintaining my current location in a document while running the re-builder command in Emacs. In a long document the buffer moves to the top of the document whenever I run the re-...
Edman's user avatar
  • 1,229
0 votes
1 answer
100 views

define a new evil command

I'm trying to reverse some words, and I have it set up where I can visually select them and hit ,rw to reverse them. How do I set it up so ,rw also works with a motion. E.g. ,rw3w to reverse 3 words? ...
Zaz's user avatar
  • 143
1 vote
1 answer
39 views

What is the default value of TRY-VSCROLL in `(previous-line &optional ARG TRY-VSCROLL)`?

The documentation shown with Ctrl h k up states: <up> runs the command previous-line (found in global-map), which is an interactive byte-compiled Lisp function in ‘simple.el’. It is bound to C-...
oOosys's user avatar
  • 505
0 votes
2 answers
82 views

goto-char support for hexadecimal input

I recently realized something weird regarding usability of goto-char using GNU Emacs: M-x goto-char Go to char: 0x1000 Please enter a number (OP note: didn't work) M-x goto-char Go to char: (* 4 ...
Robert's user avatar
  • 103
0 votes
1 answer
383 views

How to move the text cursor to a given position?

How can I move the text cursor to any of these locations, using Lisp? (let ((beg (progn (skip-syntax-backward "^ " (line-beginning-position)) (point))) (end (...
Jason Hunter's user avatar
0 votes
2 answers
94 views

Jump to the end of body of headline

What is the key combination to jump directly to the end of BODY of a headline in org-mode? * Headline title A from here ▮ text text text text text text text text text text text text text text text to ...
Paolo's user avatar
  • 31
1 vote
2 answers
103 views

Window Point Reset After Update

I have a buffer which is updated periodically using run-at-time, and in order to maintain the point in each window I use set-window-point, but I find that in sometimes when something is interrupted ...
C4ffeine Add1ct's user avatar
0 votes
1 answer
152 views

Move cursor to an offset given by number of characters from the end of the buffer

This answer shows how to position the cursor at an offset of a specified number of characters from the beginning of the buffer, namely by executing M-x goto-char 47 (for an offset of 47 characters ...
Evan Aad's user avatar
  • 1,571
0 votes
1 answer
256 views

How to leave cursor at beginning of searched text in isearch?

Say I have this text: |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Where the | is the cursor, at the beginning of the line. I want to jump to the next occurrence of the sequence "...
Alessandro Bertulli's user avatar
1 vote
1 answer
77 views

How to ignore errors in the middle of a key/command sequence?

I wanted to jump to the end of the current top-level S-expression as described in this question: How to move up to the ending parenthesis of the enclosing list (if it exists)?. The goal is to position ...
tinlyx's user avatar
  • 1,384
3 votes
2 answers
321 views

How to move up to the ending parenthesis of the enclosing list (if it exists)?

In paredit mode, C-M-u (paredit-backward-up) is used to move the point backward up out of the enclosing list The point is parked at the beginning parenthesis of the enclosing list. My question is: ...
tinlyx's user avatar
  • 1,384
1 vote
1 answer
91 views

Keybinding for forward-page and backward-page

Have been trying to make a keybinding for forward-page and backward-page with (global-set-key (kbd "H-]") (forward-page)) (global-set-key (kbd "H-[") (backward-page)) But these ...
Dilna's user avatar
  • 1
1 vote
1 answer
80 views

How to hide "Local Variables:" specification at the end of a file or how to prevent "M->" from get into that region

In emacs, file local variables are put at the end of the file. On appending text to a file, the user has to navigate to the exact line before the Local Variables: line - you can't not just M-> and ...
godblessfq's user avatar
  • 1,269
1 vote
1 answer
94 views

Why is forward-sentence moving the cursor to the end of the paragraph and not working as expected and going to the end of the sentence? [duplicate]

I will provide a recipe for the problem that is happening. 1 - Open Emacs 2 - switch-buffer to the Scratch buffer 3 - Copy the following snippet Lorem Ipsum is simply dummy text of the printing and ...
Pedro Delfino's user avatar
0 votes
1 answer
387 views

Being inside a paragraph, how to move to the end of a sentence in Emacs? [duplicate]

I know how to move to the end of a line, the paragraph, the s-expression, the word, or even the buffer. But, I do not know how to move to the end of a sentence. Is there some way to move the end of a ...
Pedro Delfino's user avatar
0 votes
1 answer
112 views

Evil cursor moves one position right after exiting append mode, how to let it stay?

Similarly to the question Cursor moves one position left after exiting insert mode? I would like to know the similar thing, but now for the append command. I want the cursor to stay when exiting both ...
Rareform's user avatar
  • 231
0 votes
1 answer
108 views

Mark up to and including the character under the cursor

By default, when I activate mark it just adds everything to the region up to the point which is behind the cursor (image below) What I want to achieve, however, is to also include - as part of my ...
Shahin's user avatar
  • 131
1 vote
1 answer
41 views

Lisp function to parse paragraph into sentences separated by full stops

Is there in Emacs an inbuilt function to separate text into sentences? Eg., Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard ...
Emmanuel Goldstein's user avatar
0 votes
0 answers
62 views

What alternative exist to write specialized forward-sexp-function?

I'd like to write code that allows forward-sexp and backward-sexp commands to navigate across balanced keyword-based expressions, such as make files that use the if / fi keywords. It's possible to ...
PRouleau's user avatar
  • 841
2 votes
1 answer
262 views

How to go back within the ellipsis of a collapsed Org section?

I am using Emacs with evil-mode enabled. I would love to be able to move back using h when the cursor is exactly at the last character of a folded org file (as shown in the picture). However, when I ...
Xaphanius's user avatar
  • 121
0 votes
1 answer
202 views

Evil mode motion: between blocks of text

Block motion I would like to quickly swape through files and j k and / aren't cutting it anymore. Is there a command to move between blocks of text? For example: What I mean by block movement, ...
BuddhiLW's user avatar
  • 307
3 votes
1 answer
382 views

How to move from one source block to another, in Org-mode?

Is there a key-binding, command, or even evil extension for Emacs, so that I can move from one source block to another? For example,org-forward-heading-same-level, which is bound in my system to C-j, ...
BuddhiLW's user avatar
  • 307
1 vote
1 answer
32 views

Need search function to navigate to last line in continuous occurrence range

I am looking for a way to improve searching by repeating pattern. Let's say some program prints lots of log messages with the same pattern: copying path '/nix/store/lqfjx7x6imy5a9xab1ff5nhg90v089rq-...
Daniil Iaitskov's user avatar
0 votes
1 answer
355 views

How to make backward-kill-word and kill-word stop after it kills a newline character?

kill-word and backward-kill-word deletes too much text: foo(bar) <point> Now if I press C-<backspace>: foo(<point> What I want is: foo(bar)<point> after pressing C-<...
user avatar
1 vote
1 answer
167 views

How to move to the next highlight?

How can I jump to the next beginning of a string highlighted by a command such as highlight-regexp or highlight-lines-matching-regexp?
Arch Stanton's user avatar
  • 1,777
0 votes
2 answers
122 views

How do I move the cursor to be just after the `>` character on the beggining of REPL evaluation?

I am using Emacs and Slime to work on Common Lisp code and I would like to know the most efficient way to move the cursor to the beginning of the REPL> assessment. For instance, modelling the ...
Pedro Delfino's user avatar
2 votes
1 answer
130 views

How to insert overlay every n visual/screen lines?

I want to insert an overlay at the beginning of every 40th or so visual/screen, to generate a WYSIWYG looking page-break overlay like so: At the moment this is done by font-locking the line-feed ...
tefkah's user avatar
  • 111
1 vote
1 answer
90 views

Key to move to next ancestor heading in org mode

I would like to jump to the next parent heading from a lower level directly. Is there a shortcut for that in org mode? * a ** b ** c * d So to jump, say, from b to d.
David's user avatar
  • 319
0 votes
3 answers
599 views

How to memorise the cursor position and return to it?

Say I was working in a big file somewhere in the middle and all of the sudden I realise that I need to edit the top of the file. I do a M-< to go to the top and make my edits. Now I want to move ...
scribe's user avatar
  • 1,090
4 votes
2 answers
503 views

How to scroll to the beginning of the line in Emacs

I have buffer and I end up at 1616 column (I have one very long line, bug string). Is there a way to scroll the beginning of the line with a single commands. Is there a way to reset the buffer without ...
jcubic's user avatar
  • 793
1 vote
1 answer
421 views

How to use mouse click to the right or to the left of the text to move cursor to this line?

On a mouseclick to one side of the text, it can be convenient to make the cursor jump to: the beginning of the line (when clicking left of the text) the end of the line (when clicking right of the ...
telephon's user avatar
2 votes
0 answers
21 views

Fields: how to avoid field-end-position to overlap with next field?

I have a text in the beginning of buffer 901 fifth avenue The word 901 is defined as field "house" and fifth (including space) as field "street". So the text with fields is ...
Ott Toomet's user avatar
0 votes
1 answer
419 views

How can I jump back after `rope-goto-definition`?

I am using rope-goto-definition to jump into a module's definition, link. But I cannot jump back to where I was. xref-pop-marker-stack says Marker stack is empty. Is it possible to jump back after ...
alper's user avatar
  • 1,460
4 votes
1 answer
464 views

How to change Emacs' word movement behaviour?

I want to do this on forward-word: (| shows the cursor position) Normal Behaviour: int main(int argc, char *args[]) { int a = 45|; printf|("%i", a); } What I want to do: //forward-...
shigi's user avatar
  • 41
0 votes
3 answers
113 views

Search for text, print a message about it, and then return cursor to original position

I want to write an Elisp command that searches for a specific string in the backward direction, pauses the cursor there for a second, echoes a message about that occurrence, and then returns the ...
linuxfan's user avatar
  • 209
-1 votes
1 answer
53 views

Emacs ignore \n in buffer

I would like to change the default behavior in emacs when '\n' meta-characters are encountered by the cursor. The default behavior is such that at '\n', (1) right-key sends the cursor to the beginning ...
user avatar
0 votes
0 answers
524 views

Copy/Paste&Cut with Spacemacs on Terminal

I'm new with emacs, and I'm a developer that uses IDE to develop, and I want to learn emacs. I choose Spacemacs as customization because I think has a good keybinding for me, but now I miss a feature ...
vincenzopalazzo's user avatar
0 votes
0 answers
557 views

Problem with org-agenda view when going forward 1 week

I have my org-agenda to start on a Sunday. Hence I have this code in my .emacs file: (setq org-agenda-start-on-weekday 0) org-agenda opens with the cursor on the current day of the week. If I press &...
Edman's user avatar
  • 1,229
2 votes
2 answers
62 views

Is it possible to ignore paste operation during `C-x C-x` to jump back?

This question is related to Is it possible to bind C-u C-x C-xs behavior into C-x C-x. My main goal is to jump top of the file, type import and paste a package name and jump back where I was. ...
alper's user avatar
  • 1,460
2 votes
0 answers
44 views

Is (forward-char N)'s runtime complexity O(N)?

Internally, the text of a buffer is stored as a char array. The encoding used is based on UTF-8, which may use a variable number of bytes to represent different code points. Does the variable-length ...
alexgiorev's user avatar
3 votes
1 answer
199 views

What is the difference between `M-f` and `C-right`?

The documentation states the following: (forward-word &optional ARG) is bound to M-f (right-word &optional N) is bound to C-right Could there be any difference between the two? It just doesn't ...
Chanhee Jeong's user avatar
0 votes
2 answers
247 views

How to move the cursor to the end of the read only text?

Say I have text: This read only text ends here>*********************| The This read only text ends here> is read only while the asterisks are are not. When the (move-to-read-only-end) is called, ...
scribe's user avatar
  • 1,090