Questions tagged [mark]

is for marking the start of a region of text in a buffer. Emacs uses `mark` and `point` to highlight a region. Highlighting indicates that the mark and region are active.

Useful Links:

84 questions
42
votes
6 answers

Effectively using the mark ring

I have used the mark to select regions of a buffer. For example, I know the sequence C- C-s foo can be used to select all text between the current point and the point after a search for foo. I recently discovered the existence of the mark…
Patrick Steele
  • 1,105
  • 9
  • 10
23
votes
2 answers

set-mark-command (C-SPC) not recognised/broken

I would like to know how to start troubleshooting the following: C-SPC is not doing anything. It's not appearing in the mini-buffer when I type it but when I look at M-x set-mark-commandit's showing as bound to C-SPC. Environment I've installed GNU…
m__
  • 923
  • 1
  • 7
  • 12
19
votes
4 answers

What is the usefulness of `exchange-point-and-mark`?

The exchange-point-and-mark command is bound to C-x C-x, but I cannot think of any use cases that would make it deserving of such a prominent binding. How can I use the exchange-point-and-mark to improve my editing technique?
Matthew Piziak
  • 5,958
  • 3
  • 29
  • 77
12
votes
1 answer

mark text with keyboard in PDFView (pdf-tools) mode

I've replaced doc-view mode with pdf-tools. While it's easy to set a mark on a page with the mouse, how do you do it with the keyboard? The readme mentions the feature. "* Mark a region and kill the text from the PDF." The closest I've gotten is…
Peter Becich
  • 289
  • 1
  • 10
10
votes
6 answers

Best way to select a word

I want to select current word under the cursor without using mouse. After searching this forum, I learned how double click works. (I noticed that it is a bit complicated and there were no direct key bindings.) What is the best way to select current…
Peter Hwang
  • 211
  • 1
  • 2
  • 6
9
votes
6 answers

Selecting text without moving the cursor

I would like to grow a selection without moving point (the cursor) from its location. I know I can always use C-u C-spc to move to the previous location, but I would like to avoid that. More specifically, I would like to do both of these…
Amelio Vazquez-Reina
  • 5,157
  • 4
  • 32
  • 47
9
votes
1 answer

How to set mark in elisp and have shift selection?

The normal behavior of Emacs when transient-mark-mode is active is that when you make a shift-selection, then if the next command is a non-shift movement, the mark is deactivated. For example, after the commands M-l (to mark the current line with…
mikl
  • 413
  • 3
  • 19
7
votes
3 answers

Is there a package to simplify clickable text?

I'm writing a debugger front end, and in that over the course of program execution a number of marks get added inside the source code. In other buffers such as a buffer showing execution history, or a buffer containing backtrace or callstack, I'd…
rocky
  • 888
  • 7
  • 26
7
votes
3 answers

How to grep marked files in the dired mode of emacs?

I hope it's a simple problem.. I'd like to search for the regexp 'thisWord' only in the marked files of a dired buffer. Usually I used in the dired buffer: M-x grep and then in the mini-buffer grep -r -nH 'thisWord' . But this searches all the…
rl1
  • 346
  • 1
  • 16
7
votes
1 answer

How to unmark selection in elisp?

I wish to remove selection programatically, what is the proper way of doing this? Specifically I wish to write a function to make swiper search in buffer with selected text, but it needs to remove selection before open swiper window. Here's the…
sandric
  • 1,221
  • 9
  • 19
7
votes
4 answers

select text to end of line, without moving point

I often want to quickly mark everything from point to the end of line, leaving point at the same place. I tried to write simple function for that purpose: (defun mark-from-point-to-end-of-line () "Marks everything from point to end of line" …
Geradlus_RU
  • 625
  • 7
  • 17
6
votes
2 answers

Mysterious highlight in emacs

Recently, I change my laptop from old Thinkpad to newer laptop with much larger touchpad. I've found that I frequently touch the sensitive touchpad while I'm using emacs. And with some mysterious combination, very often there will be a highlight…
Sake
  • 325
  • 1
  • 10
6
votes
3 answers

delete-selection-mode not a default?

If you enable Delete Selection mode, a minor mode, then inserting text while the mark is active causes the selected text to be deleted first. This also deactivates the mark. Many graphical applications follow this convention, but Emacs does…
m33lky
  • 297
  • 3
  • 9
6
votes
2 answers

Keep region activated upon completion of my command

I'm using the following functions to speed up some regexps replacements I frequently use. jc-replace-regexp-in-region can be called by several functions like jc-dollar-to-paren. At the moment, when one of those functions completes, the region is…
wilk
  • 519
  • 2
  • 11
5
votes
0 answers

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 determines a region. Since the mark belongs to the…
soegaard
  • 151
  • 5
1
2 3 4 5 6