Questions tagged [kill-text]

The tag has no usage guidance.

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

In Python buffer erase large output

Python buffers support comint-delete-output, but if I forget to do it before entering another command, I have a big hunk of text I can't easily erase. In shell mode, I can set the mark and run comint-...
Eric Auld's user avatar
0 votes
0 answers
45 views

Trying to search backward first space or start of line

I try to build a function to find the previous space or the start of line and kill the region from my current point to the found point. (Edit) I will use it in LaTeX-mode. Example: Let’s say I have ...
mrmen's user avatar
  • 1
1 vote
1 answer
236 views

How to transpose a pair of words?

Suppose I have the following text: :lacerte-attach-statement-type "suffix" :data-automation-id "OSICtrlE15-140" And I would like to have: :data-automation-id "OSICtrlE15-140&...
Pedro Delfino's user avatar
0 votes
1 answer
74 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
10 votes
3 answers
3k views

How to select and delete a column of text in emacs?

I have this text 1 A 2 B 3 C I want to remove the first column to make it A B C Ok so I need to make a rectangle. Reading about rectangles I see "To specify a rectangle for a command to work on,...
BigBoy1337's user avatar
0 votes
1 answer
251 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
0 votes
2 answers
223 views

Default yank keyboard shortcut does not work

I am using Emacs 27.1 (GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian). When I hover the mouse pointer over the "copy&...
buhtz's user avatar
  • 719
2 votes
1 answer
54 views

How to limit mark/kill size of huge (org-mode) files?

I have org-mode files about 50K lines long, which I can edit and save file; but once in a while accidentally marked a large region by typing C-x C-x or C-x h, and copied too much data into clipboard, ...
gb2312's user avatar
  • 21
4 votes
3 answers
318 views

How can I move/kill multiple chunks of text to the same place/marker, one after another?

The task: I have a large-ish file, from which I need to pick certain chunks of text and move them into a certain place so they go one after another, in the order in which I pick them. More ...
aaa's user avatar
  • 436
0 votes
2 answers
84 views

Kills backwards at beginning of line

With the cursor set just before B, how would I bring Bar next to Foo? I tried C-0 C-k, no avail. Foo Bar Desired: FooBar
user avatar
6 votes
3 answers
3k views

Delete from point to beginning of the line

Have read the GNU manuals on erasing, killing, and deleting. In bash C-u deletes from the cursor to the beginning. I have searched and in much disbelief can't find out what the equivalent is in emacs?...
user avatar
1 vote
1 answer
87 views

Yanking does not use top entry in the kill ring

I want to delete regions without adding them to the kill ring following this thread: (defun backward-kill-word-no-kill-ring () "Delete the previous word and remove it from the kill ring." (...
miguelmorin's user avatar
  • 1,897
1 vote
1 answer
151 views

kill rectangle not working on Mac (missing file/library)

I just upgraded to emacs 26.2 using homebrew on my MAC (update: I had actually done a global "brew update" and assumed it had also updated emacs) and now kill-rectangle with C-x r k no longer works, ...
ClimateUnboxed's user avatar
1 vote
1 answer
137 views

Command that does different things based on whether something is selected

I am trying to make emacs function somewhat like sublime text, where C-x cuts text that is selected and cuts the whole line when nothing is selected. I got the full-line cut to work using (global-set-...
Emerson Peters's user avatar
4 votes
1 answer
121 views

Allow C-w to kill a region only if it is selected

Sometimes (rarely I would say) I press C-w by mistake and if the mark defines a non empty region, it gets deleted. The few times this happened I just pressed undo, but I am afraid that sooner or ...
Nisba's user avatar
  • 905
1 vote
1 answer
123 views

Delete a line by relative line number

I'm looking for solutions/suggestions on how to delete a line not under cursor but by relative line number. For example, how to delete the line which is 5 lines after the cursor without going to it in ...
wizmer's user avatar
  • 897
1 vote
3 answers
93 views

quickly kill and then yank parts of a program

I very often encounter the problem that I have to cut out a part of an expression and need to copy it somerhere else. For example the following python line: courtage_text = data["expose"]["brokerage"]...
daeda's user avatar
  • 439
6 votes
2 answers
648 views

copy region without leading indentation

I often find myself copying a region of code that is deep inside the indented structure. Since I don't want it to end up in a codeblock with superfluous indentation (given that the context is missing),...
Jorge Israel Peña's user avatar
0 votes
0 answers
113 views

dealing with s-expressions in javascript without paredit

I was using paredit for other languages apart from lisp and it was great for being able to delete and yank whole functions etc. but it was also quite buggy with web-mode and js2-mode. Fir example, I ...
dagda1's user avatar
  • 615
6 votes
4 answers
701 views

How to do paredit-kill backwards?

Most everyone who uses paredit has used paredit-kill (i.e., C-k), which allows one to delete a line forwards whilst keeping delimiters balanced properly. But how does one do this in the reverse ...
GDP2's user avatar
  • 1,340
1 vote
2 answers
190 views

Kill and yank (append?) text from buffer to bottom of same buffer

I want to be able to kill selected text and yank it to the bottom of the buffer from which it was killed. How do I do this efficiently, meaning not with C-k, moving point to end of buffer, C-y?
Carl Roberts's user avatar
0 votes
1 answer
99 views

What key sequence is killing a large chunk of my buffer?

What is the key sequence for deleting from the current position to the beginning of the buffer? I ask not because I want to use the sequence but to prevent it from happening. I always do this by ...
tom's user avatar
  • 33
3 votes
2 answers
574 views

Kill URL at point

I would like a way to kill the URL under the point. I have tried mark-thing, next-visible-thing etc. from the thing-cmds package, but they either do not know how to move over URLs in nxml-mode or fail ...
Robin Green's user avatar
2 votes
1 answer
511 views

Strange behavior when killling text in term/multi-term [duplicate]

multi-term is my current goto when I want a command line in Emacs. However, I have noticed a strange behavior, and I am not sure whether it is a bug, or if it can be configured. If I type a command ...
elethan's user avatar
  • 4,805
1 vote
2 answers
798 views

Kill rectangle with cua-mode support

There are many nice column editing features in CUA mode. After hitting Ctrl+RETURN, binded to cua-set-rectangle-mark, you get some help in the minibuffer: But I can't find the shortcut to cut/kill ...
nephewtom's user avatar
  • 2,261
2 votes
1 answer
219 views

Kill the next sexp and its surrounding whitespace

kill-whole-line is quite useful as it completely deletes both content and whitespace unlike kill-line which only deletes contents in line. But in lisp-mode, it is necessary to keep parens in tact and ...
Chillar Anand's user avatar