[elpa] externals/ebdb f133aef 03/13: Docstring fix for ebdb-mail

2019-01-15 Thread Eric Abrahamsen
branch: externals/ebdb
commit f133aef34c423b29fb6bebcabc12fcb36dc4d5d4
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Docstring fix for ebdb-mail

* ebdb-com.el (ebdb-mail): Use automated documentation tools.
---
 ebdb-com.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 82c42f9..a4fe984 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -2369,8 +2369,7 @@ If ARG (interactively, the prefix arg) is nil, use the 
primary
 mail address of each record.  If it is t, prompt the user for
 which address to use.
 
-Another approach is to put point on a mail field and press \"a\",
-for `ebdb-field-action'."
+\\Another approach is to put point on a mail field and press 
\\[ebdb-record-action]."
   (interactive (list (ebdb-do-records) nil
  current-prefix-arg))
   (setq records (ebdb-record-list records))



[elpa] externals/ebdb eec63c8 07/13: Provide basic HTML5 freeform formatter

2019-01-15 Thread Eric Abrahamsen
branch: externals/ebdb
commit eec63c8b39fb0d7d57391fcc1d82c3dd1d3c001c
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Provide basic HTML5 freeform formatter

* ebdb-html.el (ebdb-html-formatter-html5): New class, uses definition
  lists for field instances.
  (ebdb-html-default-formatter-html5): New option.
---
 ebdb-html.el | 68 +---
 1 file changed, 65 insertions(+), 3 deletions(-)

diff --git a/ebdb-html.el b/ebdb-html.el
index 440b7c2..6a85ef1 100644
--- a/ebdb-html.el
+++ b/ebdb-html.el
@@ -33,11 +33,68 @@
   :group 'ebdb)
 
 (defclass ebdb-html-formatter (ebdb-formatter)
-  nil
+  ((post-format-function :initform #'html-mode))
   :abstract t
   :documentation "Formatter responsible for HTML-specific field
   formatting.")
 
+(defclass ebdb-html-formatter-html5 (ebdb-html-formatter
+ebdb-formatter-freeform)
+  ((header :initform '((ebdb-record-person ebdb-field-notes
+  :documentation "HTML formatter for \"block-style\" HTML
+  formatting.")
+
+(cl-defmethod ebdb-fmt-record :around ((_fmt ebdb-html-formatter-html5)
+  (rec ebdb-record))
+  (concat
+   "\n"
+   (cl-call-next-method)
+   "\n\n"))
+
+(cl-defmethod ebdb-fmt-record-header ((fmt ebdb-html-formatter-html5)
+ (rec ebdb-record)
+ header-fields)
+  (concat
+   "\n"
+   (format "%s\n" (ebdb-record-name rec))
+   (mapconcat
+(pcase-lambda ((map style inst class))
+  (format "%s" (mapconcat (lambda (f) (ebdb-fmt-field fmt f style 
rec)) inst ", ")))
+header-fields
+"\n")
+   "\n"))
+
+(cl-defmethod ebdb-fmt-compose-fields ((fmt ebdb-html-formatter-html5)
+  (rec ebdb-record)
+  &optional field-list _depth)
+  (when field-list
+(let ((field-pairs
+  (mapcar
+   (pcase-lambda ((map style inst class))
+ ;; Field labels,
+ (cons (ebdb-fmt-field-label
+fmt
+(if (= 1 (length inst))
+(car inst)
+  class)
+style
+rec)
+   ;; and fields.
+   (mapconcat
+#'identity
+(mapcar (lambda (f)
+  (ebdb-fmt-field fmt f style rec))
+inst)
+", ")))
+   field-list)))
+  (concat
+   "\n"
+   (mapconcat
+   (pcase-lambda (`(,label . ,field))
+ (format "%s%s" label field))
+   field-pairs "\n")
+   "\n"
+
 (cl-defmethod ebdb-fmt-field ((_fmt ebdb-html-formatter)
  (field ebdb-field-mail)
  _style
@@ -49,8 +106,7 @@
   ebdb-html-formatter)
   ;; We put the  elements in manually.
   ((record-separator :initform "")
-   (field-separator :initform "")
-   (post-format-function :initform #'html-mode)))
+   (field-separator :initform "")))
 
 (defcustom ebdb-html-default-formatter-tabular
   (make-instance 'ebdb-html-formatter-tabular
@@ -58,6 +114,12 @@
 :fields '(mail-primary))
   "The default HTML table formatter.")
 
+(defcustom ebdb-html-default-formatter-html5
+  (make-instance 'ebdb-html-formatter-html5
+:label "html5 block"
+:include '(mail-primary ebdb-field-phone ebdb-field-address 
ebdb-field-notes))
+  "The default HTML5 block formatter.")
+
 (cl-defmethod ebdb-fmt-header ((fmt ebdb-html-formatter-tabular)
   _records)
   (with-slots (fields) fmt



[elpa] externals/ebdb 3cba3d7 01/13: Rejigger insertion of newlines in record formatting

2019-01-15 Thread Eric Abrahamsen
branch: externals/ebdb
commit 3cba3d7405127169034d226aad95dc21654fbffc
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Rejigger insertion of newlines in record formatting

* ebdb-com.el (ebdb-fmt-record, ebdb-fmt-record-header,
  ebdb-fmt-compose-fields): Fairly classic error re making sure there
  are always newlines in the right place.
---
 ebdb-com.el | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 471786b..82c42f9 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -688,7 +688,8 @@ Print the first line, add an ellipsis, and add a tooltip."
fmt record))
 (concat
  (ebdb-fmt-record-header fmt record header-fields)
- (ebdb-fmt-compose-fields fmt record body-fields 1
+ (ebdb-fmt-compose-fields fmt record body-fields 1)
+ "\n")))
 
 (cl-defmethod ebdb-fmt-record-header ((fmt ebdb-formatter-ebdb)
  (record ebdb-record)
@@ -716,6 +717,11 @@ Print the first line, add an ellipsis, and add a tooltip."
   inst " "))
  header-fields " "))
 
