From: Tollef Fog Heen Date: Fri, 1 Aug 2008 10:56:45 +0000 (+0200) Subject: Give error message when no matching records are found X-Git-Tag: 0.1~11 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea7fc45044ee3da60f07d47cf83bf9bcb7aa7c23;p=eweouz Give error message when no matching records are found --- diff --git a/lisp/eweouz.el b/lisp/eweouz.el index 70ff29b..216f569 100644 --- a/lisp/eweouz.el +++ b/lisp/eweouz.el @@ -62,11 +62,13 @@ (eweouz-search-do '(lambda (x) (add-to-list 'match-recs x)) typed) (message (format "%s" match-recs)) (message (format "%d" (length match-recs))) - (cond ((= 1 (length match-recs)) + (cond ((= 0 (length match-recs)) + (message "No matching records")) + ((= 1 (length match-recs) ; Just one match; insert it (progn (delete-region beg end) - (insert (vcard-format-sample-get-name (car match-recs))))) + (insert (vcard-format-sample-get-name (car match-recs)))))) ((< 1 (length match-recs)) ;; For now, just display the records and leave the user to ;; complete