From: Rodrigo Morales <moralesrodrigo1100@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Get boundaries of the string at point matching a regular expression
Date: Thu, 18 Nov 2021 14:58:19 -0500 [thread overview]
Message-ID: <87lf1li6ck.fsf@gmail.com> (raw)
I know that org-in-regexp can be used to check that the point is inside
a given regular expression (see minimal working example below). However,
this has the huge dependency of Org Mode.
#+BEGIN_SRC elisp
(with-temp-buffer
(insert "fooooooooo bar")
(goto-char 1)
(org-in-regexp "fo+"))
#+END_SRC
#+RESULTS:
#+begin_example
(1 . 11)
#+end_example
I'm now wondering whether there's a function bundled with Emacs that
doesn't depend in Org Mode that would do the same of org-in-regexp. I
was thinking in copying the definition of org-in-regexp, but I would
like to first ask for other approaches.
next reply other threads:[~2021-11-18 19:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 19:58 Rodrigo Morales [this message]
2021-11-18 20:15 ` [External] : Get boundaries of the string at point matching a regular expression Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lf1li6ck.fsf@gmail.com \
--to=moralesrodrigo1100@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.