emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ebdb 78cfb2a 06/15: Pop up EBDB windows before formatti


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb 78cfb2a 06/15: Pop up EBDB windows before formatting records
Date: Thu, 22 Mar 2018 00:58:55 -0400 (EDT)

branch: externals/ebdb
commit 78cfb2ab8644110e1771614fd50e67a0aa8877f2
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    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)))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]