[elpa] master 27774a5: Recover from search head pointing to a killed buffer

2017-10-29 Thread Michael Heerdegen
branch: master
commit 27774a575cbb074d2fab4acbed50c276739783db
Author: Michael Heerdegen 
Commit: Michael Heerdegen 

Recover from search head pointing to a killed buffer

Try to resume from the associated buffer file; alternatively restart
the search.
---
 packages/el-search/el-search.el | 27 ---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 11610dd..23f1abe 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -338,8 +338,6 @@
 ;;
 ;; - The default keys are not available in the terminal
 ;;
-;; - Handle buffers killed/files closed when resuming a search
-;;
 ;; - Make searching work in comments, too? (->
 ;;   `parse-sexp-ignore-comments').  Related: should the pattern
 ;;   `symbol' also match strings that contain matches for a symbol so
@@ -1911,7 +1909,30 @@ that the current search."
(current-head (el-search-object-head search))
(current-search-buffer (el-search-head-buffer current-head)))
   (if (not (buffer-live-p current-search-buffer))
-  (user-error "Search head points to a killed buffer")
+  (let* ((head-file-name (el-search-head-file current-head))
+ (search (el-search-reset-search search))
+ (buffer-stream (el-search-head-buffers (el-search-object-head 
search)))
+ (buffer-stream-from-head-file
+  (let ((inhibit-message t))
+(and head-file-name
+ (cadr (stream-divide-with-get-rest-fun
+buffer-stream
+(lambda (s)
+  (while (and (not (stream-empty-p s))
+  (or (not (stringp (stream-first 
s)))
+  (not (file-equal-p 
(stream-first s) head-file-name
+(stream-pop s))
+  s)))
+(message "Search head points to a killed buffer...")
+(sit-for 1)
+(if (or (not head-file-name)
+(stream-empty-p buffer-stream-from-head-file))
+(el-search--message-no-log "Restarting search...")
+  (setf (el-search-head-buffers (el-search-object-head search))
+buffer-stream-from-head-file)
+  (message "Restarting from %s..." (file-name-nondirectory 
head-file-name)))
+(sit-for 2)
+(el-search-continue-search))
 (setq this-command 'el-search-pattern)
 (pop-to-buffer current-search-buffer 
el-search-display-buffer-popup-action)
 (let ((last-match (el-search-object-last-match search)))



[elpa] master 223c932: Always use the current search for query-replace

2017-10-29 Thread Michael Heerdegen
branch: master
commit 223c93288476da1700b46556cce8091a8f882a48
Author: Michael Heerdegen 
Commit: Michael Heerdegen 

Always use the current search for query-replace
---
 packages/el-search/el-search.el | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 23f1abe..cb359dc 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -3110,7 +3110,13 @@ you can also give an input of the form
 
 \(\">\" and \"=>\" are also allowed as a separator) to the first
 prompt and specify both expressions at once.  This format is also
-used for history entries."
+used for history entries.
+
+When called directly after a search command, use the current
+search to drive query-replace (like in isearch).  You get a
+multi-buffer query-replace this way when the current search is
+multi-buffer.  When not called after a search command,
+query-replace all matches following point in the current buffer."
   (interactive (el-search-query-replace--read-args)) ;this binds the optional 
argument
   (setq this-command 'el-search-query-replace) ;in case we come from isearch
   (barf-if-buffer-read-only)
@@ -3122,8 +3128,10 @@ used for history entries."
   search-head
   (eq (el-search-head-buffer search-head) (current-buffer))
   (equal from-pattern (el-search-object-pattern el-search--current-search))
-  (and (eq last-command 'el-search-pattern)
-   (y-or-n-p "Use the current search to drive query-replace? "))
+  (eq last-command 'el-search-pattern)
+  (prog1 t
+(el-search--message-no-log "Using the current search to drive 
query-replace")
+(sit-for 2))
 
 (defun el-search--take-over-from-isearch (&optional goto-left-end)
   (let ((other-end (and goto-left-end isearch-other-end))



[elpa] master ac19a16: Some details

2017-10-29 Thread Michael Heerdegen
branch: master
commit ac19a16b2c20d50b46264ed6c54e101c682736b6
Author: Michael Heerdegen 
Commit: Michael Heerdegen 

Some details
---
 packages/el-search/el-search-x.el |   2 +
 packages/el-search/el-search.el   | 123 ++
 2 files changed, 72 insertions(+), 53 deletions(-)

diff --git a/packages/el-search/el-search-x.el 
b/packages/el-search/el-search-x.el
index 48949b8..1f4c01a 100644
--- a/packages/el-search/el-search-x.el
+++ b/packages/el-search/el-search-x.el
@@ -133,6 +133,8 @@ have at least one mandatory, but also optional arguments, 
you
 could use this pattern:
 
 (l ^ 'defun hl (l _ &optional))"
+  ;; We don't allow PATs in `l' to create bindings because to make this
+  ;; work as expected we would need backtracking
   (declare
(heuristic-matcher
 (lambda (&rest lpats)
diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index cb359dc..23a7962 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -152,6 +152,14 @@
 ;;s
 ;;(guard (< 70 (length (car (split-string s "\n")))
 ;;
+;; Put simply, el-search is a tool to match representations of
+;; symbolic expressions written in a buffer or file.  Most of the
+;; time, but not necessarily, this is Elisp code.  El-search has no
+;; semantic understanding of the meaning of these s-exps as a program.
+;; For example, if you define a macro `my-defvar' that expands to
+;; `defvar' forms, the pattern `(defvar ,_) will not match any
+;; equivalent `my-defvar' form, it just matches any lists of two
+;; elements with the first element being the symbol `defvar'.
 ;;
 ;; You can define your own pattern types with `el-search-defpattern'
 ;; which is analogue to `defmacro'.  See C-h f `el-search-pattern' for
@@ -616,7 +624,9 @@ nil."
   (push (if (string-match-p "\\`.+\n" input)
 (with-temp-buffer
   (emacs-lisp-mode)
-  (insert "\n" input)
+  (unless (string-match-p "\\`\n" input)
+(insert "\n"))
+  (insert input)
   (indent-region 1 (point))
   (buffer-string))
   input)
@@ -626,7 +636,8 @@ nil."
   (when (and (symbolp pattern)
  (not (eq pattern '_))
  (not (keywordp pattern)))
-(user-error "Error: free variable `%S' (missing a quote?)" pattern)))
+(message "Free variable `%S' (missing a quote?)" pattern)
+(sit-for 2.)))
 
 (defun el-search--read-pattern (prompt &optional default histvar)
   (cl-callf or histvar 'el-search-pattern-history)
@@ -970,7 +981,7 @@ optional MESSAGE are used to construct the error message."
"completed")))
" for"
(let ((printed-pattern (el-search--pp-to-string (el-search-object-pattern 
search
- (format (if (string-match-p "\n" printed-pattern) ":\n%s" " %s")
+ (format (if (string-match-p "\n" printed-pattern) "\n%s" " %s")
  (propertize printed-pattern 'face 'shadow)
 
 
@@ -2290,26 +2301,27 @@ Prompt for a new pattern and revert the occur buffer."
  (forward-line delta-lines))
'((display-buffer-pop-up-window))
 
-(defun el-search--occur-button-action (filename-or-buffer &optional pos do-fun 
display-buffer-action)
+(defun el-search--occur-button-action
+(filename-or-buffer &optional match-pos do-fun display-buffer-action)
   (let ((buffer (if (bufferp filename-or-buffer)
 filename-or-buffer
-  (find-file-noselect filename-or-buffer) ))
-(pattern (el-search-object-pattern el-search-occur-search-object)))
+  (find-file-noselect filename-or-buffer)))
+(search-pattern (el-search-object-pattern 
el-search-occur-search-object)))
 (with-selected-window (display-buffer buffer
   (or display-buffer-action
-  (if pos
+  (if match-pos
   
'((display-buffer-pop-up-window))
 
el-search-display-buffer-popup-action)))
-  (when pos
+  (when match-pos
 (when (and (buffer-narrowed-p)
-   (or (< pos (point-min))
-   (> pos (point-max)))
+   (or (< match-pos (point-min))
+   (> match-pos (point-max)))
(not (and (y-or-n-p "Widen buffer? ")
  (progn (widen) t
   (user-error "Can't jump to match"))
-(goto-char pos))
+(goto-char match-pos))
   (el-search-setup-search-1
-   pattern
+   search-pattern
(lambda () (stream (list buffer)))
'from-here
(lambda (search)
@@ -2318,7 +2330,7 @@ Prompt for a new pattern and revert the occur buffer."
   (el-search--next-b

[elpa] branch scratch/bbdb created (now 7cc844f)

2017-10-29 Thread Stefan Monnier
monnier pushed a change to branch scratch/bbdb.

at  7cc844f   First cut at adapting BBDB for GNU ELPA

This branch includes the following new commits:

   new  f6b4a4e   *** empty log message ***
   new  58fe86a   *** empty log message ***
   new  375a1d1   Began to fix some obsolete functions to shut up the 
compiler, integrated some patches (see ChangeLog) to allow use of message-mail 
for sending mail and nil names.
   new  3797812   *** empty log message ***
   new  aa06721   Fixed area code parsing for new US area codes.  Patches 
integrated: use of message-mail for sending mail, finger-host record for 
fingering
   new  80a029d   Added check for EFS (there must be a better way that what 
I did, but I really don't want to be reduced to checking version strings.
   new  e9d4709   Fix to accomodate nil gnus-single-article-buffer
   new  7b8e04e   *** empty log message ***
   new  3075e53   Some reformatting, removal of mail-abbrev and mail-extr, 
fixed gnus path stuff (since gnus is no longer distributed with xemacs-20.3
   new  5cee021   New version of bbdb-print from Boris Goldowsky
   new  b5987e0   *** empty log message ***
   new  dbf027c   Initial revision
   new  43e420b   Jamie Zawinski 's comment change about 
the new area codes that aren't restricted to [012] in the second digit.
   new  150afda   New version of bbdb-print from Boris Goldowsky 

   new  6e2dfeb   jwz patches to support caller ID script, mail/news 
classification routine, make sure *BBDB* is bottommost buffer
   new  d309392   Version number format changes
   new  26d32b1   Fixed for new grand reorg.  Rewrote XEmacs package 
installation code.
   new  217b11b   *** empty log message ***
   new  fdb09f7   Initial revision
   new  39e04be   BBDB 1.53unoff
   new  8afea74   *** empty log message ***
   new  7a4352c   Initial revision
   new  4096f3b   Modifications mailed in by David Carlton 
.  They look to be mostly adaptations for netscape
   new  c9201bf   Removed my paths from VMDIR and MHEDIR.  Seems I had 
broken the documented 'if these are blank and the packages live on load-path, 
Emacs will find them' behavior by dying if VMDIR, MHEDIR and GNUSDIR weren't 
set.  It's fixed now.
   new  f756b7a   Message-mode fixes from Kees de Bruin 

   new  c7b2cd2   Created bbdb-insinuate-message to set M-t binding in 
message-mode so I don't have to load gnus first.
   new  6a5ccad   Kees de Bruin 's patch to make 
VM use canonicalized net address instead of default address.
   new  8b0a812   Added documentation and keymap definition for bbdb-www.  
Added autoloads for bbdb-www (and friends), bbdb-snarf, and 
bbdb-insinuate-message
   new  507adf7   Autoloads for bbdb-www, bbdb-snarf, bbdb-insinuate-message
   new  87d5615   Added bbdb-insinuate-w3 to set keyboard map correctly.  
Merged bbdb-www-netscape into bbdb-www using browse-url-browser-function to 
differentiate.
   new  9efd955   Changed VM, GNUS, and MHE definitions.  If the 
corresponding DIR variables are set, the (the DIR vars) are added to load-path. 
 The relevant el files are then loaded using the load-path.  This allows VMDIR, 
et al to be unset if the packages live in load-path by default.  Added 
bbdb-snarf and bbdb-w3.  Made the bbdb-srv and bbdb-reportmail skip messages 
more informative for the poor souls (FSF Emacs users) who can't use them.  
Added a check for itimer, since apparentl [...]
   new  46aa946   *** empty log message ***
   new  08751b9   *** empty log message ***
   new  bf7c987   autoloads for new functions in bbdb-xemacs and bbdb-gnus
   new  318efd6   Fix name completion bug (original fix by Marco Walther 
, mangled beyond recognition by Matt Simmons 
 Docs for bbdb-finger by Christoph Wedler  

   new  d0106ba   Integration of Brian Edmonds 's 
gnus-bbdb.el.  Got scoring and summary buffer stuff.  Need to do splitting
   new  8b1794b   Use browse-url-browser-function rather than a funcall
   new  6e90aef   finger-host fixes.  New function 
`bbdb-xemacs-display-completion-list' is an XEmacs version of 
`bbdb-display-completion-list', which is a wrapper for display-completion-list.
   new  69b63f2   Installation timing change: .el before .elc.  Tried to 
optimize install
   new  8793bf6   Build the dvi if the user wants
   new  c1ee53e   Rewrite part 1
   new  84d6f29   New autoloads.  Override bbdb-display-completion-list for 
XEmacs users
   new  f9e7750   *** empty log message ***
   new  94f7a29   *** empty log message ***
   new  53f5596   Rewrite Part 2 (through MUA-specific features)
   new  010bfa7   Support for bbdb-sc.el
   new  bc4c640   Fixed package install - `foo 'bar` (as opposed to `foo 
'bar'`) works in Bourne shell, but not in others.  That and it's not exactly 
intuitive.
   new  4c41cad   Support for bbdb-sc.  Housekeeping for 

[elpa] master 6b078bf 1/2: Add an update to dired color

2017-10-29 Thread Matthew Carter
branch: master
commit 6b078bf41f59ea0158b01742cae428ed61c4bc35
Author: Matthew Carter 
Commit: Matthew Carter 

Add an update to dired color
---
 ahungry-theme.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ahungry-theme.el b/ahungry-theme.el
index 9f3a760..0441dd5 100644
--- a/ahungry-theme.el
+++ b/ahungry-theme.el
@@ -306,6 +306,8 @@ Default value:
'(woman-bold ((t (:foreground "yellow" :bold t
'(woman-italic ((t (:foreground "orange" :underline t
'(evil-ex-lazy-highlight ((t (:foreground "orange" :italic t :bold t
+   '(dired-filetype-program ((t (:foreground "#0066ff"
+   '(diredp-compressed-file-suffix ((t (:foreground "#0066ff"
)
   (custom-theme-set-variables
'ahungry



[elpa] master 5ba0e78 2/2: Merge commit '6b078bf41f59ea0158b01742cae428ed61c4bc35'

2017-10-29 Thread Matthew Carter
branch: master
commit 5ba0e785e03908a87e0e9cf811c63eb5ca335962
Merge: ac19a16 6b078bf
Author: Matthew Carter 
Commit: Matthew Carter 

Merge commit '6b078bf41f59ea0158b01742cae428ed61c4bc35'
---
 packages/ahungry-theme/ahungry-theme.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/packages/ahungry-theme/ahungry-theme.el 
b/packages/ahungry-theme/ahungry-theme.el
index 9f3a760..0441dd5 100644
--- a/packages/ahungry-theme/ahungry-theme.el
+++ b/packages/ahungry-theme/ahungry-theme.el
@@ -306,6 +306,8 @@ Default value:
'(woman-bold ((t (:foreground "yellow" :bold t
'(woman-italic ((t (:foreground "orange" :underline t
'(evil-ex-lazy-highlight ((t (:foreground "orange" :italic t :bold t
+   '(dired-filetype-program ((t (:foreground "#0066ff"
+   '(diredp-compressed-file-suffix ((t (:foreground "#0066ff"
)
   (custom-theme-set-variables
'ahungry