[BBDB] ChangeLog 2012-12-26 (make quit-window restore the window configuration)

2012-12-26 Thread Roland Winkler
On Wed Aug 15 2012 Charles Philip Chan wrote:
 Roland Winkler wink...@gnu.org writes:
  I hope to learn something new here: In what way did you use the
  electric mode of BBDB v2? What are you missing without it?
 
 I like the window configuration restored after using bbdb.

The patch below should fix this. Thanks to Martin Rudalics who
helped me with the window internals.

A proper solution requires GNU Emacs 24. For Emacs 23 the required
functions do not exist. As a workaround, you can now make the *BBDB*
window weakly dedicated. That should most often have the same effect.

 On another note, it would be nice if there are settings for the
 window size both under and outside of a MUA. I would like to have
 a much smaller window in Gnus then if bbdb is called up
 interactively.

See the new variable bbdb-mua-pop-up-window-size which complements
bbdb-pop-up-window-size.

Also, I made bbdb-message-pop-up an obsolete alias for
bbdb-mua-pop-up. The latter name is more consistent with other
variable names.

Finally, this patch enables horizontal window splitting not only
with the mua-auto-update feature. But you get a horizontally split
BBDB window with any of the respective bbdb-mua-* commands, if the
value of bbdb-mua-pop-up is 'horiz.


2012-12-26  Roland Winkler  wink...@gnu.org
* lisp/bbdb.el (bbdb-dedicated-window): New user variable.
(bbdb-mua-pop-up): Renamed from bbdb-message-pop-up.  Doc fix.
(bbdb-mua-pop-up-window-size): New variable.
(bbdb-pop-up-window-size): Doc fix.  Allow value t.
(bbdb-pop-up-window): Use it.  Simplify.  Use
display-buffer-record-window / set-window-dedicated-p so that the
BBDB window is popped up such that quit-window can delete it.
Suggested by Martin Rudalics.
(bbdb-display-records): Clean up.

* lisp/bbdb-mua.el (bbdb-mua-mode-alist): New variable.
(bbdb-mua): Use it.
(bbdb-mua-window-p): New function.
(bbdb-mua-display-records, bbdb-mua-edit-field)
(bbdb-mua-auto-update): Use it.


BBDB is available at
http://savannah.nongnu.org/projects/bbdb/
To check it out, use
git clone git://git.savannah.nongnu.org/bbdb.git

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


[BBDB] ChangeLog 2012-12-27 (small fixes)

2012-12-26 Thread Roland Winkler
On Mon Sep 10 2012 Leo wrote:
 On 2012-09-10 12:21 +0800, Roland Winkler wrote:
  Is this all?? Let's see what pops up next...
 
 There is one buglet that is pretty annoying i.e. after
 bbdb-transpose-fields point is moved to the beginning of the record. I
 think it should stay in the same field of the record before and after
 the transposition.

I agree that this is annoying. The culprit is the function
bbdb-redisplay-record. When it redisplays a record after whatever
modification, it puts point at the beginning of the record. It would
be better if it restored point as close as possible to where it was
before the alteration of the record.

Currently I do not have a good (robust) idea how to fix this. It is
on my to-do list. Yet I do not give this the highest priority. But
patches are welcome.

 I have these commits sitting in my local git repo and I think they might
 be good for upstream so I am posting them here.

 +(run-hooks 'bbdb-load-hook)

Please use `eval-after-load'. This implements load hooks for any
emacs package.

  (defmacro bbdb-mua-wrapper (rest body)
Perform BODY in a MUA buffer.
 +  (declare (debug t))

Thanks, done.

 @@ -574,9 +574,11 @@ (defun bbdb-insinuate-gnus ()
;; `gnus-article-read-summary-keys' provides an additional wrapper
;; that restores the window configuration.
(define-key gnus-summary-mode-map : 'bbdb-mua-display-sender)
 +  (define-key gnus-article-mode-map : 'bbdb-mua-display-sender)
;; For `bbdb-mua-edit-field-sender' it is probably OK if
;;`gnus-article-read-summary-keys' restores the window configuration.
(define-key gnus-summary-mode-map ; 'bbdb-mua-edit-field-sender)
 +  (define-key gnus-article-mode-map ; 'bbdb-mua-edit-field-sender)

Thanks, done.

  (defun bbdb-grab-url (record url)
Grab URL and store it in RECORD.
 -  (interactive (list (bbdb-completing-read-record Add URL for: )
 - (browse-url-url-at-point)))
 +  (interactive (let ((url (or (browse-url-url-at-point)
 +  (error No url at point
 + (list (bbdb-completing-read-record
 +(format Add %s for:  url)) url)))

Thanks, done.


2012-12-27  Roland Winkler  wink...@gnu.org
* lisp/bbdb-mua.el (bbdb-mua-wrapper): Add edebug support.
Suggested by Leo sdl@gmail.com.

* lisp/bbdb-gnus (bbdb-insinuate-gnus): Fix keybindings for
gnus-article-mode.  Suggested by Leo sdl@gmail.com.

* lisp/bbdb-com.el (bbdb-grab-url): Fail early if no URL at point.
Suggested by Leo sdl@gmail.com.

BBDB is available at
http://savannah.nongnu.org/projects/bbdb/
To check it out, use
git clone git://git.savannah.nongnu.org/bbdb.git

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/


Announcing BBDB records in the Gnus summary buffer

2012-12-26 Thread Roland Winkler
bbdb-gnus.el contains some code for announcing BBDB records in the
summary buffer. It includes the user variables

  bbdb/gnus-summary-mark-known-posters
  bbdb/gnus-summary-show-bbdb-names
  bbdb/gnus-summary-prefer-bbdb-data
  bbdb/gnus-summary-prefer-real-names

controling what is actually displayed and when.  Is anyone using this?
I found that it is rather difficult to figure out how these four
variables control the announcements.

I suggest to replace these four variables by two variables

  bbdb/gnus-summary-use-bbdb

establishing a prioritized list of possibilities to consider.
The elements of this list may include something like

  bbdb-name, bbdb-mail, msg-name, msg-mail, from

Say, if the first element of this list is bbdb-name, then the
announcement should first try to use the BBDB name found for the
sender of the message. Then try to obey the 2nd element, etc.

Does this make sense? Comments and suggestions are welcome.

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/