From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joel Reicher Newsgroups: gmane.emacs.help Subject: Re: Any package for boolean search? Date: Sun, 29 Dec 2024 03:06:46 +1100 Message-ID: <868qrzaj1l.fsf@gmail.com> References: <86a5cjdlrv.fsf@gmail.com> <86v7v6avg8.fsf@gmail.com> <86seq8a2tg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19067"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 28 17:07:31 2024 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 1tRZLe-0004pO-OE for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 28 Dec 2024 17:07:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRZLA-0000Ux-4v; Sat, 28 Dec 2024 11:07:00 -0500 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 1tRZL4-0000UL-Gx for help-gnu-emacs@gnu.org; Sat, 28 Dec 2024 11:06:55 -0500 Original-Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tRZL2-0001lq-FG for help-gnu-emacs@gnu.org; Sat, 28 Dec 2024 11:06:53 -0500 Original-Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-2165cb60719so101726785ad.0 for ; Sat, 28 Dec 2024 08:06:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735402011; x=1736006811; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:to:from:from:to:cc:subject:date :message-id:reply-to; bh=49mWBfQ/qg4mH4sjILimqVUYehuNgNMOM03s2QtJ4O0=; b=PL0K3TMqM50w7dIr+paGzh7ONFFBbo8VKtklBnTUfoUm8itqyzApii18+/m6FlW+2Z WL4H1QlYBPavsbOeLeJSonWYkxWzO/VkiaKgsZynaavhzjJfUuZqxCSpkCdFqYLiSSRY QIYvk565BWt+Ey6MM7+ULCblCWmEkR9WSJEH+/GgBP7OQs7xhM25xQddc0hBQgu6o70J ulOosXLuX1TV0HVKm8IEoV/1t5SJNeaO05AAkpQAF3VPajXEBe/nbUKCNCZyX6r2PGEM pmCAkemIaB4NwXuW7DpjCZ92/0pjiXlxMvUrkfCn0VncUvBLx7vAgzDFN+eW2pBlMH5v IkPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735402011; x=1736006811; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=49mWBfQ/qg4mH4sjILimqVUYehuNgNMOM03s2QtJ4O0=; b=fPhWxC5vk0FLQbs31RY2qGnVPBxmMbW2aTO6mPr8qY4PgZ01bsjDUDu8VKcTlIx8kX 4+LCNLJdJ2NmVq+KVYZQaxhEj++dF+DxWS8gl9LFxXOcAU4zhuOVtMA8fs7Kx+LCfxe6 AfROk6Cvj8Y+YHkrWbSc7ky9ctxEw7G/0Mh0N8CSZVPtqqx4QXhUnmH195uA3przXW2U ZpbQrfTB3McCg3cnOjm49uevfETDOLYu0MmyvCCQUV6DTsivMcPSgX7bRGqJjQOkRd2H N3un1Inj4dlX684kg67uZCY+fXCWHIIuwRgg4eoEI09xXU9XgodAmcg4arKdUKrRVnDN AkjA== X-Gm-Message-State: AOJu0Yyh7ACy5tINKd5iyTNR5rfROfjSKtI7mbGBzifiOmW6JysBQF12 B3TAawKMCHwoOhS6+GpnDK5yluqrCc5xv+dIBdxasU4ubok1YVTKXzOvbQ== X-Gm-Gg: ASbGncsWju3JtbVanYXMjY1+1Yrz7uD+rhmGKM62+S4Df8MaZtJns0NfnjtwNTt8XRv wJG/vX7xmHwYK4j2d43aHkoo48pcUHNQ7iqceVe5wNr3dyMMEuH7COLG+cSVK5/ZKAomXU4ygMn ez2A96Y49Sn/cThnam1v/1oih+Lfco5TEoDtZFh73Wtvbihjtvod7Y+D0hYN5Z+M3QBsepClfXc RVI7NuQTJ8C9NLCUkAaBh8+N8jQja3Zy/XkibkXpXVw7kW5A5/MWRir3cemJR4Zj0nkcY8D+9qS MamYTStkBn/SE4KLynPdw5VCHi2jYCWSyrMP8CAX36jN X-Google-Smtp-Source: AGHT+IFzO88TiQZvvR1RSgjLG+kJSIf9RBrjVt85zV7I7wOEcwxBohUbT14MF5LIuHsySdmd6pVnow== X-Received: by 2002:a05:6a20:258c:b0:1e1:a693:d623 with SMTP id adf61e73a8af0-1e5e04994fcmr53783134637.25.1735402010712; Sat, 28 Dec 2024 08:06:50 -0800 (PST) Original-Received: from LAPTOP-ACR66VVN (139-218-25-158.sta.wbroadband.net.au. [139.218.25.158]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8dbbabsm16956570b3a.101.2024.12.28.08.06.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2024 08:06:50 -0800 (PST) In-Reply-To: (Jean Louis's message of "Sat, 28 Dec 2024 16:43:19 +0300") Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=joel.reicher@gmail.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:149047 Archived-At: Jean Louis writes: > * Joel Reicher [2024-12-28 06:46]: >> But if you're not designing the syntax and you want to find=20 >> something that will do an existing syntax, possibly the=20 >> simplest is Lisp itself since Lisp has all these operators and=20 >> is homoiconic. If the query syntax is Lisp, the string can be=20 >> passed to read and eval and you're done, I think. > > I would not like eval-ing on remote server for some reasons =F0=9F=A4=94. Solving a search query is an eval, but I think you are saying you=20 want to avoid code injection which is fair enough. Off the top of my head you can map over the sexpr returned by read=20 and rewrite the symbols to ones you control before evaling. In my opinion it is still worth avoiding a parse, which is what=20 Lisp can give you. Regards, - Joel