Questions tagged [registers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
36 views

Is it possible to save register values and restore them in another session?

I use registers (such as C-x r s 0) as a multi-valued clipboard that can save different contents (copy-to-register). Then I can "paste" the value using C-x r i 0. This is really convenient, ...
tinlyx's user avatar
  • 1,324
1 vote
1 answer
85 views

How to save a register with a dired buffer?

I'm new to Emacs. I saw that you could have registers with special files. I really like that feature, and I was wondering if I could get the same functionality with a Dired buffer. For example, the ...
Peter Petigru's user avatar
1 vote
0 answers
92 views

What is the relationship between Evil registers and ordinary Emacs registers/kill-ring?

I use evil and have gotten used to accessing the registers via :registers (in normal-mode). This works fine for me except when I attempt to yank a URL or filename into a minibuffer prompt. In trying ...
nonreligious's user avatar
1 vote
0 answers
33 views

How to set the content of a Emacs register to some text programmatically? [duplicate]

I was wondering how I can store certain text in a given register using elisp (so that I can set in a configuration files). I know that I can do this manually with C-x r s r to store some text into the ...
tinlyx's user avatar
  • 1,324
1 vote
1 answer
293 views

How can I use registers with Elisp?

It appears that all the documentation about registers revolves around C-x r [action] [char] or M-x [command] RET [char]. But let's say I want to create my own command using the register, how do I go ...
Alan's user avatar
  • 37
1 vote
1 answer
39 views

Mark activate -> delete text. Can't store region to Registers

Linux Mint 20 Emacs 27.2. I want to store text to the Emacs Registers. So here steps: Some text to mark. Mark activate by C-SPC Fn-> arrow right to select whole line Now I want to save region ...
a_subscriber's user avatar
  • 3,926
1 vote
1 answer
82 views

Preview stored register locations in a dedicated buffer

Is it possible save a bunch of point locations into registers and then navigate through them with a preview buffer? I have tried getting along with helm-all-mark-rings and evil-jumper, but neither ...
skyfire's user avatar
  • 97
1 vote
2 answers
188 views

How to copy one register to another?

In vim :let @"=@* will copy the content of* register to the " register. How can it be done with evil?
tejasvi88's user avatar
  • 151
4 votes
1 answer
45 views

Using a number in register as prefix argument

How can I use a number in a register after C-u ? For example my register looks like 1: 24, and I want to do C-u 24 x.
Faruk Akın's user avatar
0 votes
1 answer
29 views

evil-mode exec register ignores pipe

In vim, assume :r!ls | grep foo is in the register l. You can then do: @l to exec ls | grep foo and insert the contents matching foo in to the current buffer. In evil-mode I get: Usage: grep [OPTION].....
Justin Thomas's user avatar
0 votes
0 answers
148 views

How can I remove clipboard from being the default register?

I'm using emacs with evil keybindings (specifically spacemacs). The default behavior of the paste command p is to paste in the clipboard, and default behavior of the delete command d is to put the ...
Peeyush Kushwaha's user avatar
1 vote
0 answers
133 views

How to use fringe indicators to display register positions?

I know that i can use customize register-marker-face to make position-registers location visible, - is there is a way to mark resisters position using left fringe? Also, I am using "Mitsuharu ...
Yatima's user avatar
  • 31
5 votes
1 answer
342 views

How to restore windows registers from saved desktop

I save a few different windows registers using M-x r w and then save the entire desktop with M-x desktop-save. I then restart Emacs and load the desktop using M-x desktop-read. If I do M-x r j do ...
Mikael Springer's user avatar
1 vote
0 answers
149 views

Save my Emacs registry entries without having to use desktop-save

I frequently create registry entries which I wish to keep across Sessions. Emacs does not save registry entries across sessions. This can be done by using desktop-save, but the downside is that ...
Edman's user avatar
  • 1,177
3 votes
1 answer
1k views

Is there a way to delete or clear a register?

For example, if I have too many registers and would like to get rid of some of them, is there a way to do that? I realize that quitting the emacs session will clear all registers, but is there a way ...
user650654's user avatar
2 votes
1 answer
63 views

Save the records in text register persistently

I utilize the text register to collect new words I encountered C-x r s w (w for word) append others to it with M-x append-to-register Record all the word collected to a works.org file at the end ...
Wizard's user avatar
  • 1,241
1 vote
1 answer
67 views

set-register register-separator "\n\n")

Upon reading GNU Emacs Manual #rectangle register When you are collecting text using append-to-register and prepend-to-register, you may want to separate individual collected pieces using a ...
Wizard's user avatar
  • 1,241
1 vote
1 answer
48 views

user-error: That register’s buffer no longer exists

I saved point to register, closed buffer / restarted Emacs and got: user-error: That register’s buffer no longer exists I want Emacs to open file if necessary and go to point.
gavenkoa's user avatar
  • 3,362
0 votes
2 answers
160 views

How can I search through registers via counsel?

I need something like helm-register which lists all the registers and it can be searched through.
fhdhsni's user avatar
  • 693
0 votes
2 answers
561 views

Preserving Layout Using emacsclient

If I spawn Emacs in --daemon mode, I can then use emacsclient to connect to the daemon from within a terminal window. If this then dies, I can reconnect my terminal and my Emacs session is still ...
Phil's user avatar
  • 533
1 vote
2 answers
736 views

What's the most efficient, idiomatic way to paste-and-replace in Emacs?

I often do something like this: Copy some stuff Go to where I need to paste it Paste it (C-y) Kill the rest of the line (C-k) Select what I just pasted, and copy it again Repeat steps 2-5 The whole "...
bright-star's user avatar
1 vote
1 answer
95 views

How to prompt user for register name?

I'd like to prompt the user for a register name. Is there an easy way to do this? Apparently, this functionality isn't built into interactive (https://www.gnu.org/software/emacs/manual/html_node/elisp/...
the-konapie's user avatar
3 votes
8 answers
1k views

Storing previous cursor positions

I would like the ability to go back and forth through a series of stored recent cursor positions, say up to 100 of them. Specifically, a position should be recorded when I click somewhere, or when I ...
std_answ's user avatar
  • 191
1 vote
1 answer
373 views

How to refer to Emacs registers by name?

Emacs registers are useful but I find remembering the contents of them difficult. Figuring out which register I stored that particular macro in is a pain. Is there a package that allows registers to ...
JCC's user avatar
  • 999
3 votes
2 answers
209 views

function to put current buffer in temporary register

I want to access any current file quickly. Therefore I want to build a function that put a file the register. I've started with this function: (defun tmp-register () """ put the current buffer in ...
DJJ's user avatar
  • 762
0 votes
0 answers
151 views

How can I apply a frame register (saved via desktop.el) to the current frame instead of opening a new frame?

I am using desktop.el and I saved a few frame configurations in my registers. But when I jump to a saved register (C-x r j), Emacs opens a new frame instead of applying that setting to the current ...
Vivi's user avatar
  • 361
6 votes
2 answers
4k views

Evil: Is there a default register that does not get overwritten by later yanks to explicit registers?

I often use registers in evil, but I have a common use case that I cannot seem to resolve. I would like to have all copied text stored somewhere that does not get overwritten when I explicitly make ...
modulitos's user avatar
  • 2,452
48 votes
12 answers
9k views

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

Sometimes I find myself frequently alternating between two functions that I am editing in conjunction with each other. In these situations, it is tedious and painful to keep on doing a C-s <...
Vedaad Shakib's user avatar