From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t Date: Sun, 18 Jun 2023 11:56:11 +0300 Message-ID: <831qi9p2s4.fsf@gnu.org> References: <83cz1usk0i.fsf@gnu.org> <83legiqy3x.fsf@gnu.org> <83h6r6qwxh.fsf@gnu.org> <704ffb16-a822-8fed-6d63-4d9fc9a2b16e@vodafonemail.de> <7bc4f6cf-bd37-c7d6-6253-db5f82099e1e@vodafonemail.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36890"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64089@debbugs.gnu.org, fgunbin@fastmail.fm, monnier@iro.umontreal.ca To: Jens Schmidt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 18 10:57:18 2023 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 1qAoDl-0009P5-5c for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Jun 2023 10:57:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAoDY-0007Qk-Gw; Sun, 18 Jun 2023 04:57:04 -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 1qAoDW-0007QY-Ll for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 04:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAoDW-0004s8-Di for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 04:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAoDW-0005OT-9J for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 04:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Jun 2023 08:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64089 X-GNU-PR-Package: emacs Original-Received: via spool by 64089-submit@debbugs.gnu.org id=B64089.168707857720677 (code B ref 64089); Sun, 18 Jun 2023 08:57:02 +0000 Original-Received: (at 64089) by debbugs.gnu.org; 18 Jun 2023 08:56:17 +0000 Original-Received: from localhost ([127.0.0.1]:53187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAoCn-0005NQ-5F for submit@debbugs.gnu.org; Sun, 18 Jun 2023 04:56:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAoCl-0005NF-9x for 64089@debbugs.gnu.org; Sun, 18 Jun 2023 04:56:16 -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 1qAoCg-0004dD-1d; Sun, 18 Jun 2023 04:56:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=YMHGyBbL177XWzAs5cfmYE5olou8oVxmTOvzmz6u0Xg=; b=Hew+U8+XbAI9 5cI2UoIGfMM25u6KRTmIWbDdQboLFXd20AFNmuXY3RwJ250phAvbjDzgfarKuZUyVkRc6Jd5d85pc I0E067xoRfY+hy9K+i3FXZ9uKgjNbgmwIRfwfyiAQNwHhGw/ngAVgkdYsTfXdpgSpDYqBQDEwwgp4 QYwzXXtlW3dVVu/GElYgFBMr4KM65keyvbtX3Z+zbFaprHIocZ6N59GW55SMMLDdN10tSAMTZt9F7 ojy8dsFe+fOqX01NoPhstbyhGyk+Cbm6sDJ0E0glmzJf1YZGC9u/nrfud5FRLWYSh8hXooDpHLUdX QemdDY4tCvslUKIP8XKFew==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAoCf-0003mM-Fn; Sun, 18 Jun 2023 04:56:09 -0400 In-Reply-To: <7bc4f6cf-bd37-c7d6-6253-db5f82099e1e@vodafonemail.de> (message from Jens Schmidt on Sun, 18 Jun 2023 10:51:25 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263614 Archived-At: > Date: Sun, 18 Jun 2023 10:51:25 +0200 > From: Jens Schmidt > Cc: 64089@debbugs.gnu.org, monnier@iro.umontreal.ca > > On 2023-06-18 09:43, Jens Schmidt wrote: > > > Or whatever. In any case, I'll open a new bug for that to continue > > this discussion. > > And of course, Filipp is right w.r.t. to API consistency. TBH, I simply > haven't payed attention to `ldap-ignore-attribute-codings' until > recently. So for emacs-29, I can provide a patch that backs out my > previous patch and fixes the bug such that the *original/Gerd's* string > > "dn: cn=JENS_SCHMIDT,L=REGION,DC=COMPANY,DC=COM" > > gets appended to the result w/o triggering the > > wrong-type-argument listp > > for both `ldap-ignore-attribute-codings' equaling nil and non-nil. > > Basicaly the upper half of Filipp's patch, but redone such that even I > understand it without too much eye-balling :-). Like this probably (not > tested yet!): > > (cond > (ldap-ignore-attribute-codings > result) > (withdn > ;; Do not process first elements of the records > ;; with `ldap-decode-attribute' (Bug#64089). > (mapcar (lambda (record) > (cons (car record) > (mapcar #'ldap-decode-attribute > (cdr record))) > result))) > (t > (mapcar (lambda (record) > (mapcar #'ldap-decode-attribute record)) > result)))) > > WDYT? I'm uncomfortable with non-trivial changes, so if this is anywhere like Filipp's proposal, I'd rather leave it unfixed on emacs-29.