9 votes
Accepted

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

I think what you're looking for is isearch-forward-symbol-at-point which is bound to M-s . Here's its documentation: (isearch-forward-symbol-at-point) Do incremental search forward for a symbol found ...
shoshin's user avatar
  • 914
7 votes
Accepted

Quickly jump to favorite folders

It's unclear to me why you want/need to add such symlinks. Why not just use Emacs bookmarks? If you use Bookmark+ then you can have: Bookmarks to Dired buffers (which record lots of stuff, including ...
Drew's user avatar
  • 77.3k
7 votes

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

That isn't supported yet but you can do it "the other way around". Instead of pressing RET to show and select the revision buffer, press SPC to show the revision buffer but stay in the log buffer. ...
tarsius's user avatar
  • 25.7k
7 votes
Accepted

Navigate to the source code of built-in functions and variables

The reason you sometimes see “interactive compiled Lisp function” (or likewise for variables) with no file name is that the function was loaded from a byte-compiled file and the corresponding Elisp ...
Gilles 'SO- stop being evil''s user avatar
6 votes
Accepted

After executing org-narrow-to-subtree, how do I move between subtrees of the same level?

If what you want to move the narrowing along with point to the next subtree, you can define a command that does that: (defun my/org-narrow-forward () "Move to the next subtree at same level, and ...
JeanPierre's user avatar
  • 7,423
6 votes
Accepted

Bookmarking / Highlighting lines in a file

There are several ways to do this. One of my preferred methods is the bm package. The package provides visual bookmarks: The setup is dead simple: (require 'bm) (global-set-key (kbd "<C-f2>")...
Lorem Ipsum's user avatar
  • 4,477
5 votes
Accepted

Navigate to a certain paragraph number

I'm not aware of a built-in function for this, but as you already noted you can write one: (defun goto-paragraph (arg) "Go to paragraph ARG." (interactive "nGoto paragraph: ") (goto-char (point-...
glucas's user avatar
  • 20.6k
5 votes

How to switch back and forth between two locations in a buffer

For the past 20 years or so, I've been using these two gems: (defun ska-point-to-register () "Store cursorposition _fast_ in a register. Use ska-jump-to-register to jump back to the stored position....
Stefan Kamphausen's user avatar
4 votes

How to switch between windows quickly?

Some good answers here, I also am a fan of WinMove, but I bind it to C- because org-mode uses M- for manipulating headings (define-key global-map (kbd "C-<up>") 'windmove-up) (define-key global-...
Philip Daniels's user avatar
4 votes
Accepted

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

@Aaron answered well with the usual way to take care of this in Emacs: set a mark where you are now, then get back to it later using C-u C-SPC. Another way is to use a bookmark, in particular a ...
Drew's user avatar
  • 77.3k
4 votes
Accepted

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

The echo area is not really a buffer. It is an area of a window. It is used to display messages and to display the minibuffer (which is a buffer). You cannot "visit" the echo area and select text ...
Drew's user avatar
  • 77.3k
4 votes
Accepted

Add browser bookmark to bookmark browser

The following seems working from here (I don't use the Bookmarks feature, and I ain't familir with its protocol.), I tested it with: M-x your-bookmark-set-url https://example.com M-x bookmark-jump ...
xuchunyang's user avatar
  • 14.5k
4 votes

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

You could write a function similar to text-scale-adjust. E.g. (defun mw-other-window-repeat (count &optional all-frames) "Wrapper around `other-window' to continue to jump to other with key o."...
Marco Wahl's user avatar
  • 2,876
4 votes

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

I use this in several of my libraries. Use it to make pretty much any command repeatable even when it's on a prefix key. (defun repeat-command (command) "Repeat COMMAND." (require 'repeat) (let ...
Drew's user avatar
  • 77.3k
4 votes
Accepted

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

Two rules to take into account when solving your problem: Do not persistently mess up the syntax table if you do not see through all the consequences. It is used for many tasks. Do not advice forward-...
Tobias's user avatar
  • 33.1k
4 votes

How to navigate to the next/previous python class?

What I found so far and use to navigate between classes in python-mode: First C-M-u which runs the command python-nav-backward-up-list to navigate up to class definition. After that C-M-a (beginning-...
muffinmad's user avatar
  • 2,300
4 votes

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

Not that I know of, but Org mode provides the ingredients to roll your own easily: (defun org-table-goto-beginning () (interactive) (goto-char (org-table-begin))) (defun org-table-goto-end () (...
NickD's user avatar
  • 29.6k
3 votes

Navigate to the source code of built-in functions and variables

If you're looking for ways to quickly jump to source code, there are also find-function-at-point and find-variable-at-point which will jump to the definition of the symbol under the cursor - you could ...
Brian Burns's user avatar
  • 1,637
3 votes

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

Whenever I make a large jump in a file, I press C-SPC C-SPC first. That sets the mark to the current value of point*, effectively remembering the current cursor position. Then, once I'm done ...
Aaron Harris's user avatar
  • 2,674
3 votes
Accepted

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

Edit: this is now a package: diff-at-point This solution parses the diff hunks to lookup a buffer location in the diff. By default, if the current location isn't part of the diff, the closest line ...
ideasman42's user avatar
  • 8,756
3 votes

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

hydra (https://github.com/abo-abo/hydra) are another way to get repeatable commands. This doesn't move the point on the first call, but you can press o as many times as you want to move around. (...
John Kitchin's user avatar
  • 11.9k
3 votes

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

Alternatively, you can use C-s C-w to search for some text the cursor is on.
robdul's user avatar
  • 31
2 votes

How to navigate quickly to my installed packages?

In recent versions of Emacs, you can access the package view with M-x list-packages. You can then filter the packages: by upgradable with / u; by any other status (available, dependency, disabled, ...
kotchwane's user avatar
  • 513
2 votes

Is there a setting to automatically center the text after any jump?

This recenters the point when the window moves by more than 5 lines, except in Isearch mode or when a scroll command is used (for scroll commands I think it's best to use scroll-preserve-screen-...
Arch Stanton's user avatar
  • 1,647
2 votes
Accepted

Previous/next occur result, independently from compilation errors

Looking at the source of occur-mode, I found this: (setq next-error-function 'occur-next-error)) This suggests occur-next-error is the function next-error calls in a "occured" buffer. And indeed, ...
JeanPierre's user avatar
  • 7,423
2 votes

Next/previous buffer in arbitrary order

The built-in bs library has support for defining one or more configurations that you can use to cycle between buffers. The commands bs-cycle-next and bs-cycle-previous move back and forth between the ...
glucas's user avatar
  • 20.6k
2 votes
Accepted

browsing/navigating reStructuredText

rst-toc can be used to navigate sections.
Ista's user avatar
  • 1,188
2 votes

Go to window by buffername

For a slightly different approach, you can install the https://github.com/abo-abo/ace-window package (available from melpa) and bind ace-window to some key sequence. When you invoke it, it gives each ...
icarus's user avatar
  • 1,914
2 votes

Go to window by buffername

You can use interactive to select a buffer, get-buffer-window to find the window showing that buffer, and select-window to switch to that window: (defun open-window-by-buffer (buffer) (interactive &...
MaximusJohnsonus's user avatar
2 votes
Accepted

Open Dired for an arbitrary set of files

Not exactly sure what you're asking, but perhaps this will help. Offhand, a guess is that bookmarking Dired buffers is close to what you are looking for. Dired itself lets you have a Dired buffer ...
Drew's user avatar
  • 77.3k

Only top scored, non community-wiki answers of a minimum length are eligible