[elpa] master 81c4839: bug-hunter: Indentation and documentation

2015-08-16 Thread Artur Malabarba
branch: master
commit 81c4839bb368b5cf4201885827b525585b9ad498
Author: Artur Malabarba 
Commit: Artur Malabarba 

bug-hunter: Indentation and documentation
---
 packages/bug-hunter/README.org|   91 +
 packages/bug-hunter/bug-hunter.el |   30 ++--
 2 files changed, 106 insertions(+), 15 deletions(-)

diff --git a/packages/bug-hunter/README.org b/packages/bug-hunter/README.org
new file mode 100644
index 000..78c622e
--- /dev/null
+++ b/packages/bug-hunter/README.org
@@ -0,0 +1,91 @@
+#+OPTIONS: toc:nil num:nil
+#+TITLE: [[file:hunter.png]] The Bug Hunter 
[[https://travis-ci.org/Malabarba/elisp-bug-hunter][file:https://travis-ci.org/Malabarba/elisp-bug-hunter.svg?branch=master]]
+
+
+The Bug Hunter is an Emacs library that finds the source of an error
+or unexpected behavior inside an elisp configuration file (typically
+~init.el~ or ~.emacs~).
+
+[[file:hunter-screencast.gif]]
+
+* Usage Examples
+
+** Automated error hunting
+If your Emacs init file signals an error during startup, but you don’t
+know why, simply issue
+#+BEGIN_SRC text
+M-x bug-hunter-init-file RET e
+#+END_SRC
+and The Bug Hunter will find it for you.  Note that your ~init.el~
+(or ~.emacs~) must be idempotent for this to work.
+
+** Interactive hunt
+
+If Emacs starts up without errors but something is not working as it
+should, invoke the same command, but choose the interactive option:
+#+BEGIN_SRC text
+M-x bug-hunter-init-file RET i
+#+END_SRC
+The Bug Hunter will start a separate Emacs instance several times, and
+then it will ask you each time whether that instance presented the
+problem you have. After doing this about 5--12 times, you’ll be given
+the results.
+
+** Assertion hunt
+
+The Bug Hunter can also find your issue based on an assertion.
+Essentially, if you can write a code snippet that returns non-nil when
+it detects the issue, just provide this snippet as the assertion and
+the Bug Hunter will do the rest.
+
+For example, let’s say there’s something in your init file that’s
+loading the ~cl~ library, and you don’t want that. You /know/ you’re
+not loading it yourself, but how can you figure out which external
+package is responsible for this outrage?
+
+#+BEGIN_SRC text
+M-x bug-hunter-init-file RET a (featurep 'cl) RET
+#+END_SRC
+
+*That’s it!* You’ll be given a nice buffer reporting the results:
+
+[[file:cl-example.png]]
+- Are you getting obscure errors when trying to open /“.tex”/ files?
+  - Don’t despair! Just use ~(find-file "dummy.tex")~ as the assertion.
+- Did ~ox-html~ stop working due to some arcane misconfiguration?
+  - Just write an assertion that does an export and checks the result.
+- Does some random command suddenly bind itself to ~C-j~ and you can’t figure 
out why?
+  - ~(eq (key-binding "\n") 'unwanted-command)~ is the assertion for you!
+
+Finally, you can also use ~bug-hunter-file~ to hunt in other files.
+
+* Installation
+The Bug Hunter is available from 
[[https://elpa.gnu.org/packages/bug-hunter.html][GNU Elpa]] to all Emacs 
versions since
+~24.1~. To install, just issue
+
+#+BEGIN_SRC text
+M-x package-install RET bug-hunter
+#+END_SRC
+
+* init.org and other literate-style configs
+
+Some people (me included) like to organize their init files by
+writting it in ~org-mode~ instead of Emacs-Lisp. This usually involves
+adding something like this to ~init.el~,
+#+BEGIN_SRC emacs-lisp
+;;;
+;;; Maybe some code up here ;;;
+;;;
+(require 'org)
+(org-babel-tangle-file "~/.emacs.d/org-init.org"
+   "~/.emacs.d/org-init.el")
+(load "~/.emacs.d/org-init.el")
+#+END_SRC
+
+At first, this makes the Bug-Hunter essentially useless, for it will
+do the hunting in ~init.el~ instead of the much more extensive
+~org-init.el~. The name of the second file (~org-init.el~) will vary,
+but the point is the same. But fear not! There’s a simple solution:
+
+1. If you have any code above the call to ~org-babel-tangle-file~, copy that 
to the top of ~org-init.el~ (or whatever is the name of your tangled file). 
This includes that ~(require 'org)~ over there.
+2. Invoke ~M-x~ ~bug-hunter-file~ (instead of ~bug-hunter-init-file~). It will 
ask you which file to debug, and you need to point it to your tangled output 
file ~org-init.el~.
diff --git a/packages/bug-hunter/bug-hunter.el 
b/packages/bug-hunter/bug-hunter.el
index 0538ac6..e528971 100644
--- a/packages/bug-hunter/bug-hunter.el
+++ b/packages/bug-hunter/bug-hunter.el
@@ -49,8 +49,8 @@
 ;;   ,
 ;;   | M-x bug-hunter-init-file RET i
 ;;   `
-;;   The Bug Hunter will start a separate Emacs frame several times, and
-;;   then it will ask you each time whether that frame presented the
+;;   The Bug Hunter will start a separate Emacs instance several times, and
+;;   then it will ask you each time whether that instance presented the
 ;;   problem you have. After doing this about 5--12 times, you’ll be given
 ;;   the res

[elpa] master b8ca811: bug-hunter: Version 1.0

2015-08-16 Thread Artur Malabarba
branch: master
commit b8ca811ce7d4a06f4acf344dae99bd8e4346b893
Author: Artur Malabarba 
Commit: Artur Malabarba 

bug-hunter: Version 1.0
---
 packages/bug-hunter/bug-hunter.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/packages/bug-hunter/bug-hunter.el 
b/packages/bug-hunter/bug-hunter.el
index e528971..5697d39 100644
--- a/packages/bug-hunter/bug-hunter.el
+++ b/packages/bug-hunter/bug-hunter.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba 
 ;; URL: http://github.com/Malabarba/elisp-bug-hunter
-;; Version: 0.5
+;; Version: 1.0
 ;; Keywords: lisp
 ;; Package-Requires: ((seq "1.3") (cl-lib "0.5"))
 



[elpa] master b4932ec: bug-hunter: Better messages

2015-08-16 Thread Artur Malabarba
branch: master
commit b4932ec0bf52046889f202bbc9ae2e309b3cc10f
Author: Artur Malabarba 
Commit: Artur Malabarba 

bug-hunter: Better messages
---
 packages/bug-hunter/bug-hunter.el |   13 +
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/packages/bug-hunter/bug-hunter.el 
b/packages/bug-hunter/bug-hunter.el
index 5697d39..6faa5a1 100644
--- a/packages/bug-hunter/bug-hunter.el
+++ b/packages/bug-hunter/bug-hunter.el
@@ -107,7 +107,10 @@
 (defconst bug-hunter--assertion-reminder
   "Remember, the assertion must be an expression that returns
 non-nil in your current (problematic) Emacs state, AND that
-returns nil on a clean Emacs instance."
+returns nil on a clean Emacs instance.
+If you're unsure how to write an assertion, you can try the interactive
+hunt instead, or see some examples in the Readme:
+https://github.com/Bruce-Connor/elisp-bug-hunter";
   "Printed to the user if they provide a bad assertion.")
 
 (defvar bug-hunter--current-head nil
@@ -408,9 +411,11 @@ are evaluated."
 (if assertion
 (concat "The assertion returned nil after loading the entire 
file.\n"
 bug-hunter--assertion-reminder)
-  "No errors signaled after loading the entire file. If you're
-looking for something that's not an error, you need to provide an
-assertion. See this link for some examples:
+  "No errors signaled after loading the entire file.
+If you're looking for something that's not an error, use the
+interactive hunt instead of the error hunt.  If you have some
+elisp proficiency, you can also use the assertion hunt, see this
+link for some examples:
 https://github.com/Bruce-Connor/elisp-bug-hunter";)
 (or assertion "")))
 



[elpa] master 3eff416: Resolve FIXME:s in other-frame-window.el

2015-08-16 Thread Stephen Leake
branch: master
commit 3eff416bc392bfee721d2b482b16c8c27a7189f2
Author: Stephen Leake 
Commit: Stephen Leake 

Resolve FIXME:s in other-frame-window.el

* packages/other-frame-window/other-frame-window.el (ofw-transient-map):
Clean up comment.
(ofw-display-buffer-other-window): Resolve FIXME:.
(other-frame-window-mode): Resolve FIXME:.
---
 packages/other-frame-window/other-frame-window.el |   18 +++---
 1 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/packages/other-frame-window/other-frame-window.el 
b/packages/other-frame-window/other-frame-window.el
index 52d22a8..8c0084c 100755
--- a/packages/other-frame-window/other-frame-window.el
+++ b/packages/other-frame-window/other-frame-window.el
@@ -65,7 +65,7 @@
 
 (defvar ofw-transient-map
   (let ((map (make-sparse-keymap)))
-;; FIXME: This is basically the union of the default the C-x 4 and C-x 5
+;; This is basically the union of the default C-x 4 and C-x 5
 ;; keymaps in Emacs-25.
 (define-key map [?\C-f] #'find-file)
 (define-key map [?\C-o] #'display-buffer)
@@ -126,10 +126,10 @@
 creating new window if needed and allowed.
 If successful, return window; else return nil.
 Intended for 'display-buffer-overriding-action'."
-  ;; Reset for next display-buffer call.  Normally, this is taken care of by
-  ;; ofw--reset-prefix, but we do it here just in case.
-  ;; FIXME: Why be careful in ofw-delete-from-overriding and careless here?
-  (setq display-buffer-overriding-action nil)
+  ;; Reset for next display-buffer call.  Normally, this is taken care
+  ;; of by ofw--reset-prefix, but we do it here in case the user does
+  ;; two ofw prefixed commands consecutively.
+  (ofw-delete-from-overriding)
 
   ;; We can't use display-buffer-use-some-window here, because
   ;; that unconditionally allows another frame.
@@ -146,8 +146,7 @@ Intended for 'display-buffer-overriding-action'."
 If successful, return window; else return nil.
 Intended for 'display-buffer-overriding-action'."
   ;; Reset for next display-buffer call.
-  ;; FIXME: Why be careful in ofw-delete-from-overriding and careless here?
-  (setq display-buffer-overriding-action nil)
+  (ofw-delete-from-overriding)
 
   (or (display-buffer-use-some-frame buffer alist)
   (display-buffer-pop-up-frame buffer alist)))
@@ -215,10 +214,7 @@ Point stays in moved buffer."
 (define-minor-mode other-frame-window-mode
   "Minor mode for other frame/window buffer placement.
 Enable mode if ARG is positive."
-  ;; FIXME: I think the mode-line is too crowded to accommodate such
-  ;; global-and-permanent minor-modes.
-  :lighter" ofw"   ;; mode line
-  :global t
+  :global t
 
   (remove-hook 'pre-command-hook #'ofw--reset-prefix)
 



[elpa] master e306ec5: Bump version of other-frame-window.el

2015-08-16 Thread Stephen Leake
branch: master
commit e306ec57f332ffc25f874093cafe97afa2d6ae1a
Author: Stephen Leake 
Commit: Stephen Leake 

Bump version of other-frame-window.el
---
 packages/other-frame-window/other-frame-window.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/packages/other-frame-window/other-frame-window.el 
b/packages/other-frame-window/other-frame-window.el
index 8c0084c..4b7f6b6 100755
--- a/packages/other-frame-window/other-frame-window.el
+++ b/packages/other-frame-window/other-frame-window.el
@@ -5,7 +5,7 @@
 ;; Author: Stephen Leake 
 ;; Maintainer: Stephen Leake 
 ;; Keywords: frame window
-;; Version: 1.0.0
+;; Version: 1.0.1
 ;; Package-Requires: ((emacs "24.4"))
 ;;
 ;; This file is part of GNU Emacs.