From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#58605: 29.0.50; Commit 2a2f5530fa2 breaks ldap-search-internal Date: Thu, 20 Oct 2022 11:12:04 +0300 Organization: LINKOV.NET Message-ID: <86fsfidgyr.fsf@mail.linkov.net> References: <87wn8xr7i6.fsf@wi.uni-muenster.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6373"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 58605@debbugs.gnu.org, Filipp Gunbin To: Jens Lechtenboerger Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 20 10:44:42 2022 Return-path: Envelope-to: geb-bug-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 1olRAM-0001N2-SV for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Oct 2022 10:44:38 +0200 Original-Received: from localhost ([::1]:53814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olRAL-0008SS-7S for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Oct 2022 04:44:37 -0400 Original-Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olRAJ-0008CD-3m for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Oct 2022 04:44:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olR9n-0008C2-W9 for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2022 04:44:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olR9m-0002e5-M5 for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2022 04:44:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1olR9m-0006Dt-Ag for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2022 04:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Oct 2022 08:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58605 X-GNU-PR-Package: emacs Original-Received: via spool by 58605-submit@debbugs.gnu.org id=B58605.166625542123885 (code B ref 58605); Thu, 20 Oct 2022 08:44:02 +0000 Original-Received: (at 58605) by debbugs.gnu.org; 20 Oct 2022 08:43:41 +0000 Original-Received: from localhost ([127.0.0.1]:32924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olR9N-0006D6-Ef for submit@debbugs.gnu.org; Thu, 20 Oct 2022 04:43:41 -0400 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:43347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olR9G-0006Co-V0 for 58605@debbugs.gnu.org; Thu, 20 Oct 2022 04:43:35 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id C605EFF802; Thu, 20 Oct 2022 08:43:20 +0000 (UTC) In-Reply-To: <87wn8xr7i6.fsf@wi.uni-muenster.de> (Jens Lechtenboerger's message of "Tue, 18 Oct 2022 08:05:53 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245928 Archived-At: > commit 2a2f5530fa230e2b994be5683e63763833bb6a0a breaks > ldap-search-internal for searches with empty results. I confirm that ldap search is broken. When the output contains for example: dn: cn=admin,dc=example,dc=com then it raises the error: insert-file-contents: Opening input file: No such file or directory, ~/cn=admin,dc=example,dc=com > The added “?” should be removed there again: > > @@ -699,7 +699,7 @@ ldap-search-internal > (forward-line 1) > (while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\ > \\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\ > -\\(<[\t ]*file://\\)\\(.*\\)$") > +\\(<[\t ]*file://\\)?\\(.*\\)$") > (setq name (match-string 1) > value (match-string 4)) > ;; Need to handle file:///D:/... as generated by OpenLDAP Removing “?” doesn't fix the problem because then nil is returned even in case when there are results. I guess this whole block (with-current-buffer bufval (erase-buffer) (set-buffer-multibyte nil) (insert-file-contents-literally value) (delete-file value) (setq value (buffer-string))) should be executed only on a condition that checks that value contains "file://".