Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [thing-at-point]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
76 views

How can I get ElDoc to show documentation for the thing at point using a manual trigger?

I'm trying to figure out how to get ElDoc to show documentation for the thing at point with a manual trigger. What I would like is to be able to set eldoc-idle-delay to some high number and then bind ...
d.breve's user avatar
  • 11
0 votes
1 answer
30 views

How can I write a function to modify the word before or after the cursor?

I have written the following function to shorten a string: (defun shorten-hash () "Shorten string (forward or backwards) to eight characters; particularly for shortening hashes" (...
Jake Ireland's user avatar
0 votes
1 answer
26 views

Why can I write one function to work on words before *and* after the cursor?

I have written the following function to shorten a string, which is useful particularly when shortening commit hashes: (defun shorten-hash () "Shorten string (forward or backwards) to eight ...
Jake Ireland's user avatar
0 votes
0 answers
46 views

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 ...
klebsiella's user avatar
-3 votes
1 answer
33 views

Taking word at point interactively

I would like to adapt this function for the interactive case, that takes the word at point. (defun rules-tablet (word) "Shorten word at point according to specific rules." (interactive) ...
Dilna's user avatar
  • 1
0 votes
1 answer
80 views

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 ...
Dilna's user avatar
  • 1
0 votes
0 answers
225 views

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&...
q.undertow's user avatar
0 votes
1 answer
47 views

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) ...
Emmanuel Goldstein's user avatar
1 vote
1 answer
135 views

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-...
Gauthier's user avatar
  • 509
0 votes
1 answer
70 views

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. ...
Ajned's user avatar
  • 764
5 votes
1 answer
714 views

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-...
alexgirao's user avatar
  • 153
7 votes
2 answers
1k views

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`, `...
user1002146's user avatar
4 votes
0 answers
172 views

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 ...
John Kitchin's user avatar
  • 11.9k
2 votes
2 answers
492 views

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") '<copy_word>) Possible word marking as i-search does on the following example usage (...
alper's user avatar
  • 1,390
0 votes
1 answer
42 views

How to get the point position relative to thing-at-point?

When using thing-at-point to get a word or filename - for example, how can I get the cursor position relative to the text? Either by getting the absolute starting location of the thing, or a relative ...
ideasman42's user avatar
  • 8,826
2 votes
3 answers
604 views

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 ...
Arthur Colombini Gusmão's user avatar
1 vote
1 answer
175 views

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 ...
Priceatronic's user avatar
3 votes
2 answers
366 views

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's user avatar
  • 1,271
0 votes
0 answers
158 views

How to get thing-at-point between separators

I'm trying to get hold of the current filename at point. In an arbitrary buffer. Say I have list of files in a buffer and I want to be able to do something with each file. For that I need to ...
iLemming's user avatar
  • 1,273
0 votes
2 answers
93 views

How to extract all lines under the current, based on a suffix?

Currently I'm using (thing-at-point 'line t), however I would like to be able to include the next line(s) as long as they end with a suffix (\ for example). How to recursively build a string based on ...
ideasman42's user avatar
  • 8,826
2 votes
2 answers
171 views

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's user avatar
3 votes
2 answers
218 views

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 ...
Håkon Hægland's user avatar