branch: externals/ebdb commit 78cfb2ab8644110e1771614fd50e67a0aa8877f2 Author: Eric Abrahamsen <e...@ericabrahamsen.net> Commit: Eric Abrahamsen <e...@ericabrahamsen.net>
Pop up EBDB windows before formatting records * ebdb-com.el (ebdb-display-records): In most cases, this ought to allow filling of record values to work correctly, because `window-text-width' will return a reasonable value. This still isn't working for Gnus, possibly because of how Gnus' window configuration works. Partially addresses #62 --- ebdb-com.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ebdb-com.el b/ebdb-com.el index 1643ef9..b2301e9 100644 --- a/ebdb-com.el +++ b/ebdb-com.el @@ -591,8 +591,6 @@ This happens in addition to any pre-defined indentation of STRING." field-list)) 0)) (label-fmt (format " %%%ds" indent)) - ;; `window-text-width' doesn't work for pop-up buffers, - ;; they're not displayed yet! How do we resolve this...? (fill-column (window-text-width)) (fill-prefix (make-string (+ 5 indent) ?\s)) (paragraph-start "[^:]+:[^\n]+$") @@ -777,6 +775,8 @@ name based on the current major mode." (list r fmt (make-marker) nil)) records)) + (ebdb-pop-up-window target-buffer select pop) + (unless (or ebdb-silent-internal ebdb-silent) (message "Formatting EBDB...")) (let ((record-number 0) @@ -795,7 +795,6 @@ name based on the current major mode." (message "Formatting EBDB...done.")) (set-buffer-modified-p nil) - (ebdb-pop-up-window target-buffer select pop) (goto-char (point-min)) (set-window-start (get-buffer-window (current-buffer)) (point)))))