From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Use Vertico + consult to do the search for an exact word. Date: Thu, 01 Jun 2023 20:45:12 +0200 Message-ID: <87zg5jj9l7.fsf@gnu.org> References: <87zg5jsmez.fsf@gnu.org> <87v8g7se5h.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15571"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.11.6; emacs 30.0.50 Cc: help-gnu-emacs@gnu.org To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 01 20:57:00 2023 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 1q4nTn-0003lf-Nb for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 01 Jun 2023 20:56:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4nTF-0006CN-81; Thu, 01 Jun 2023 14:56:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4nSy-00069O-Gq for help-gnu-emacs@gnu.org; Thu, 01 Jun 2023 14:56:17 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4nSr-0007Kf-Qn; Thu, 01 Jun 2023 14:56:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=fWYR1n5tDr8hz3CTIB2cjCJhSMhyVkyfZu33vBWLetM=; b=p18QANZ4oCY8UY baA9Zaam3uZPrM8OHQGTDDX50O+GvFLq9aIfUpE9EW1wGLuEe0ZeEhjo3QL/TyDsgSQpF6Tt/Ug0M 7gCwpmyl4GPJ1Qa5F7SGrmlQWzj7J4jL4ANNVuzxDyoS6vEV3hYfsydr4OC0oOwCuiYdU7YFhDWO2 VE1dKsLAFDQwHdZ4jiXcREjyWHv40qcQNCew2KeB7gnNdDuNGbiG5Yxs2fkturmc02grzlwGhf400 WY56YykffY9DAtc88UZJ/jNTJqXGqMj2KuT1QD+zClH1Tm61FPKMdlf4ncin0851eVhMGEm8FkhwW 2BuFShxH3NPw1ZGH/e3w==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q4nSj-0008A6-1e; Thu, 01 Jun 2023 14:55:59 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 42F0427C0054; Thu, 1 Jun 2023 14:55:52 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 01 Jun 2023 14:55:52 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeluddgudefudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvfevufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghs shhilhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnh epudejtdehuddvleffjeekteegvdehleehvdeufefhueekkeekhedvgfeggeffvefgnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnh domhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeeh vdelkedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Jun 2023 14:55:51 -0400 (EDT) In-reply-to: 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143825 Archived-At: Hongyi Zhao writes: >> That's because $ is a word-character in the syntax-table of the mode >> you are using in that buffer. You can try >> \([^a-zA-Z]\|\b\)id\([^a-zA-Z]\|\b\) which should also find $id$ and >> 1id02. > > Yes. This works, as shown in the attached screenshot. But the input is > rather cumbersome. Are there more efficient/concise regexp patterns > for this goal? Well, \bid\b should be enough, actually. I don't understand why it seems like the $s in $id$ in your latex buffer have word syntax. I've just tried both the stock latex-mode and AUCTeX and with both the $s don't have word syntax. Could you please put point on such a $ and report the output of M-x describe-char RET? I'm mostly interested in the line syntax: $ which means: math which might be syntax: w which means: word on your side for whatever reason. Also, please try if regexp isearch works as expected, i.e., C-u C-s \bid\b should also find the id in $id$. If you both have $ in math syntax and isearch works but consult doesn't, then I'd ask at the consult community. Bye, Tassilo