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.

Filter by
Sorted by
Tagged with
5
votes
3answers
1k views

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 () "...
2
votes
1answer
226 views

Can you mark-word backwards?

There is a very convenient function M-@ Mark-word. However, I usually find my self typing things, than marking things backwards to copy it some place else. Is there something equivalent for mark-...
2
votes
2answers
434 views

How to jump to a mark using Elisp

Suppose I store the current mark into a variable using mark or (mark-marker). Then I move point elsewhere and insert some text. Which function should I use to jump to the saved mark?
2
votes
2answers
177 views

Highlighting and keyboard-quit

Why does (keyboard-quit) (bound to C-g) unmark the selected region? And is there a way to stop Emacs from doing so? The sceneraio I have in mind is the following: suppose I select a region and begin ...
1
vote
1answer
454 views

“Marker does not point anywhere” error when using (message)

I'm running into the error "Marker does not point anywhere" when I try to print a message both in after-change-functions and buffer-list-update-hook. Curiously if only one hook or the other is active ...
7
votes
3answers
727 views

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 ...
29
votes
6answers
4k views

Effectively using the mark ring

I have used the mark to select regions of a buffer. For example, I know the sequence C-<space> C-s foo can be used to select all text between the current point and the point after a search for ...
4
votes
3answers
432 views

Only allow kill-ring-save if there is highlighted text

I would like to wrap kill-ring-save in order to only execute kill-ring-save if text has been highlighted - same as in most text editors. Sometimes I accidentally hit copy instead of paste and then my ...
8
votes
6answers
1k views

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 ...