Questions tagged [region]
The text between the point and mark in a buffer.
182 questions
0
votes
0
answers
42
views
Can I switch the mode for a region?
I'm wondering:
Say I have a Perl script that includes a HTML "here doc"; can I mark the here-doc and switch the mode to HTML for the region (to help editing it)?
I'm using Emacs 27.2 (Linux)....
0
votes
0
answers
236
views
How to paste with mouse middle click the text copied from Emacs or other applications?
I would like to:
Copy text from Emacs by highlighting it with a mouse (or copy from other applications with command+c).
Paste the copied text into Emacs with mouse middle click (or paste it into ...
1
vote
2
answers
149
views
How to get output of call-process-region as string?
I would like to pipe a region to texcount and use the result in a function. Thus, I have written the following code:
(defun count-texwords (start end)
(with-temp-buffer
(call-process-region ...
0
votes
2
answers
130
views
How to create an active region (selection) between the point and the mark?
Looking into Emacs marks and the active region, it looks fairly simple to write a function in elisp that activates the region, however, is this something emacs is capable of doing via built-in ...
3
votes
1
answer
142
views
Is there a readymade solution that would allow me to select multiple separate lines/headings and access the list of those selections programmatically?
I have lots and lots of headings in Org-mode. If I want to cut-and-paste several of them, or assign tags to multiple headings, I can only select a bunch of them with the contiguous region and do edits ...
0
votes
0
answers
42
views
What causes this strange killing behavior?
Sometimes during editing, the behavior of Emacs suddenly starts to change in that, when a selection is killed, the mark is not automatically turned off afterwards. Because I have delete-selection-mode ...
0
votes
1
answer
134
views
going back multiple undo steps with undo-in-region
I'm trying to use undo in a region to undo multiple changes -- but I can only toggle between undoing one change and redoing it.
For example, if I start with:
Here is line 1 with some text.
Line 2 is ...
0
votes
0
answers
63
views
How can I put the same character at point and mark?
Suppose that I have written bar, but decide that I wanted &bar&. I put point at b and mark at r. What now?
Some mode lets you do this by just typing a special character, such as [ in Markdown ...
0
votes
1
answer
114
views
After cutting text, and then copying another text, the cut text is prepended to the copied text upon pasting
I cut text in Emacs using control+w. Then I copy another text by highlighting it with a mouse. Finally, I try to paste the copied text using mouse middle click. I expect only the copied text to be ...
1
vote
2
answers
70
views
set face for text in izones
I'm trying to roll my own version of multiple-cursors using zones, and I'm currently a bit stuck at actually displaying the zones on the screen. I can easily set a zone as my current region by setting ...
2
votes
1
answer
84
views
Can emacs for windows (UI) be told to put the selection in the clipboard
Where I'm at:
Using Windows for the first time in > 10 years after using emacs on X forever.
What I'm trying to achieve:
Whenever I select a region of text (lets say with mouse, but I could live ...
0
votes
0
answers
41
views
mark minor-mode
I'm searching for a minor mode that will let me mark positions and region coordinates to eventually generate a buffer of sed or awk script.
Is there already something that exist to do such a way of ...
0
votes
2
answers
116
views
How do I write a function to copy a region to the MacOS clipboard?
I'd like to be able to mark a region in a text buffer, hit an F-key, and have the contents of the region copied into the MacOS clipboard. From the shell you can do this by piping the text into the ...
0
votes
1
answer
66
views
How do I remove a protected region or line?
Apparently I cannot find the correct word for this problem. I tried searching for:
protected
non-editable
blocked
but none of those bring up anything.
I was writing some code when my cat jumped on my ...
0
votes
1
answer
139
views
alphanumeric sort of a region
Assuming your buffer content is similar to this:
x1_y1_text_x3_y1
x1_y1_text_x3_y10
x1_y1_text_x3_y11
x1_y1_text_x3_y12
x1_y1_text_x3_y2
x1_y1_text_x3_y3
x2_y1_text_x3_y20
....
how to get the region ...