unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thomas Fitzsimmons <fitzsim@fitzsim.org>
To: kjonca@poczta.onet.pl (Kamil Jońca)
Cc: 11211@debbugs.gnu.org
Subject: bug#11211: 23.3; Gnus - eudc/ldap - inline expansion does not work
Date: Sun, 14 Dec 2014 20:35:24 -0500	[thread overview]
Message-ID: <m3sigh7l0j.fsf@fitzsim.org> (raw)
In-Reply-To: <87d2zowhb2.fsf@alfa.kjonca> ("Kamil \=\?utf-8\?Q\?Jo\=C5\=84ca\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 08 Nov 2012 10:54:41 +0100")

kjonca@poczta.onet.pl (Kamil Jońca) writes:

> Glenn Morris <rgm@gnu.org> writes:
>
>> Kamil Jońca wrote:
>>
>>> Debugger entered--Lisp error: (error "No match")
>>>   signal(error ("No match"))
>>>   (condition-case signal (progn (setq response ...) (if ... ... ... ... ...) (or ... ...)) (error (or ... ...) (signal ... ...)))
>>>   (let* ((end ...) (beg ...) (query-words ...) query-formats
>>> response response-string response-strings (eudc-former-server
>>> eudc-server) (eudc-former-protocol eudc-protocol) servers) (setq
>>> servers (copy-sequence eudc-server-hotlist)) (setq servers (cond
>>> ... ... ... ...)) (if (and eudc-max-servers-to-query ...) (setcdr
>>> ... nil)) (condition-case signal (progn ... ... ...) (error
>>> ... ...)))
>>>   eudc-expand-inline()
>>
>> I'm afraid that's not much more informative. There are some variables
>> you can set so that the lists don't get abbreviated, but I forget
>> precisely which ones they are. Anyway, a full backtrace probably isn't
>> going to help too much. All that happens is that it fails to find a
>> match for some reason.
>>
>> I'm afraid I have no idea how to configure eudc so that I can test this
>> myself, and I don't have any ldap servers to test it with anyway.
>>
>> If you can use edebug, you might try looking into this more yourself.
>> If as you say it works in other contexts, then the problem may be
>> something simple like it not extracting the correct string from the
>> buffer in the first place.
>>
> I noticed by accident that it related to
> (eudc-inline-expansion-format)
>
> with its default setting
> ("%s" email)
> inline expansion seems to work
> But i prefer to expand entries to something like
>
> Kamil Jońca <kjonca@gmail.com>
> and with setting ("%s %s <%s>" firstname name email)
> this does not work.
> Am I missing something with setting this variable?
> KJ

Can you try running ldapsearch on the command-line, with the same
arguments that you see in the strace output?

One possibility is that the server is returning results that contain
LDAP attribute names that Emacs is not expecting.

The relevant code is in lisp/net/eudc.el:

   [...]
   ;; Loop on query-formats
   (while query-formats
     (setq response
           (eudc-query
            (eudc-format-query query-words (car query-formats))
            (eudc-translate-attribute-list
             (cdr eudc-inline-expansion-format))))
     (if response
         (throw 'found response))
     (setq query-formats (cdr query-formats)))
   [...]

If I hard-code a wrong value list in place of:

   (eudc-translate-attribute-list
    (cdr eudc-inline-expansion-format))

(I tried '(givenname sk mail)), then inline expansion fails with "No
match", but form expansion still works.

eudc-translate-attribute-list converts the inline expansion format based
on the attribute values in eudc-ldap-attributes-translation-alist:

   (defvar eudc-ldap-attributes-translation-alist
     '((name . sn)
       (firstname . givenname)
       (email . mail)
       (phone . telephonenumber))
     "Alist mapping EUDC attribute names to LDAP names.")

See if there are differences between sn, givenname, and the attribute
values you see in the command line output.

Thomas





  reply	other threads:[~2014-12-15  1:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10  8:49 bug#11211: 23.3; Gnus - eudc/ldap - inline expansion does not work Kamil Jo=144ca
2012-04-11 18:06 ` Glenn Morris
2012-04-11 18:46   ` Kamil Jońca
2012-04-13  4:11     ` Glenn Morris
2012-11-08  9:54       ` Kamil Jońca
2014-12-15  1:35         ` Thomas Fitzsimmons [this message]
2015-03-09  1:56         ` Thomas Fitzsimmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3sigh7l0j.fsf@fitzsim.org \
    --to=fitzsim@fitzsim.org \
    --cc=11211@debbugs.gnu.org \
    --cc=kjonca@poczta.onet.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).