+(cl-defmethod ebdb-fmt-record-header :around ((fmt 
ebdb-formatter-ebdb-multiline)
+ (record ebdb-record)
+ &optional header-fields)
+  (concat (cl-call-next-method) "\n"))
+
 (cl-defmethod ebdb-fmt-compose-fields ((fmt ebdb-formatter-ebdb-multiline)
   (record ebdb-record)
   &optional
@@ -760,7 +766,6 @@ string."
   (fill-column (window-body-width)))
   (with-current-buffer (get-buffer-create "format test")
(erase-buffer)
-   (insert "\n")
(mapc
 (pcase-lambda (`(,label . ,fields))
   (let ((start (point)))
@@ -784,7 +789,6 @@ string."
  (when ebdb-fill-field-values
(fill-region start (point))
 field-pairs)
-   (insert "\n")
(buffer-string)
 
 (cl-defmethod ebdb-fmt-compose-fields ((fmt ebdb-formatter-ebdb-oneline)
@@ -797,8 +801,7 @@ string."
   (mapconcat (pcase-lambda ((map inst style))
   (mapconcat (lambda (f) (ebdb-fmt-field fmt f style record))
  inst " "))
-field-list ", ")))
-   "\n"))
+field-list ", ")
 
 (cl-defgeneric ebdb-make-buffer-name (&context (major-mode t))
   "Return the buffer to be used by EBDB.



[elpa] externals/ebdb 4625970 11/13: Move map require from ebdb-com.el to ebdb.el

2019-01-15 Thread Eric Abrahamsen
branch: externals/ebdb
commit 4625970119ca8d730da3a32ff6a65960ce079d81
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Move map require from ebdb-com.el to ebdb.el

Fixes #73 (I hope)

* ebdb.el: The map patterns are also used in ebdb-format.el, need to
  require them top-level.
---
 ebdb-com.el | 1 -
 ebdb.el | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 65b49ca..7f5f0b1 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -28,7 +28,6 @@
 (require 'ebdb)
 (require 'ebdb-format)
 (require 'mailabbrev)
-(require 'map)
 
 (eval-and-compile
   (autoload 'build-mail-aliases "mailalias")
diff --git a/ebdb.el b/ebdb.el
index db3b0d2..ae3fed4 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -45,6 +45,7 @@
 (require 'timezone)
 (require 'cl-lib)
 (require 'seq)
+(require 'map)
 (require 'calendar)
 (require 'subr-x)
 (require 'pcase)



[elpa] externals/ebdb 5ef1773 04/13: Allow overwriting of previous formatting buffers

2019-01-15 Thread Eric Abrahamsen
branch: externals/ebdb
commit 5ef17739148034c32edab7e0f3111e7659a666b3
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Allow overwriting of previous formatting buffers

* ebdb-com.el (ebdb-format-to-tmp-buffer): This was the point of
  giving different formatters their own buffer name -- we /should/
  overwrite previous formatting buffers of the same type. Users can
  save them if they've got what they want.
---
 ebdb-com.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index a4fe984..5032302 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -3025,7 +3025,7 @@ message."
   (interactive
(list (ebdb-prompt-for-formatter)
 (ebdb-do-records)))
-  (let ((buf (generate-new-buffer
+  (let ((buf (get-buffer-create
  (slot-value formatter 'format-buffer-name)))
(fmt-coding (slot-value formatter 'coding-system))
(ebdb-p (object-of-class-p formatter 'ebdb-formatter-ebdb)))



[elpa] externals/ebdb 4f4596c 12/13: Re-absorb ebdb-counsel into main package

2019-01-15 Thread Eric Abrahamsen
branch: externals/ebdb
commit 4f4596c48a6c82eedc0e72ca795feddf1a2c9c5e
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Re-absorb ebdb-counsel into main package

* ebdb-counsel.el: Contains function ebdb-counsel. Preparatory to
  deleting separate counsel-ebdb package.
---
 ebdb-counsel.el | 65 +
 1 file changed, 65 insertions(+)

diff --git a/ebdb-counsel.el b/ebdb-counsel.el
new file mode 100644
index 000..8423dbe
--- /dev/null
+++ b/ebdb-counsel.el
@@ -0,0 +1,65 @@
+;;; ebdb-counsel.el --- Counsel integration for EBDB  -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2019  Free Software Foundation, Inc.
+
+;; Author: Eric Abrahamsen 
+;; Maintainer: Eric Abrahamsen 
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see .
+
+;;; Commentary:
+
+;; Counsel/ivy integration for EBDB.
+
+;;; Code:
+
+(require 'ebdb)
+
+(declare-function 'ivy-read "ext:ivy")
+
+;;;###autoload
+(defun ebdb-counsel ()
+  "Select EBDB contacts using the ivy/counsel interface."
+  (interactive)
+  (ivy-read
+   "Records: "
+   (mapcar
+;; This same lambda is used in helm-ebdb, refactor or maybe even
+;; make customizable.  Presumably we could use the :matcher
+;; argument to provide a function that matched the name and mail
+;; strings, but then you wouldn't actually see the mail strings in
+;; the completion window, would you?
+(lambda (rec)
+  (let* ((rec-string (ebdb-string rec))
+(mails (ebdb-record-mail-canon rec))
+(mail-list (when mails
+ (mapconcat #'identity
+mails
+" "
+   (cons (if mail-list
+ (concat rec-string
+ " => "
+ mail-list)
+   rec-string)
+ rec)))
+(ebdb-records))
+   :action
+   '(1
+ ("o" (lambda (r)
+   (ebdb-display-records (list (cdr r)) nil t)) "display")
+ ("m" (lambda (r) (ebdb-mail (cdr r))) "send mail")
+ ("i" (lambda (r) (ebdb-cite-records-mail (cdr r))) "insert"
+
+(provide 'ebdb-counsel)
+;;; ebdb-counsel.el ends here



[elpa] externals/ebdb adb60dd 05/13: Refactor formatter classes, add tabular formatters

2019-01-15 Thread Eric Abrahamsen
branch: externals/ebdb
commit adb60ddd0f4aca355eb88d44dd4dfb7dec8c6d15
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Refactor formatter classes, add tabular formatters

* ebdb-format.el (ebdb-formatter-freeform, ebdb-formatter-constrained,
  ebdb-formatter-tabular): New formatter classes separating out
  different behavior.
  (ebdb-fmt-field-label): Make the record argument optional.
  (ebdb-formatter-csv): CSV formatter.
  (ebdb-default-csv-formatter): New option.
* ebdb-com.el (ebdb-formatter-ebdb): The EBDB formatter inherits from
  ebdb-formatter-freeform.
* ebdb-org.el (ebdb-org-formatter-tabular): Add Org table formatter.
  (ebdb-org-default-tabular-formatter): New option.
* ebdb-latex.el (ebdb-latex-formatter-tabular): Latex table formatter.
  (ebdb-latex-default-tabular-formatter): New option.
* ebdb-html.el (ebdb-html-formatter-tabular): HTML table formatter.
  (ebdb-html-default-formatter-tabular): New option.
---
 ebdb-com.el|   5 +-
 ebdb-format.el | 200 +
 ebdb-html.el   | 100 +
 ebdb-latex.el  |  84 
 ebdb-org.el|  57 +++-
 5 files changed, 416 insertions(+), 30 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 5032302..32e5bad 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -396,7 +396,7 @@ position-marker mark)."
 
 ;;; *EBDB* formatting
 
-(defclass ebdb-formatter-ebdb (ebdb-formatter)
+(defclass ebdb-formatter-ebdb (ebdb-formatter-freeform)
   ;; This post-format-function only comes into play when the user
   ;; chooses the EBDB format in `ebdb-format-to-tmp-buffer'.
   ((post-format-function
@@ -538,18 +538,21 @@ choice: that formatter should be selected explicitly."
 (cl-defmethod ebdb-fmt-field-label :around ((_fmt ebdb-formatter-ebdb)
_field
_style
+   &optional
(_record ebdb-record))
   (propertize (cl-call-next-method) 'face 'ebdb-label))
 
 (cl-defmethod ebdb-fmt-field-label ((_fmt ebdb-formatter-ebdb)
(field ebdb-field-phone)
(_style (eql oneline))
+   &optional
(_record ebdb-record))
   (format "phone (%s)" (ebdb-field-label field)))
 
 (cl-defmethod ebdb-fmt-field-label ((_fmt ebdb-formatter-ebdb)
(field ebdb-field-address)
(_style (eql oneline))
+   &optional
(_record ebdb-record))
   (format "address (%s)" (ebdb-field-label field)))
 
diff --git a/ebdb-format.el b/ebdb-format.el
index c05551d..4435512 100644
--- a/ebdb-format.el
+++ b/ebdb-format.el
@@ -74,11 +74,18 @@
 :initform `,buffer-file-coding-system
 :documentation "The coding system for the formatted
 file/buffer/stream.")
-   ;; The elements of the next two slots, besides field class symbols,
-   ;; can also use some shortcut symbols: mail, phone, address, notes,
-   ;; tags, role, mail-primary, mail-defunct, mail-not-defunct,
-   ;; role-defunct, and role-not-defunct.
-   (include
+   (post-format-function
+:type (or null function)
+:initarg :post-format-function
+:initform nil
+:documentation "A function to be called after formatting is
+complete.  Probably a major mode."))
+  :abstract t
+  :documentation "Abstract base class for EBDB formatters.
+  Subclass this to produce real formatters.")
+
+(defclass ebdb-formatter-freeform (ebdb-formatter)
+  ((include
 :type list
 :initarg :include
 :initform nil
@@ -97,13 +104,6 @@
 :documentation "How field instances should be sorted.  Field
 classes should be listed in their proper sort order.  A \"_\"
 placeholder indicates where all other fields should go." )
-   (header
-:type list
-:initarg :header
-:initform  '((ebdb-record-person ebdb-field-role ebdb-field-image)
-(ebdb-record-organization ebdb-field-domain ebdb-field-image))
-:documentation "A list of field classes which will be output
-in the header of the record, grouped by record class type.")
(combine
 :type list
 :initarg :combine
@@ -119,15 +119,48 @@
 generally indicates that most of the field contents will
 hidden unless the user takes some action, such as clicking or
 hitting .  (Currently unimplemented.)")
-   (post-format-function
-:type (or null function)
-:initarg :post-format-function
+   (header
+:type list
+:initarg :header
+:initform  '((ebdb-record-person ebdb-field-role ebdb-field-image)
+(ebdb-record-organization ebdb-field-domain ebdb-field-image))
+:documentation "A list of field classes which wi

[elpa] externals/ebdb cbaa04b 10/13: Fix compose fields for the HTML5 freeform formatter

2019-01-15 Thread Eric Abrahamsen
branch: externals/ebdb
commit cbaa04b15417f84be2ce25446e5a894bb76e
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Fix compose fields for the HTML5 freeform formatter

* ebdb-html.el (ebdb-fmt-compose-fields): This didn't need to be so
  complicated; also you're allowed to have multiple  elements for
  a single  element.
---
 ebdb-html.el | 46 --
 1 file changed, 20 insertions(+), 26 deletions(-)

diff --git a/ebdb-html.el b/ebdb-html.el
index 6a85ef1..5d423b4 100644
--- a/ebdb-html.el
+++ b/ebdb-html.el
@@ -67,33 +67,27 @@
 (cl-defmethod ebdb-fmt-compose-fields ((fmt ebdb-html-formatter-html5)
   (rec ebdb-record)
   &optional field-list _depth)
+  "This particular implementation uses description lists ()."
   (when field-list
-(let ((field-pairs
-  (mapcar
-   (pcase-lambda ((map style inst class))
- ;; Field labels,
- (cons (ebdb-fmt-field-label
-fmt
-(if (= 1 (length inst))
-(car inst)
-  class)
-style
-rec)
-   ;; and fields.
-   (mapconcat
-#'identity
-(mapcar (lambda (f)
-  (ebdb-fmt-field fmt f style rec))
-inst)
-", ")))
-   field-list)))
-  (concat
-   "\n"
-   (mapconcat
-   (pcase-lambda (`(,label . ,field))
- (format "%s%s" label field))
-   field-pairs "\n")
-   "\n"
+(concat
+ "\n"
+ (mapconcat
+  (pcase-lambda ((map style inst class))
+   (concat
+(format "%s" (ebdb-fmt-field-label
+   fmt
+   (if (= 1 (length inst))
+   (car inst)
+ class)
+   style
+   rec))
+(mapconcat
+ (lambda (f)
+   (format "%s" (ebdb-fmt-field fmt f style rec)))
+ inst
+ "\n")))
+  field-list "\n")
+ "\n")))
 
 (cl-defmethod ebdb-fmt-field ((_fmt ebdb-html-formatter)
  (field ebdb-field-mail)



[elpa] externals/ebdb 7a19553 06/13: Shift base ebdb-fmt-record implementation to ebdb-formatter-freeform

2019-01-15 Thread Eric Abrahamsen
branch: externals/ebdb
commit 7a195530ade609e04122738dd68b4a3c0c148ff1
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Shift base ebdb-fmt-record implementation to ebdb-formatter-freeform

* ebdb-com.el (ebdb-fmt-record): This behavior is common to most
  freeform formatters.
* ebdb-format.el (ebdb-fmt-record): So define it here.
---
 ebdb-com.el| 23 +--
 ebdb-format.el | 24 
 2 files changed, 25 insertions(+), 22 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 32e5bad..65b49ca 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -671,28 +671,7 @@ Print the first line, add an ellipsis, and add a tooltip."
 
 (cl-defmethod ebdb-fmt-record ((fmt ebdb-formatter-ebdb)
   (record ebdb-record))
-  (pcase-let* ((header-classes (cdr (assoc (eieio-object-class-name record)
-  (slot-value fmt 'header
-  ((map header-fields body-fields)
-   (seq-group-by
-(lambda (f)
-  ;; FIXME: Consider doing the header/body split in
-  ;; `ebdb-fmt-process-fields', we've already got the
-  ;; formatter there.
-  (if (ebdb-foo-in-list-p (alist-get 'class f)
-  header-classes)
-  'header-fields
-'body-fields))
-(ebdb-fmt-process-fields
- fmt record
- (ebdb-fmt-sort-fields
-  fmt record
-  (ebdb-fmt-collect-fields
-   fmt record))
-(concat
- (ebdb-fmt-record-header fmt record header-fields)
- (ebdb-fmt-compose-fields fmt record body-fields 1)
- "\n")))
+  (concat (cl-call-next-method) "\n"))
 
 (cl-defmethod ebdb-fmt-record-header ((fmt ebdb-formatter-ebdb)
  (record ebdb-record)
diff --git a/ebdb-format.el b/ebdb-format.el
index 4435512..8de3f1a 100644
--- a/ebdb-format.el
+++ b/ebdb-format.el
@@ -398,6 +398,30 @@ multiple instances in a single alist."
outlist)))
   (nreverse outlist
 
+(cl-defmethod ebdb-fmt-record ((fmt ebdb-formatter-freeform)
+  (record ebdb-record))
+  (pcase-let* ((header-classes (cdr (assoc (eieio-object-class-name record)
+  (slot-value fmt 'header
+  ((map header-fields body-fields)
+   (seq-group-by
+(lambda (f)
+  ;; FIXME: Consider doing the header/body split in
+  ;; `ebdb-fmt-process-fields', we've already got the
+  ;; formatter there.
+  (if (ebdb-foo-in-list-p (alist-get 'class f)
+  header-classes)
+  'header-fields
+'body-fields))
+(ebdb-fmt-process-fields
+ fmt record
+ (ebdb-fmt-sort-fields
+  fmt record
+  (ebdb-fmt-collect-fields
+   fmt record))
+(concat
+ (ebdb-fmt-record-header fmt record header-fields)
+ (ebdb-fmt-compose-fields fmt record body-fields 1
+
 ;; Tabular formatting
 
 (cl-defmethod ebdb-fmt-record ((fmt ebdb-formatter-tabular)



[elpa] externals/ebdb updated (3289ad4 -> 753c049)

2019-01-15 Thread Eric Abrahamsen
girzel pushed a change to branch externals/ebdb.

  from  3289ad4   Bump to 0.6.2
   new  3cba3d7   Rejigger insertion of newlines in record formatting
   new  980927f   Switch from cond to pcase in ebdb-record-field
   new  f133aef   Docstring fix for ebdb-mail
   new  5ef1773   Allow overwriting of previous formatting buffers
   new  adb60dd   Refactor formatter classes, add tabular formatters
   new  7a19553   Shift base ebdb-fmt-record implementation to 
ebdb-formatter-freeform
   new  eec63c8   Provide basic HTML5 freeform formatter
   new  65247f6   Make csv-mode dependency optional
   new  6dad4c1   Allow 'mail-primary as an argument to ebdb-record-field
   new  cbaa04b   Fix compose fields for the HTML5 freeform formatter
   new  4625970   Move map require from ebdb-com.el to ebdb.el
   new  4f4596c   Re-absorb ebdb-counsel into main package
   new  753c049   Bump to 0.6.3, flush recent changes


Summary of changes:
 ebdb-com.el |  43 ---
 ebdb-counsel.el |  65 
 ebdb-format.el  | 228 +---
 ebdb-html.el| 156 ++
 ebdb-latex.el   |  84 +
 ebdb-org.el |  57 +-
 ebdb.el |  36 +
 7 files changed, 594 insertions(+), 75 deletions(-)
 create mode 100644 ebdb-counsel.el
 create mode 100644 ebdb-html.el
 create mode 100644 ebdb-latex.el



[elpa] externals/ebdb 6dad4c1 09/13: Allow 'mail-primary as an argument to ebdb-record-field

2019-01-15 Thread Eric Abrahamsen
branch: externals/ebdb
commit 6dad4c1a16f69cdc3be6158508380f09f3940405
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Allow 'mail-primary as an argument to ebdb-record-field

* ebdb.el (ebdb-record-field): There will be more of these later, but
  I've already started using these in the new formatters, without
  having pushed this change.
---
 ebdb.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ebdb.el b/ebdb.el
index bfd8dcf..db3b0d2 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -4832,6 +4832,7 @@ also be one of the special symbols below.
  affix Return the list of affixes
  aka-all   Return the list of AKAs plus mail-akas.
  mail-aka  Return the list of name parts in mail addresses
+ mail-primary  Return the record's primary mail address
  mail-canonReturn the list of canonical mail addresses.")
 
 (cl-defmethod ebdb-record-field ((record ebdb-record)
@@ -4844,6 +4845,7 @@ also be one of the special symbols below.
 ;; Mail is special-cased, because mail addresses can come from
 ;; more than one slot.
 ('mail (ebdb-record-mail record nil nil t))
+('mail-primary (ebdb-record-one-mail record nil t))
 ('mail-aka (ebdb-record-mail-aka record)) ; derived (cached) field
 ('aka-all  (append (ebdb-record-aka record) ; derived field
   (ebdb-record-mail-aka record)))



[elpa] externals/ebdb 980927f 02/13: Switch from cond to pcase in ebdb-record-field

2019-01-15 Thread Eric Abrahamsen
branch: externals/ebdb
commit 980927ff3dfdb238e7b168f0088353fec29db86e
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Switch from cond to pcase in ebdb-record-field

* ebdb.el (ebdb-record-field): Preparatory to making this method more
  interesting.
---
 ebdb.el | 31 ---
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/ebdb.el b/ebdb.el
index 3e2e6b1..bfd8dcf 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -4836,21 +4836,22 @@ also be one of the special symbols below.
 
 (cl-defmethod ebdb-record-field ((record ebdb-record)
 (field symbol))
-  (cond ((eq field 'firstname) (ebdb-record-firstname record))
-   ((eq field 'lastname) (ebdb-record-lastname record))
-   ((eq field 'affix)(slot-value (slot-value record 'name) 'affix))
-   ((eq field 'mail-canon) (ebdb-record-mail-canon record)) ; derived 
(cached) field
-   ;; Mail is special-cased, because mail addresses can come from
-   ;; more than one slot.
-   ((eq field 'mail) (ebdb-record-mail record nil nil t))
-   ((eq field 'mail-aka) (ebdb-record-mail-aka record)) ; derived (cached) 
field
-   ((eq field 'aka-all)  (append (ebdb-record-aka record) ; derived field
- (ebdb-record-mail-aka record)))
-   ;; Otherwise assume it is a valid slot name.
-   (t
-(when (and (slot-exists-p record field)
-   (slot-boundp record field))
-  (slot-value record field)
+  (pcase field
+('firstname (ebdb-record-firstname record))
+('lastname (ebdb-record-lastname record))
+('affix(slot-value (slot-value record 'name) 'affix))
+('mail-canon (ebdb-record-mail-canon record)) ; derived (cached) field
+;; Mail is special-cased, because mail addresses can come from
+;; more than one slot.
+('mail (ebdb-record-mail record nil nil t))
+('mail-aka (ebdb-record-mail-aka record)) ; derived (cached) field
+('aka-all  (append (ebdb-record-aka record) ; derived field
+  (ebdb-record-mail-aka record)))
+;; Otherwise assume it is a valid slot name.
+(_
+ (when (and (slot-exists-p record field)
+   (slot-boundp record field))
+   (slot-value record field)
 
 (cl-defmethod ebdb-record-field ((record ebdb-record)
 (f-class (subclass ebdb-field-user)))



[elpa] externals/ebdb 753c049 13/13: Bump to 0.6.3, flush recent changes

2019-01-15 Thread Eric Abrahamsen
branch: externals/ebdb
commit 753c04976eee66285d4dc5e52803818805cd325a
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Bump to 0.6.3, flush recent changes
---
 ebdb.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ebdb.el b/ebdb.el
index ae3fed4..1adc8da 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016-2018  Free Software Foundation, Inc.
 
-;; Version: 0.6.2
+;; Version: 0.6.3
 ;; Package-Requires: ((emacs "25.1") (cl-lib "0.5") (seq "2.15"))
 
 ;; Maintainer: Eric Abrahamsen 



[elpa] externals/ebdb 65247f6 08/13: Make csv-mode dependency optional

2019-01-15 Thread Eric Abrahamsen
branch: externals/ebdb
commit 65247f6daa9b0a331f70b81262193787e1a55ad8
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Make csv-mode dependency optional

* ebdb-format.el (ebdb-formatter-csv): Declare function and check it
  exists.
---
 ebdb-format.el | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ebdb-format.el b/ebdb-format.el
index 8de3f1a..678c106 100644
--- a/ebdb-format.el
+++ b/ebdb-format.el
@@ -49,6 +49,8 @@
 
 (require 'ebdb)
 
+(declare-function csv-mode "ext:csv-mode")
+
 (defcustom ebdb-format-buffer-name "*EBDB Format*"
   "Default name of buffer in which to display formatted records."
   :type 'string
@@ -482,7 +484,9 @@ multiple instances in a single alist."
 (defclass ebdb-formatter-csv (ebdb-formatter-tabular)
   ((record-separator :initform "\n")
(field-separator :initform ",")
-   (post-format-function :initform #'csv-mode)))
+   (post-format-function :initform (lambda ()
+(when (fboundp 'csv-mode)
+  (csv-mode))
 
 (cl-defmethod ebdb-fmt-field ((fmt ebdb-formatter-csv)
  (_field ebdb-field)



[elpa] master c5fba70: [counsel-ebdb] Delete package

2019-01-15 Thread Eric Abrahamsen
branch: master
commit c5fba70acc84afd3c0ce59b4fc37fc27234589a1
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

[counsel-ebdb] Delete package

This is now part of the main EBDB package again.
---
 packages/counsel-ebdb/counsel-ebdb.el | 66 ---
 1 file changed, 66 deletions(-)

diff --git a/packages/counsel-ebdb/counsel-ebdb.el 
b/packages/counsel-ebdb/counsel-ebdb.el
deleted file mode 100644
index a27229a..000
--- a/packages/counsel-ebdb/counsel-ebdb.el
+++ /dev/null
@@ -1,66 +0,0 @@
-;;; counsel-ebdb.el --- Counsel integration for EBDB  -*- lexical-binding: t; 
-*-
-
-;; Copyright (C) 2017  Free Software Foundation, Inc.
-
-;; Author: Eric Abrahamsen 
-;; Maintainer: Eric Abrahamsen 
-;; Version: 1
-;; Package-Requires: ((ivy "0.8.0") (ebdb "0.2"))
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see .
-
-;;; Commentary:
-
-;; Counsel/ivy integration for EBDB.
-
-;;; Code:
-
-(require 'ebdb)
-(when t (require 'ivy))
-
-;;;###autoload
-(defun counsel-ebdb ()
-  "Select EBDB contacts using the ivy/counsel interface."
-  (interactive)
-  (ivy-read
-   "Records: "
-   (mapcar
-;; This same lambda is used in helm-ebdb, refactor or maybe even
-;; make customizable.  Presumably we could use the :matcher
-;; argument to provide a function that matched the name and mail
-;; strings, but then you wouldn't actually see the mail strings in
-;; the completion window, would you?
-(lambda (rec)
-  (let* ((rec-string (ebdb-string rec))
-(mails (ebdb-record-mail-canon rec))
-(mail-list (when mails
- (mapconcat #'identity
-mails
-" "
-   (cons (if mail-list
- (concat rec-string
- " => "
- mail-list)
-   rec-string)
- rec)))
-(ebdb-records))
-   :action
-   '(1
- ("o" (lambda (r)
-   (ebdb-display-records (list (cdr r)) nil t)) "display")
- ("m" (lambda (r) (ebdb-mail (cdr r))) "send mail")
- ("i" (lambda (r) (ebdb-cite-records-mail (cdr r))) "insert"
-
-(provide 'counsel-ebdb)
-;;; counsel-ebdb.el ends here



[elpa] master 6b3eb55: * GNUmakefile (%.elc): Use load-prefer-newer

2019-01-15 Thread Stefan Monnier
branch: master
commit 6b3eb558fb0049fd459f9b317d62e8a1f28aef05
Author: Stefan Monnier 
Commit: Stefan Monnier 

* GNUmakefile (%.elc): Use load-prefer-newer

* admin/archive-contents.el (archive--pull): Skip uptodate worktrees.
---
 GNUmakefile   |  8 +---
 README|  2 +-
 admin/archive-contents.el | 22 ++
 3 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index 79e252f..8bfd49b 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -171,9 +171,11 @@ elcs := $(call SET-diff, $(naive_elcs), $(patsubst %.el, 
%.elc, $(nbc_els)))
 # '(dolist (al (quote ($(patsubst %, "%", $(autoloads) (load 
(expand-file-name al) nil t))'
 %.elc: %.el
@echo 'Byte compiling $<'
-   @$(EMACS) \
-   --eval "(setq package-directory-list nil package-user-dir 
\"$(abspath packages)\")" \
-   -f package-initialize \
+   @$(EMACS)\
+   --eval "(setq package-directory-list nil \
+ load-prefer-newer t\
+  package-user-dir \"$(abspath packages)\")" \
+   -f package-initialize\
-L $(dir $@) -f batch-byte-compile $<
 
 .PHONY: elcs
diff --git a/README b/README
index b827780..e0c9faf 100644
--- a/README
+++ b/README
@@ -229,7 +229,7 @@ In the `external' case, the copy of the code is not kept in 
`master` but in the
 
 To add a new externals package, first add this `elpa.git' repository as a
 new remote in your existing repository.  Then push a local branch to a
-new remote branch in `elpa.git', named externals/.  For example:
+new remote branch in `elpa.git', named `externals/`.  For example:
 
git push elpa :externals/
 
diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index 17909b9..32f5285 100644
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -1,6 +1,6 @@
 ;;; archive-contents.el --- Auto-generate an Emacs Lisp package archive.  -*- 
lexical-binding:t -*-
 
-;; Copyright (C) 2011-2018  Free Software Foundation, Inc
+;; Copyright (C) 2011-2019  Free Software Foundation, Inc
 
 ;; Author: Stefan Monnier 
 
@@ -626,14 +626,20 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
 (message "Running git pull in %S" default-directory)
 (archive-call t "git" "pull"))
((file-exists-p ".git")
-(message "Updating worktree in %S" default-directory)
-(archive-call t "git" "merge"))
+(unless (with-temp-buffer
+  (archive-call t "git" "status" "--branch" "--porcelain=2")
+  (goto-char (point-min))
+  ;; Nothing to pull (nor push, actually).
+  (search-forward "\n# branch.ab +0 -0" nil t))
+  (message "Updating worktree in %S" default-directory)
+  (archive-call t "git" "merge")))
(t (error "No .git in %S" default-directory)))
-  (message "Updated %s:%s%s" dirname
-   (if (and (eobp) (bolp)
-(eq (line-beginning-position 0) (point-min)))
-   " " "\n")
-   (buffer-string)
+  (unless (and (eobp) (bobp))
+(message "Updated %s:%s%s" dirname
+ (if (and (eobp) (bolp)
+  (eq (line-beginning-position 0) (point-min)))
+ " " "\n")
+ (buffer-string))
 
 ;;; Maintain external packages.