Questions tagged [region]
The text between the point and mark in a buffer.
22
questions with no upvoted or accepted answers
5
votes
0
answers
54
views
Point belongs to window - mark belongs to buffer
In Emacs the point belongs to a window: this allows a buffer to be displayed in two different windows at the same time.
The mark belongs however to the buffer.
Conceptually the mark and a point ...
3
votes
0
answers
79
views
Is there a way to move region with arrow keys or similar?
Say I have a function
int calc(int that, int this);
I want to mark int that and then move it right across words by hitting modifier arrow key (or similar) twice to get
int calc(int this, int that);
...
3
votes
0
answers
276
views
Region face foreground color as function of original faces
I know you can set the :foreground of the region face so that it simply uses the :foreground of whatever is selected, while using the region's :background. And I know you can just set the foreground ...
2
votes
0
answers
134
views
Would it be possible to disable flycheck selected region on mark?
When I selected a region Ctrl-space up-arrow key, flycheck errors' font color are remain as it is.
Example, flycheck error makes fore-color bold orange:
Would it be possible to disable flychecks when ...
2
votes
0
answers
24
views
Is it possible to highlight the region uniformly across different sizes/fonts?
Highlighting the region when it includes text with different heights/fonts shows gaps and different highlighting heights as follows:
Is there any way of highlighting continuously (no gaps) and ...
2
votes
0
answers
47
views
Are there any packages or configuration snippets for better whitespace traversal?
Whitespace traversal in Emacs is atrocious. By "traversal" I mean:
Moving the point with C-<direction>
Expanding a selection (with either a package or region mark)
Deleting with C- or M- ...
1
vote
0
answers
64
views
Conditional Formatting foreground and background when highlighting selected text
This is a follow-up question to: Interchange Foreground and Background Colors when highlighting selected text.
How can I do some conditional formatting?
For example I do not want inverse-video if the ...
1
vote
0
answers
44
views
Combine `flyspell-region` with`writegood-mode`
I would like to combine flyspell-region with writegood-mode, but writegood-mode does not provide a function to check a region of text.
This is what I came up with to work around the limitation:
(defun ...
1
vote
0
answers
31
views
How to write functions that only operate on characters within a rectangular-region?
I've found emacs has support for rectangular selection, however I didn't see references to API's for only operating on contents within the rectangle mark.
How would this be acomplished?
Take this ...
1
vote
0
answers
44
views
(octave-mode) highlighted region remains highlighted after command
I am in octave-mode running an inferior octave shell. Now I mark a region and issue 'octave-send-region'. All commands are executed as expected and echoed in the shell buffer, and the highlighting is ...
1
vote
0
answers
78
views
Add whitespace as indentation with `indent-region`
When using indent-region, emacs will indent code and leave bank spaces untouched. It seems to me that the majority prefer to delete whitespace. However I prefer white space indented with the code. An ...
1
vote
0
answers
170
views
How to delete a long region by setting a mark and then searching for the location of the end of the region?
I have a long document. I placed two unique identifiers, in the form of short strings of printable English letter, in two positions in the document. The identifiers are far apart. My task is to delete ...
1
vote
0
answers
161
views
How can I execute a python script on a given region of my buffer?
I have a .tex source and a python script called comments.py. This script reads my .tex source as input, does some operations on it and write a .com file as output. Then I have to reneame .com as .tex ...
1
vote
0
answers
102
views
Make `insert` follow `(delete-selection-mode t)`
When I call helm-copy-to-buffer (which calls insert) with active region in my current buffer, the marked helm candidate is added after the active region. But I expect the active region to be replaced ...
1
vote
0
answers
59
views
What is the cause of this inconsistent behaviour of TeX-command-buffer when narrowing?
When editing medium sized .tex files, I often find it convenient to make use of the narrow command C-x n n (narrow-to-region), usually in combination with the mark section command C-c * (LaTeX-mark-...
1
vote
0
answers
52
views
Launch functions one after another
I wrote a function that pastes in the currently selected color from the palette to the buffer:
(defun palette-paste-in-current-color ()
(interactive)
(cua-paste (palette-current-rgb-to-kill-ring))...
0
votes
1
answer
33
views
Why Does The Highlighted Region Go Away?
I want to be able to select multiple lines and move them up and down as a block, while "jumping" over the line in the direction of moving. Here's the code for moving up:
(defun on-ctrl-shift-...
0
votes
0
answers
110
views
format a region of text file with cc mode
I have a textfile.txt with content like the following
*decltype with two or more arguments
decltype does not take two arguments. Simply it can have an expression as its argument, and the comma ...
0
votes
0
answers
63
views
How to add new support to `expand-region`?
I'm trying to add new support to expand-region:
(defun er/lisp-mode ()
(interactive)
"Enhancement for lisp like #'() ,@()"
(when (looking-at "\\(\\(`,?\\)\\|\\('?,?\\)\\|\\(,?@?\\)...
0
votes
0
answers
97
views
How can I provide the first-error and next-error initial positions as region selection in order to save to the kill-ring?
I am running a make command. I'd like to capture the first error and output it to a file.
How can I select as a region from the beginning of first-error position to the position right before the next-...
0
votes
0
answers
177
views
Interactively matching beginning of region
Short version: If i bound the scope of a search/replace to a region in the buffer (via the second/third optional argument of search-forward and its derivates), how can i match the beginning of that ...
0
votes
0
answers
73
views
C-S-a doesn't select text to the line beginning
The Key combination Ctrl + Shift + a doesn't work in my GUI-Emacs to select a region from the position of pointer to the line start. Doing C-h k and the above key combination shows no documentation.