Questions tagged [navigation]

Use the navigation tag for questions about moving around: to different places within a file/buffer (i.e., beginning, end, across paragraphs and code blocks); from one window to another (i.e., changing which window you are working in, and which files/buffers are displayed in each window). Use tag [motion] instead, for moving point around.

Filter by
Sorted by
Tagged with
1 vote
2 answers
52 views

Looking for a "point ring"

Is there something like a point ring in Emacs? I would like to store the current point in there using a command similar to point-to-register. But when I store another point, I want the previous one ...
Witek's user avatar
  • 333
0 votes
1 answer
23 views

How to move out of a python string with C-M-u

I'm used to using backward-up-list to go to the front of a string in most every programming mode, but for some reason it doesn't work in python-mode. python-mode rebinds C-M-u to its own python-nav-...
Cristian's user avatar
  • 233
1 vote
0 answers
72 views

How to switch buffers (prev & next) with minimal buffer list order modification?

How to switch buffers (prev & next) with minimal buffer list order modification? To be succinct and without getting into the weeds of particular details, the best way to explain what I am trying ...
David's user avatar
  • 127
1 vote
1 answer
126 views

How do I jump to the last sexp at the current nesting level?

Suppose I have this structure: ((1 2 3) (4 5 6) (7 8)) I can move backward and forward sexp-by-sexp (one-by-one) with backward-sexp and forward-sexp. However, I often have dozens of sexps to ...
Heitor Chang's user avatar
1 vote
1 answer
28 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
3 votes
1 answer
120 views

How can I make `forward-sexp` handle other balanced character-pairs such as < and > or << and >>?

I am trying to find an easy and efficient way to modify the behaviour of forward-sexp to handle balanced pairs of characters not normally supported by it, such as balanced < and > and balanced &...
PRouleau's user avatar
  • 724
2 votes
0 answers
59 views

How do I jump to the previous/next modification (relative to the git HEAD) in the current file?

How do I jump to the previous/next modification (relative to the git HEAD) in the current file? Ideally, I like sth like swiper that lets me choose to easily jump between modifications.
HappyFace's user avatar
  • 738
1 vote
1 answer
61 views

Can I use jump?

I found this package for the bash shell that lets you quickly jump between commonly used folders: https://github.com/gsamokovarov/jump I use it all the time now. Jump uses fuzzy matching to find the ...
Hunter's user avatar
  • 113
3 votes
1 answer
89 views

Is there a command (and ideally a key binding) to navigate to the top (or bottom) of an org table?

I have read Built-in Table Editor, and searched apropos-function org table for top, bottom, beginning, and end. I found org-table-beginning-of-field, but not anything like org-table-beginning-of-table....
Greg C's user avatar
  • 97
0 votes
1 answer
179 views

Org-mode navigate in list

How to navigate in same level list, with sub list in between? - one (cursor at the beginning) - two - three - four (move to this list) Tried C-up and M-a, but they go through each sub level, ...
msinfo's user avatar
  • 177
0 votes
1 answer
212 views

How can I move the cursor from a shell window to another window in Evil mode?

Imagine I have following four windows in Emacs: Window 1 is a shell window (M-x shell). Windows 2, 3, and 4 are normal windows with files open. Evil mode is enabled. If I am the shell window, how can ...
Glory to Russia's user avatar
1 vote
0 answers
56 views

widening/narrowing with org-goto

org-goto (as well as orgnav, helm-org-rifle) strictly respects narrowing. is there a way to have it disregard it, making it possible to jump to places in the file outside current narrowing? or is ...
user27075's user avatar
  • 458
1 vote
0 answers
37 views

How to make imenu jump/preview new location when switching up/down like swiper or like fzf in vim?

How can I make imenu (with ivy wrapper) act like swiper, that mean auto switch to location when I use arrow key( or ivy-previous/next-line function) and if I exit it will come back to current location?...
Kidman's user avatar
  • 31
0 votes
2 answers
83 views

Is there a library or something for org-mode that let's me make traversal more VIM like, without fully using Evil?

I'd like to navigate in my org-mode files sometimes using just the home row, but other times I'm perfectly ok with the full emacs default key-bindings for org-mode. For instance, when everything is ...
lucidquiet's user avatar
2 votes
0 answers
67 views

How to move by defun without moving up a level?

I am attempting to navigate methods in a file. Typically these are javascript or python files, which have a classes at the "top level", which in turn have methods nested within those ...
cammil's user avatar
  • 509
0 votes
1 answer
168 views

Can I navigate Bookmark+ bookmarks like I can with e.g. helm-bookmark?

I am experimenting with Bookmark+ and would like to be able to navigate to a bookmark using a similar workflow to that which I currently use to navigate bookmarks. For example, previously in order to ...
user2567544's user avatar
4 votes
1 answer
401 views

