Re: cycling thru email addresses?

2012-08-06 Thread Stephen Leake
It seems you didn't read all of my last email (it was a bit rambling).
Here's the conclusion:

So testing done for nil is correct, and that now works for me; I don't
understand why I had to change it! I must have changed some other
setting that was the real culprit; probably using (bbdb-complete-mail
nil t).

I suggest adding the following comment:

;; Consider cycling
(when (and (not done) bbdb-complete-mail-allow-cycling)
  ;; The pattern has matched no records; it is most likely the
  ;; result of a previous match, and we want to cycle to the next
  ;; email address.
  ;;

Otherwise, sorry for the noise.

Patch, adding this comment, and fixing the kill non-existing window bug,
below.

--
-- Stephe
--- a/lisp/bbdb-com.el
+++ b/lisp/bbdb-com.el
@@ -1801,8 +1801,8 @@ as part of the MUA insinuation.
 ;; Clean up *Completions* buffer, if it exists
 (when bbdb-complete-mail-saved-window-config
   (let ((window (get-buffer-window *Completions*)))
+   (set-window-configuration bbdb-complete-mail-saved-window-config)
 (when (window-live-p window)
-  (set-window-configuration bbdb-complete-mail-saved-window-config)
   (quit-window nil window)))
   (setq bbdb-complete-mail-saved-window-config nil))
 
@@ -1913,6 +1913,10 @@ as part of the MUA insinuation.
 
 ;; Consider cycling
 (when (and (not done) bbdb-complete-mail-allow-cycling)
+  ;; The pattern has matched no records; it is most likely the
+  ;; result of a previous match, and we want to cycle to the next
+  ;; email address.
+  ;;
   ;; find the record we are working on.
   (let* ((address (mail-extract-address-components orig))
  (record (and (listp address)


-- 
-- Stephe

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [BBDB] ChangeLog 2012-08-06

2012-08-06 Thread Sam Steingold
 * Roland Winkler jvax...@tah.bet [2012-08-06 06:03:12 -0500]:

 On Fri Jul 6 2012 Sam Steingold wrote:
 2012-06-28  Sam Steingold  s...@gnu.org
  * lisp/bbdb-com.el (bbdb-complete-mail): Use `quit-window'
  instead of `bury-buffer' to get rid of *Completions*.

 I am sorry, it's not clear to me what problem was supposed to get
 fixed by the above patch.

as with all bury-buffer -- quit-window changes the main idea is that
bury-buffer preserves the newly created window or frame while
quit-window deletes it.  basically, whatever has been displayed
interactively should be removed with quit-window.

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://memri.org http://pmw.org.il http://truepeace.org
http://www.memritv.org http://think-israel.org http://jihadwatch.org
Lisp: its not just for geniuses anymore.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [BBDB] ChangeLog 2012-08-06

2012-08-06 Thread Roland Winkler
On Mon Aug 6 2012 Sam Steingold wrote:
 as with all bury-buffer -- quit-window changes the main idea is that
 bury-buffer preserves the newly created window or frame while
 quit-window deletes it.  basically, whatever has been displayed
 interactively should be removed with quit-window.

Sure, but the point is here that the call of quit-window is preceded
by a call of set-window-configuration that is supposed to restore
the window configuration before the *Completions* window popped up.
So under normal circumstances there will be no *Completions* window
anymore when quit-window is called, see Ivan Kanis' bug report.
The only remaining issue following the call of set-window-configuration
is that the *Completions* buffer is still high in the list of all
buffers, which is handled by bury-buffer.

Do you have a specific example when this approach fails?

I guess a problem could occur if the *Completions* window comes up
with its own frame, so that set-window-configuration does not affect
this frame. Then we might need something like the following

(when bbdb-complete-mail-saved-window-config
  (when (get-buffer-window *Completions*)
(set-window-configuration bbdb-complete-mail-saved-window-config)
(let ((window (get-buffer-window *Completions*)))
  (if (window-live-p window)
  (quit-window nil window)
(bury-buffer *Completions*
  (setq bbdb-complete-mail-saved-window-config nil))

Better suggestions welcome. How are other packages handling this?

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: [BBDB] ChangeLog 2012-08-06

2012-08-06 Thread Sam Steingold
 * Roland Winkler jvax...@tah.bet [2012-08-06 11:11:19 -0500]:

 On Mon Aug 6 2012 Sam Steingold wrote:
 as with all bury-buffer -- quit-window changes the main idea is that
 bury-buffer preserves the newly created window or frame while
 quit-window deletes it.  basically, whatever has been displayed
 interactively should be removed with quit-window.

 Sure, but the point is here that the call of quit-window is preceded
 by a call of set-window-configuration that is supposed to restore
 the window configuration before the *Completions* window popped up.

window configuration is a huge overkill in this case.

 How are other packages handling this?

they use quit-window :-)

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://dhimmi.com http://honestreporting.com
http://jihadwatch.org http://pmw.org.il http://openvotingconsortium.org
There are many reasons not to use Linux - but no good ones.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Re: error while completing name

2012-08-06 Thread Ivan Kanis
Roland Winkler wink...@gnu.org wrote:

 On Sun Aug 5 2012 Ivan Kanis wrote:
 I am running emacs bzr. I get the following error from time to
 time:

 I am sorry, this backtrace is rather difficult to read because of
 extra linebreaks added by some mail program. Could you please send
 it again in some mime encoded / compressed format that protects the
 original format of the backtrace?

Hi, will do next time it happens.

Take care,
-- 
Ivan Kanis
http://ivan.kanis.fr

Laws grind the poor, and rich men rule the law.
-- Oliver Goldsmith

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/