From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: [External] : Re: isearch based on syntax? Date: Thu, 30 Jun 2022 01:47:54 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11991"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "help-gnu-emacs@gnu.org" To: =?iso-8859-1?Q?Daniel_Mart=EDn?= , Sam Steingold Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 30 03:49:02 2022 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 1o6jIk-0002wW-Ez for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 30 Jun 2022 03:49:02 +0200 Original-Received: from localhost ([::1]:56358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o6jIi-0007d5-UN for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 29 Jun 2022 21:49:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6jHr-0007cg-MB for help-gnu-emacs@gnu.org; Wed, 29 Jun 2022 21:48:07 -0400 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:5310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6jHn-0003jd-7K; Wed, 29 Jun 2022 21:48:07 -0400 Original-Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25TM4Ff5014302; Thu, 30 Jun 2022 01:47:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=iUHfstGhg8h6R+6uu76E/Alta7HHzO08Ty3Koe54gIU=; b=LAjByBDswIn9MOKyVUAW9BvroclP/Rfi5F9mzhCwyXw0SW6bdWA5KX6jIC3aFQ2H62/R mpDQqu/V7CdKfmQ4P/0NSukx4QZ/kzC9mfAdir9A3qQ/nd3a2j/2HN4OCNUwlfdqZQUd jlh2y2pYLtCmt9oZgZ2dhYODyW15K4YyHzZ+ukZ4fslVqmqVRFtYf3bzL6tYh4YQ/13c 6y87G3AqDUeR6+4SURADDcbwzydbJxaFbEKF0L6wlgamLZSsywInYChWxv1DKJWOASvB wpC00RVY4GPhHxQ+5gtkp+yB28H2c6yCShawn97cEw6m0HF5cc3/YlpNM7pFjW3daNYA 2A== Original-Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3gwsysjpkc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 30 Jun 2022 01:47:57 +0000 Original-Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 25U1fT22018500; Thu, 30 Jun 2022 01:47:56 GMT Original-Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2170.outbound.protection.outlook.com [104.47.57.170]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3gwrt9b7rb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 30 Jun 2022 01:47:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KQvNbC62/LKbmBsr9dctr1WpivqhUlQkrXrI5JlZTs3FMp4DEsVYxWiTjsKrcIpJBgxM70KlDRycOVWi3YfsVHzU3svgow6R1dEnO66+VNrAXgqn6Q1IW+UYIrakB4fL/4L1614uuAJNt1cl+WJhqNSiHV/lm/wBMrBY4tYJOdrMVmDMuFXOAAlZZvBI1X1cUsdrE2E+jNXmHpI9CkfCWiBK+HzHCRlec14t1SZLzjPEfMYsvX7L9qPs96bksI2a1S8dhhumvQSAWv1P8RiRvlhxxFqAMAcmFMI8+yH0+nCDTHUV1aubsjTjF6gDFPgJdhcJc1O9MpDSB/jHVsS6nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iUHfstGhg8h6R+6uu76E/Alta7HHzO08Ty3Koe54gIU=; b=Kl8PwqCeLqovJbGIqK7q7kQGrmdRPvR+yMVnjuK7m+PLUJfuWfIeYHda5NINE6m2hOg8b/L+/JnfkVyClEPnZevuzgbymGlHQ78bLbTltBJSE18vYwNy4P5Irp2O9fOm9DInH4LEiNCMeIAkgt5YjHFmVLy/SpEznXsWWxZ5U+/ylP7EhTbG9/r7vtckNs0/4SphfUQJoPjZhNJ3CzBq0bsd926Uh8T0MHzxw/zg8gURl9R1yO2UkAAXFjS8RylqioMCPjjMKSuEsdJ2SbK4NuHiPNW4EYLyKESbDyIoGfQE18CrrW1Iwik4v/nDBN3h79AwczQwajapF9Xn6FAGMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iUHfstGhg8h6R+6uu76E/Alta7HHzO08Ty3Koe54gIU=; b=XYIzwOWKIgMi7A8H48iWhk/gdjr/N7Be/l0trXUGQxDVmWUXxr23jbj1kHQiY4p6mABx0OEvbR22V1ryiPetpt2Gu8uJUrzG4x+VFt+/Lfba3+8Y9NHFP7WRSl/cOXmjCBs+ffDIWKI4OvJB+NYRWiKisGdzf2a4iZEYU6MPXqg= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by CH2PR10MB3990.namprd10.prod.outlook.com (2603:10b6:610:11::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17; Thu, 30 Jun 2022 01:47:54 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb%7]) with mapi id 15.20.5395.014; Thu, 30 Jun 2022 01:47:54 +0000 Thread-Topic: [External] : Re: isearch based on syntax? Thread-Index: AQHYjAN1y8rbXRDZU0+0Bwpbd+bXja1nIxGw In-Reply-To: Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 694b6c84-f07e-4d2c-5001-08da5a3a8cc5 x-ms-traffictypediagnostic: CH2PR10MB3990:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 02FGauaWN9kjm3Q/vPks+9PL5Fd72/D/dyhRpKMlKizCihA5YMAv4GRHjyxFmbMU15vGIwLPC6KYOU5OGBGGv+rESr/7jqgVBwPaq2Mfzz7VINInV/EI7veY8NU0cWGC72p25vCCReDzH4EdZgxzCdtMxE2+sH0CcUWfzs2Na6lUoSgObl0sPcaIzZAKm8AXdvK4MvXGZZEJdHMGKn9mamOP26MVFuA1sbjgHimpY7ipbtf0vl/+ndS3wMTgxIS/cX98Iakq+SIfpnbQSrceEB5vvfXNAAZYzFC6PiS0RynN8V7oLz+LgFLSimEmtq2GFJyJj/yK6sn6ocpWjym6gAjJvHCtlgLqSEFY+UmRi0lb6AyKNVugk1ioZCX7XwaUiSvxDvIH2m1lCaR8bobrPXFQiOPiSxab1rt3oDDPfe6khb8z4Zhmpp7Ay3RHwyguuYJuh8UEX1tzSLLNRfHg/evtd9TPAZNagom1AsIyWz4pIj7k4PSJ0qFKA7xR74s6QLdPeCaTlKhDgL1GQGlcs3bt0CGwaLqqdO9PNBUZ1zrkm7HFJKr1RayWcsJTyZQpwbcvKjaUcV5I/Fc1rnOah73e+Jtzr/zC5xBkcVIJXvZfcSXWrNLxD8YJWRjVo8kD7Dm3TeECzU6XM8Nmg+cHw/+BW7EZnSoBf2eWuycYnJf1QD4HdK0buprxTLVB2ilySF3j5aZZrFxbhpULRoVUO88ARC17mXYtLKmc98NIIGXwfuud5KZX7CBXSK6s/ JA/V1VlEeXmlmOzyL+lzVjLPXJ38+yuejj8/UcnMuhlA1G5b6FqSKuCxJ+qu5d33SFH45eS53geAE2w1JuUbXYNLQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(39860400002)(136003)(346002)(376002)(396003)(366004)(122000001)(38100700002)(64756008)(2906002)(44832011)(8936002)(52536014)(38070700005)(33656002)(41300700001)(8676002)(71200400001)(110136005)(66946007)(5660300002)(55016003)(66476007)(86362001)(66446008)(4326008)(76116006)(66556008)(6506007)(26005)(186003)(316002)(83380400001)(966005)(9686003)(478600001)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?TmN9/5L5DogT9SijdUcQnLSjq0foXTo5SRJT/8aXEyjTfpMhE6wyxsL/I1?= =?iso-8859-1?Q?eNHENl1kV/nW+HXWb521SC8Yogu8ml5oLYglPGhRfFPt/r+9qflFGQJGz1?= =?iso-8859-1?Q?hsgqJl6QqLyBPp975z22Xf+OLOZ/ebiakutPrtY5UnY8cbrcl4y2KS2Fyy?= =?iso-8859-1?Q?fIX0pJuLpdCt04Kq+QN4FkrlEdIURjE8/HJSYkZ7/rqmjaAF+PghJlBxKz?= =?iso-8859-1?Q?ALKl8qIC70M1BPCEx2Nc2LaE2NdUoGBEmfWiP3McwE92c0zAXHnQkWJYk7?= =?iso-8859-1?Q?h7Mpn1OeKxu2yjb7mv3YSrK9mudvseJY0asqtiCg1erDxh0cdv91wsfmIF?= =?iso-8859-1?Q?MWMiMWLWYJzEndos9PWnZ/7UKfcr/C0P2gCMu+PMwpyHqyZt8VqFk5Kz1v?= =?iso-8859-1?Q?fh8IItu+W+CdcEnz5mepH37z7Kydcb/jxjL4hJjtPIGqOqUBPneFumP386?= =?iso-8859-1?Q?uueYTk6+A3UE+p1Nw7EmPhE8V6qdYUd6QmaStaieqRjAvqp8wzvyLGSUw5?= =?iso-8859-1?Q?cSBeaekw0RykpDt3vUG1fxRdBkfs7X8oXZcfuEI4pwisnECxxbpj5fKxzq?= =?iso-8859-1?Q?/23kCIp8AHdYI7ojvrxRdWwg+UOXtqGs/rwZ32tp9APmbXY5Pjw5Y6psm/?= =?iso-8859-1?Q? X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 694b6c84-f07e-4d2c-5001-08da5a3a8cc5 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2022 01:47:54.2208 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: TzfazfAtE2J4mqZbbzLOqEJwn+393E5JnXbGlc4mMdb1rkaExH5nAdJ8WxrWiixnj5bmMOqK1q2xd0R7AhZLOg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR10MB3990 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517, 18.0.883 definitions=2022-06-29_24:2022-06-28, 2022-06-29 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 mlxscore=0 phishscore=0 malwarescore=0 adultscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206300004 X-Proofpoint-ORIG-GUID: iPfM--5U3kp4ze0wtaSR2jMd66COrREI X-Proofpoint-GUID: iPfM--5U3kp4ze0wtaSR2jMd66COrREI Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:138209 Archived-At: > > Is it possible to limit (i)search to, say, Lisp doc strings? >=20 > Not with vanilla isearch, AFAIK, but you can load library > isearch+ (https://www.emacswiki.org/emacs/IsearchPlus). Yes. You need only `isearch-prop.el' for this, not also `isearch+.el' (they're both part of Isearch+). After loading `isearch-prop.el' you can use command `isearch-property(-regexp)-forward' (or `-backward') to search within zones of text that have text or an overlay, or both, with one or more `face' properties (or any other properties). You can use those commands from within regular Isearch (e.g. `C-s'), by using `C-t' (or `C-M-t' for regexp search). In this case, you just want to search within text that has face `font-lock-doc-face'. With no prefix arg you're prompted for the following: * property type (e.g. `text') (The default is both text and overlay properties.) * property (e.g., `face') * property values (e.g., one or more face names) You only need go through the prompting once, if you want to search zones of the same property again: use `C-u C-t' (or `C-u C-M-t') to repeat the same kind of property search - no prompting. (To be able to use a prefix arg within Isearch, set option `isearch-allow-prefix' to non-nil.) When you're prompted for the property name, and you say `face', you're prompted repeatedly for faces. Just hit RET with no input to end the list of faces. E.g., enter `font-lock-doc-face RET RET', to search within text with that face - including with any other faces as well, e.g. `font-lock-constant-face'. Or `font-lock-doc-face RET font-lock-constant-face RET RET', to search only within that combination of faces, i.e., only constants in doc strings, not other doc-string text and not constants in comments. You can also search the text that does NOT have a face (or a set of faces) - e.g., the text outside doc strings. Just use `C-M-~' while searching, to toggle searching the complement of a set of zones. `isearch-prop.el' is here: https://www.emacswiki.org/emacs/download/isearch-prop.el