Is there a way to get proper "breadcrumbs" behavior in emacs?

I want something that I figured would be pretty basic, what with all the fancy mark-ring and all, but I can't find a way to get. I want a global (i.e. across files) no-nonsense "breadcrumbs" behavior ...
Jonathan Sahar's user avatar
0 votes
0 answers
105 views

What does the "Mark set" message mean when going to the beginning or end of the buffer?

Opening emacs -Q, then Pressing Ctrl-Home or Ctrl-End also shows this message. Mark set What is happening? Why is the mark set and is there a way not to set the mark?
ideasman42's user avatar
  • 8,187
0 votes
1 answer
63 views

How do I exit an archive in no-window mode?

When navigating the directory structure in no window mode, there is always .. at the top of the current directory, so that one can leave it and go to the directory up ahead. I am using emacs 26.3 ...
HerpDerpington's user avatar
1 vote
1 answer
254 views

Automatic "push-mark" when navigating with xref, find-grep, etc?

There seem to be a lot of situations, where a command changes the cursor location (point), but no mark is pushed, making navigating back by popping the mark with C-u SPC impossible. For isolated use-...
kdb's user avatar
  • 1,541
3 votes
3 answers
553 views

How to navigate to the next/previous python class?

I would like to navigate quickly between classes in Python code. I'm looking for a command to go to the next / previous class so I can bind that to a key sequence. This question is not about ...
Croad Langshan's user avatar
1 vote
1 answer
91 views

forward-word and non-letter "words"

Using forward-word with this line: foo *** *** bar, I want to have the folowing behavior: foo| ***| ***| bar|, Not: foo| *** *** bar|, So, if between spaces there are only non-letter symbols, ...
A.King's user avatar
  • 53
4 votes
3 answers
746 views

How to move the cursor to the next instance of the text the cursor is currently on?

