Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [selection]

The tag has no usage guidance.

1
vote
2answers
31 views

How to run selected bash commands

I have a large bash script and I need to rerun certain lines of code. Normally I would comment out any line I don't want to run and then execute the file on the shell. But that is rather cumbersome. I'...
0
votes
1answer
42 views

Identify buffer by part of its name

Is there a way to select a buffer by part of its name using elisp? For instance, the ag package may create a buffer called *ag search text:MyPtyhonClass dir:c:/projects/my_module/* or the realgud ...
1
vote
1answer
43 views

How to select last pasted text

How can I select the last pasted text with regular Emacs? I would like to do the same thing as this Q&A, but I don't use evil mode.
0
votes
0answers
48 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.
5
votes
3answers
140 views

How to select (and highlight) non-consecutive blocks? [duplicate]

The title says it all. I'm looking for a C- or M- built-in way to select non-consecutive lines and blocks of text, like usual consecutive lines with Shift or C-SPC. I.e. I need a switch that turn ...
0
votes
1answer
94 views

auto-insert mode switch to new file

I managed to insert a template to certain sripts with autocomplete. Example: (auto-insert-mode) (setq auto-insert-query nil) (setq auto-insert-alist '(((ess-mode . "R script") nil "# R ...
0
votes
2answers
68 views

Function to highlight timestamp generated from org-time-stamp

We can create a timestamp (e.g., <2018-01-11 Thu>) by C-c . which runs the command org-time-stamp. How can we highlight (i.e., create a region) the whole timestamp when the cursor is on it?
0
votes
2answers
134 views

How to save the text selection and keep the selection highlight

In Emacs 25 how can I save the text selection and keep the selection highlighting when using Transient Mark mode? If I use kill-ring-save, the highlighting is switched off and I have to switch it on ...
0
votes
1answer
28 views

How can I constrain a predefined replacement-function to selected text?

When using replace-string from the M-x while having some text selected, it only operates on that selection (specifically, on an Evil visual selection, in my case). However, if I put the same ...
1
vote
2answers
117 views

How to evaluate the selection through Python and replace the selection with it's result?

Being more familiar with Python then elisp, I'd like to evaluate the selection as as Python snipped - as a short-cut to opening a calculator or Python prompt and copy-pasting between them. Is there a ...
1
vote
0answers
56 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 ...
2
votes
0answers
38 views

How to pre-select helm's pre-input?

In many other softwares (e.g., Chrome), when we initiate word search by Ctrl-F, the pre-input is pre-selected so that we can replace it by simply typing a new keyword, or append a new string to it by ...
1
vote
2answers
77 views

How can I define a key to cancel selection only when I selecting something?

How can I define a key to cancel selection only when I'm selecting something? Because I use this key to do other thing in global-mode-map.. Is there any specific mode for mark and selecting something?...
9
votes
2answers
373 views

Selecting (i.e., as the region) the current match in incremental search

When searching for a string with C-s, I want to be able to hit some key to exit search mode but still maintain the selection of the match. That way I can immediately start typing and replace the last ...
5
votes
3answers
2k views

How to select (and copy) a column of an org table *without* rectangle selection?

It seems to me that the normal way to copy a column of an org table is by rectangle selection (see here). That is, first the column is selected by marking all of it by hand, and then it is copied with ...
6
votes
3answers
307 views

Use avy to select distant word or line and paste at point

Is there a way to use avy or a similar in-buffer selection tool to quickly select a word or line to paste at the current point? For the following buffer an example workflow for proposed functionality ...