From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rodrigo Morales Newsgroups: gmane.emacs.help Subject: Get boundaries of the string at point matching a regular expression Date: Thu, 18 Nov 2021 14:58:19 -0500 Message-ID: <87lf1li6ck.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23359"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 18 21:04:14 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mnndm-0005q1-E0 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 18 Nov 2021 21:04:14 +0100 Original-Received: from localhost ([::1]:55478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mnndk-0005oo-Tm for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 18 Nov 2021 15:04:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mnnaL-0003YZ-KC for help-gnu-emacs@gnu.org; Thu, 18 Nov 2021 15:00:42 -0500 Original-Received: from [2607:f8b0:4864:20::932] (port=42512 helo=mail-ua1-x932.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mnnaJ-000333-CT for help-gnu-emacs@gnu.org; Thu, 18 Nov 2021 15:00:41 -0500 Original-Received: by mail-ua1-x932.google.com with SMTP id t13so16298860uad.9 for ; Thu, 18 Nov 2021 12:00:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:mime-version; bh=mlrdeC7rMjU+in1/hbv8V0N7urdT7mAoRkZnyFiEBT4=; b=AxtusraXf28muZs6xphBp55rXBOAVds9esuIWTT+m/VXunKc6GuUmVWSbclZTe6+Cf /B1oHlcph9l4isfCLUFiuThcEeDnVkUZ8mxWjFPxuDmRL+bMAqKyZZvASAECAO1QMGiY StGFSW8n6A+v48ovvmbr5AthwVnwFb47XCmNhhB1GwBXF40RArEUBu1Jc57F/kwADk+Z EZL93H3m3jnu2XC7qO82+TK+X3OzQx5Z9AXsStH60ZTEtYr15g/NpzHeTWWEfPGmXa/d HMyszLmf/W2/cFatL558vpCWQwEmB2Q2IOBxrWW7LkvHlNWJkOAdGRqsBTwZSD1AccTC qEHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=mlrdeC7rMjU+in1/hbv8V0N7urdT7mAoRkZnyFiEBT4=; b=MiOq9Qe+2Ci0mqo3DTIA8ufRwcYdIdDFu1OhFyBI7if5B1NqluJuooXrmRfTNPXmyq w7v3ysv3l+Dzggalwjr3/aHvH9GH7vfMQreXM5j263ga0na9EnW6XE5eSAv151Tlcp4t +LMGcXg4ptNV3esbyZGF3ctCycCHQ8IiLfXBVW/MZNDT7J4R+j59YXD8T0Oo5va3dtMG Chgz0/8XwO/yzeSi0t9LS6u8FQy5JKGHQTNWTPD24fww1hJ7r9me2Lg1Gi/sB7dNxnWW VpPpsCbn/j0TvID5qPE7VBUufVP6sX1W9aex0+tBXgifSSMqjROm0bX2tZ2yiaCE/1Mp MyZA== X-Gm-Message-State: AOAM531QCOpMuDy4WcZ1OPRao9kpl6N/Y70PH7cWfWzM/V/fi04aQdaV abhJ+nAOaa0HFaIXdDylQIGysV4c0mY= X-Google-Smtp-Source: ABdhPJy6z4yPUUQWNJ1Vb0D7EAwkyDQOIVl+IVGbISpBk3lCszA5aWbCkfQs/PtfAGsrReiCO+M/vA== X-Received: by 2002:a67:cd8b:: with SMTP id r11mr86032314vsl.27.1637265638185; Thu, 18 Nov 2021 12:00:38 -0800 (PST) Original-Received: from r1 ([181.65.25.152]) by smtp.gmail.com with ESMTPSA id h24sm499157uab.5.2021.11.18.12.00.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Nov 2021 12:00:37 -0800 (PST) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::932 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::932; envelope-from=moralesrodrigo1100@gmail.com; helo=mail-ua1-x932.google.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:134652 Archived-At: 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.