Questions tagged [thing-at-point]
19 questions
7
votes
2 answers
How can I get list of all things supported by thing-at-point?
I want a complete list of things that works with thing-at-point. The documentation states:
Possibilities include `symbol`, `list`, `sexp`, `defun`,
`filename`, `url`, `email`, `word`, `sentence`, `whitespace`,
`line`, and `page`.
See the file…

user1002146
- 79
- 1
5
votes
1 answer
how to properly move forward to the next sexp
I was expecting a similar result with the two snippets below, but this is what I've got:
(with-temp-buffer
(insert "(a)(b)(c)")
(goto-char (point-min))
(list
(prog1 (cons (point) (cons (sexp-at-point) nil)) (forward-sexp))
(prog1 (cons…

alexgirao
- 153
- 4
3
votes
0 answers
Is point in a regexp?
I am looking for something like thing-at-point for a regexp. For example, I want a function called regexp-at-point-p that will return the matched text if the text around the point matches the regexp with a looking back bound of the beginning of the…

John Kitchin
- 11,555
- 1
- 19
- 41
3
votes
2 answers
Why does thing-at-point not consider plus as a filename character?
Why does thing-at-point not consider + as a filename character?
For example:
(defun my-get-filename-at-point ()
(interactive)
(message (thing-at-point 'filename t)))
and consider the cursor positioned at the filename
bookmark+-1.el in the…

Håkon Hægland
- 3,608
- 1
- 20
- 51
2
votes
3 answers
Mark input in swiper-thing-at-point
Having some command automatically populate the input string is a great thing (particularly, I refer to the feature that swiper-thing-at-point provides).
However, I would like to enhance this functionality even more by being able to have the input…

Arthur Colombini Gusmão
- 382
- 1
- 11
2
votes
2 answers
Make `thing-at-point` treat dot as a symbol-constituent character?
Is there a way to tweak thing-at-point symbol regexp, so that it ignore dots as separators? Right now foo.bar in my Emacs is recognized as two different symbols, where I wish it was one.

sandric
- 1,221
- 9
- 19
2
votes
2 answers
What's the most reliable way to get the start and end positions of current symbol under cursor?
What's the most reliable way to get the start and end positions of the symbol at the cursor location (point)?

Saddle Point
- 481
- 7
- 23
1
vote
1 answer
How to use `projectile-multi-occur` to find a symbol at point?
I am trying to make projectile-multi-occur to work with the symbol at point.
I have done that for occur already, this works:
(defun occur-symbol-at-point ()
(interactive)
(let ((sym (thing-at-point 'symbol)))
(funcall 'occur sym)))
So now I…

Gauthier
- 499
- 2
- 13
1
vote
2 answers
How to copy the symbol name at point?
I want to copy the name of the symbol at point, without using the mouse.
(global-set-key (kbd "C-s C-c") ')
Possible word marking as i-search does on the following example usage (https://emacs.stackexchange.com/a/55321/18414)
For…

alper
- 1,238
- 11
- 30
1
vote
1 answer
Update point using mouse
I have been trying to add a custom keyboard command that will find a functions definition using S-mouse1.
The issue is that I need two mouse clicks for this to work. The first click is to move cursor to the function who's definition I want to find.…

Priceatronic
- 13
- 2
0
votes
0 answers
Incremental Search by Yanking Thing at Point
I used to have the below function from https://www.emacswiki.org/emacs/SearchAtPoint#h5o-6 that allows to search for symbol under the cursor by typing C-s C-w, and by typing C-w, I would append the following symbol to the search and so on. This was…
0
votes
1 answer
Highlighting by context
Are there tools for highlighting by context? When writing my configuration code, I constantly get into the difficulty of figuring out where in the different block of code I am modifying. Looking for any modes that could highlight the section…

Dilna
- 1,173
- 3
- 10
0
votes
0 answers
imenu - jump to definition of symbol at point
I have always found it strange that there is no built-in way to jump to the definition of the current symbol (i.e. the one at point) via imenu (AFAIK), the same way as one jumped to a "tagged" definition back when tags were a thing :-) Does nobody…

q.undertow
- 314
- 1
- 9
0
votes
1 answer
limit-of-search to apply search-forward to just current paragraph
The search-forward function takes four arguments:
(search-forward "target-string"
limit-of-search
what-to-do-if-search-fails
repeat-count)
The second argument (limit-of-search) bounds the search. it…

Emmanuel Goldstein
- 934
- 6
- 18
0
votes
1 answer
thing-at-point does not bound url properly due to backslash in url
I am trying to filter URLs and elisp thing-at-point 'url doesn't bounds a url properly because it has backslashes \in it. I believe that backslashes are unsafe in urls, but that's a separate topic. The fact is that I am receiving emails with URLs…

Ajned
- 672
- 4
- 19