Questions tagged [thing-at-point]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
36 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. ...
4
votes
1answer
83 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-...
5
votes
2answers
510 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`, `...
2
votes
0answers
50 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 ...
1
vote
2answers
74 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 (...
0
votes
1answer
31 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 ...
2
votes
3answers
179 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 ...
1
vote
1answer
70 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 ...
2
votes
2answers
157 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.
0
votes
0answers
89 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 ...
0
votes
2answers
75 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 ...
2
votes
2answers
77 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)?
3
votes
2answers
150 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 ...