0

In emacs 23 there was an option where we can select the word with mouse and using cntrl+s we can paste that word to search. Unfortunately this is not working in emacs 25. I didnt change the configuration file . I took the emacs code from the git hub and compiled. I am using Centos6.4 version

I have already tried this

(setq select-enable-clipboard t) and (x-get-selection-value)

But none of it helped me

  • 1
    The question is not clear. Please provide a step-by-step recipe, starting from `emacs -Q` (no init file) to reproduce what you see. And describe what you expected to see instead. Specify your platform etc. IOW, provide the info you would be expected to provide in a bug report. – Drew Oct 19 '15 at 15:26
  • This question appears to be about **general computing hardware and software**, which is off-topic for Stack Overflow as defined in the [help]. It is probably better suited to the [emacs.se] Stack Exchange site. – Toby Speight Jul 26 '17 at 08:52

2 Answers2

0

You could simply (!) select the word with the mouse and type M-w C-s RET C-y RET C-s C-s

Here are the details:

  • select the word with the mouse
  • M-w (to copy to clipboard)
  • C-s RET (to start incremental search and switch to non-incremental search)
  • (or 'FIND' if you have this key on your keyboard)
  • C-y (to paste from clipboard)
  • RET (to start searching)
  • C-s C-s (to search other occurrences)
duthen
  • 848
  • 6
  • 14
0

Add (setq x-select-enable-clipboard t) to your .emacs

Spec
  • 817
  • 5
  • 7
  • Thank you for this code snippet, which may provide some immediate help. A proper explanation [would greatly improve](//meta.stackexchange.com/q/114762) its educational value by showing *why* this is a good solution to the problem, and would make it more useful to future readers with similar, but not identical, questions. Please [edit] your answer to add explanation, and give an indication of what limitations and assumptions apply. – Toby Speight Jul 26 '17 at 08:52