unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Sergio Durigan Junior <sergiodj@riseup.net>
Cc: 11580@debbugs.gnu.org, winkler@gnu.org, emacs-devel@gnu.org
Subject: bug#11580: [PATCH] Fix bug #11580
Date: Wed, 26 Sep 2012 20:56:16 +0200	[thread overview]
Message-ID: <87fw64ehpr.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <m3ipb0r6kf.fsf@riseup.net> (Sergio Durigan Junior's message of "Wed, 26 Sep 2012 15:18:40 -0300")

Sergio Durigan Junior <sergiodj@riseup.net> writes:

Hi Sergio,

> WDYT of the new patch below?

--8<---------------cut here---------------start------------->8---
=== modified file 'lisp/net/eudcb-bbdb.el'
--- lisp/net/eudcb-bbdb.el	2012-01-19 07:21:25 +0000
+++ lisp/net/eudcb-bbdb.el	2012-09-26 18:14:52 +0000
@@ -166,7 +166,7 @@
 				  (symbol-name attr)))
 			 'record))))
        (t
-	(setq val "Unknown BBDB attribute")))
+	(error "Unknown BBDB attribute")))
       (if val
 	(cond
 	 ((memq attr '(phones addresses))
@@ -176,6 +176,8 @@
 	  (setq eudc-rec (cons (cons attr (car val)) eudc-rec)))
 	 ((> (length val) 0)
 	  (setq eudc-rec (cons (cons attr val) eudc-rec)))
+	 ((and (not (listp val)) (string= val ""))
+	  nil) ; Do nothing
 	 (t
 	  (error "Unexpected attribute value")))))
     (nreverse eudc-rec)))
--8<---------------cut here---------------end--------------->8---

In the second hunk, the (not (listp val)) is not needed.  If val was a
list, it would have entered one of the two preceeding clauses, but
that's just nitpicking.

Anyway, only Roland knows exactly what's the right fix for the issue, so
he should decide what to do.

Bye,
Tassilo





      parent reply	other threads:[~2012-09-26 18:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87ipb64w5x.fsf@riseup.net>
2012-09-26 17:54 ` bug#11580: [PATCH] Fix bug #11580 Tassilo Horn
2012-09-29 12:04   ` Roland Winkler
     [not found]   ` <87d3152fxd.fsf@gnu.org>
2012-09-29 19:30     ` Sergio Durigan Junior
     [not found]     ` <m3pq54hbj1.fsf@riseup.net>
     [not found]       ` <20584.24939.541992.925590@gargle.gargle.HOWL>
2012-05-29  5:14         ` bug#11580: 23.3; EUDC can't handle empty last names in BBDB Sergio Durigan Junior
     [not found]           ` <handler.11580.B.133834110724596.ack@debbugs.gnu.org>
2012-07-12  2:00             ` bug#11580: Acknowledgement (23.3; EUDC can't handle empty last names in BBDB) Sergio Durigan Junior
2012-07-12 14:37               ` Stefan Monnier
2012-10-02  1:46           ` bug#11580: [PATCH] Fix bug #11580 Sergio Durigan Junior
     [not found]         ` <87d3113ass.fsf@riseup.net>
2012-10-02  1:58           ` Roland Winkler
2012-10-02  2:50             ` Sergio Durigan Junior
2012-10-02  3:59           ` Stefan Monnier
2012-10-02  5:10           ` Chong Yidong
2012-09-30 15:12       ` Roland Winkler
     [not found] ` <87mx0c655g.fsf@thinkpad.tsdh.de>
2012-09-26 18:18   ` Sergio Durigan Junior
     [not found]   ` <m3ipb0r6kf.fsf@riseup.net>
2012-09-26 18:56     ` Tassilo Horn [this message]

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=87fw64ehpr.fsf@thinkpad.tsdh.de \
    --to=tsdh@gnu.org \
    --cc=11580@debbugs.gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=sergiodj@riseup.net \
    --cc=winkler@gnu.org \
    /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).