Suppose your code looks like this: 1. term_cursor_is_on = 500 2. cursory_next_line = 42 [...] 101. next_instance_line = term_cursor_is_on And suppose that your cursor is on line 1 (unimportant, but ...
James Shapiro's user avatar
4 votes
2 answers
267 views

Selecting punctuation, namely, periods, commas, question marks, exclamations, etc. in Emacs

I use Emacs mostly for writing text not code. This involves a great deal of selecting, deleting and editing, as one would expect. By default if I move forward by a word in Emacs, Emacs ignores basic ...
Edman's user avatar
  • 1,143
6 votes
3 answers
385 views

Is there a way to make the "o" keypress of other-window <C-x><C-o> repeatable?

Question is as stated in the title. Instead of using various packages for switching windows, it might be simpler to make <C-x><C-o> behave like <C-x><C-+>, such that repeated ...
yongjieyongjie's user avatar
2 votes
3 answers
228 views

How to open a diff at the position of the current buffer?

Emacs has a useful feature to jump to the line (via diff-goto-source-and-close). Is there a way to do the reverse with vc-root-diff or something similar? That is to open a diff, jumping to the ...
ideasman42's user avatar
  • 8,187
0 votes
1 answer
340 views

How to skip to the last non-blank line?

Is there a way of calling (end-of-buffer) that excludes trailing empty lines?
ideasman42's user avatar
  • 8,187
0 votes
1 answer
424 views

Add browser bookmark to bookmark browser

What I mean is, can I add a URL to my Emacs bookmarks, such that selecting the bookmark runs the URL through browse-url? Desired behavior What I would like is a bookmark-set-url function that ...
Matthew Piziak's user avatar
2 votes
2 answers
287 views

Move cursor to opened file in sr-speedbar

i wonder how i can configure the sr-speedbar mode to automatically move the cursor to a file, which i open by pressing enter in the sr-speedbar. Thanks for your input.
Anton's user avatar
  • 23
1 vote
0 answers
46 views

Idempotent `beginning-of-defun`

How to obtain/implement a beginning-of-defun drop-in replacement that is idempotent? i.e., if I already am at the beginning of a defun, beginning-of-defun should do nothing, rather than jumping to ...
deprecated's user avatar
3 votes
2 answers
1k views

Bookmarking / Highlighting lines in a file

Is there an Emacs feature for highlighting some lines in a file to make it easier to jump around? My immediate use-case is a gigantic auto-generated C++ file with horrible indentation, which is rather ...
Rupert Swarbrick's user avatar
1 vote
1 answer
149 views

forward/backward/next/previous element against YAML?

The lisp program is structured language, and one can execute C-M-f(forward-sexp) to pick the next sibling element. Similarly, C-M-b, C-M-u, C-M-d are defined; they can be used to move the cursor to ...
Yuki Inoue's user avatar
4 votes
1 answer
235 views

Can I focus the echo area when there’s no prompt?

Suppose I type M-! uname -a RET. A message like this is displayed in the echo area: Linux pergamon 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux I want ...
Vasiliy Faronov's user avatar
2 votes
0 answers
634 views

Navigate C/C++ Source Code with Emacs [closed]

So, i'm finally starting to work with a multi-file Project in C++ and am in need for smart navigation and completion! So far, i've used company-mode (with irony and company-headers), which is great if ...
Tim Hilt's user avatar
  • 297
2 votes
3 answers
95 views

is there a keybinding to save curor position for returning after viewing other section of same buffer?

when i am editing a large file, often need to view other sections of the same buffer only once. But after that I need to go back to the position I was editing at. Is there a key for doing that?
Alvaro Martinez's user avatar
1 vote
1 answer
352 views

How to find where a given function is called from in gtags

I am using gtags and can jump to where a function is defined. Howeve I am not able to find inside a function where it is begin called from. Is there anyway to find where a function is called from?
Roarer's user avatar
  • 11
1 vote
2 answers
233 views

How do I return to where I was before i-search, goto line, etc

Let's say I'm on line Y, char X, and then do an i-search or do a goto line. Then I move around there a bit, but then I want to return to Y, X. How do I do this? Is there an automatic mechanism that ...
forthrin's user avatar
  • 451
1 vote
0 answers
271 views

How can I run (recenter) after (call-interactive ...) that jumps to a buffer?

I would like to jump to a buffer using rtags for eg. Example snippet: (defun generic-lookup () "Follow link/goto line." (interactive) (cond ((string= major-mode "c-mode") (progn ...
ideasman42's user avatar
  • 8,187
0 votes
1 answer
635 views

Enter does nothing in NeoTree

I have NeoTree installed. When I navigate through folders and files in it and when I press enter, nothing happens. I don't get into a directory. I've tried TAB also -- nothing. M-x describe-key ...
Jorik's user avatar
  • 1
1 vote
1 answer
87 views

next-line-add-newlines breaks history browsing by cursor arrow keys

I've always hated "end of buffer" errors, so my .emacs contains (setq next-line-add-newlines t) Recently, I've noticed that when browsing a history by cursor arrows (up/down for previous/next), e.g. ...
choroba's user avatar
  • 1,935
0 votes
1 answer
54 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> ...
Netsu's user avatar
  • 545
5 votes
3 answers
2k views

Jump to location in org-mode while properly unfolding headings

I'd like to find a way to jump to a location in an org-mode file while automatically unfolding only the heading at the location I'm jumping to and all its parent headings (but not any sibling headings)...
izkon's user avatar
  • 1,768
7 votes
4 answers
2k views

Quickly jump to favorite folders

What I actually want I have deep folder structures, and often use a dozen folders pretty far down the directory tree. In Nautilus, I use bookmarks to get to them quickly. I want the same thing in ...
UTF-8's user avatar
  • 875
3 votes
3 answers
533 views

Open Dired for an arbitrary set of files

There is a project with 100 files in a flat directory. I want to navigate a subset of the files, depending on what part of the project I am working on. Creating files with links to files of interest ...
wolfv's user avatar
  • 1,383
0 votes
1 answer
47 views

Strange <left> behaviour

Usually <left> is bound to 'left-char I have never edited this in my init file or <right> for that matter. However recently when I'm at the beggining of a line and I type <left> it ...
SerialDev's user avatar
  • 121
2 votes
2 answers
174 views

Navigate to a certain paragraph number

How can I navigate to a certain paragraph number? If I want to move to the 33rd line in a file, I execute M-x goto-line <RET> 33, but there does not seem to be an equivalent goto-paragraph ...
Ben's user avatar
  • 587
0 votes
2 answers
156 views

Want equivalent of vim W and E

Any easy way to get forward/backword word movement with "word" defined as everything non-whitespace, similar to vim's W and E?
Mike Makuch's user avatar
3 votes
2 answers
353 views

How can I navigate up/down a log from magit-rev-mode?

When I'm reviewing a patch series in magit I want to be able to look in detail at each patch in a tree. However there doesn't seem to be an easy way to navigate to the next/previous commit from inside ...
stsquad's user avatar
  • 4,616
1 vote
1 answer
321 views

How to navigate to previous cursor positions without using the mark?

I'm often making typing mistakes which will kick me out of the current function block (hitting M-n when I meant C-n). In such cases it would be nice to be able to return immediately to the previous ...
MathManM's user avatar
  • 171
0 votes
0 answers
76 views

Using advices to flatten a single subfolder

One of Github's features i like is that it "flattens" path if a folder contains only one subfolder, i.e you have a src folder which has only main folder, so by clicking on src you go to the content of ...
4lex1v's user avatar
  • 603