[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bug-hunter 91e1fea 50/95: Better Readme
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bug-hunter 91e1fea 50/95: Better Readme |
Date: |
Fri, 27 Nov 2020 22:06:55 -0500 (EST) |
branch: externals/bug-hunter
commit 91e1fea0809ac8b633779319d34a28be7bec9565
Author: Artur Malabarba <bruce.connor.am@gmail.com>
Commit: Artur Malabarba <bruce.connor.am@gmail.com>
Better Readme
---
README.md | 26 -------------------
README.org | 54 +++++++++++++++++++++++++++++++++++++++
bug-hunter.el | 78 ++++++++++++++++++++++++++++++++++-----------------------
cl-example.png | Bin 0 -> 13527 bytes
4 files changed, 101 insertions(+), 57 deletions(-)
diff --git a/README.md b/README.md
deleted file mode 100644
index 6adb3a3..0000000
--- a/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-## ![hunter](hunter.png) Bug Hunter
[![travis](https://secure.travis-ci.org/Bruce-Connor/elisp-bug-hunter.png?branch=master)](https://travis-ci.org/Bruce-Connor/elisp-bug-hunter?branch%3Dmaster)
-
-`bug-hunter` is an Emacs library that finds the source of a bug inside any
given `.el` file.
-
-## Usage Examples
-
-1. If your Emacs init file signals an error during startup, but you
- don’t know why, simply issue
-
- M-x bug-hunter-init-file RET RET
-
- and `bug-hunter` will find it for you.
-
-2. If Emacs starts up without errors but something is not working as
- it should, invoke the same command, but give it in an assertion:
-
- M-x bug-hunter-init-file RET (when issue-detected t) RET
-
-
-3. You can also use `bug-hunter-file` to hunt in other files, or even
- `bug-hunter-hunt` to search in a list of expressions.
-
-## Installation
-
-1. Open the `bug-hunter.el` file.
-2. Issue `M-x package-install-from-buffer`.
diff --git a/README.org b/README.org
new file mode 100644
index 0000000..7485af3
--- /dev/null
+++ b/README.org
@@ -0,0 +1,54 @@
+#+OPTIONS: toc:nil num:nil
+#+TITLE: [[file:hunter.png]] Bug Hunter
[[https://travis-ci.org/Bruce-Connor/elisp-bug-hunter?branch%3Dmaster][https://secure.travis-ci.org/Bruce-Connor/elisp-bug-hunter.png?branch=master]]
+
+~bug-hunter~ is an Emacs library that finds the source of an error or
+unexpected behavior inside an elisp configuration file (tipically
+~init.el~ or ~.emacs~).
+
+* Usage Examples
+
+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 RET
+#+END_SRC
+and ~bug-hunter~ will find it for you.
+
+If Emacs starts up without errors but something is not working as it
+should, invoke the same command, but give it in an assertion.
+Essentially, if you can write a snippet that detects the issue and
+returns non-nil, just provide this snippet as the assertion and the
+Bug Hunter will do a bisection search for you.
+
+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 (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
+# It is part of Emacs and is available trough
[[https://elpa.gnu.org/packages/bug-hunter.html][GNU Elpa]]. To install, issue
+
+# #+BEGIN_SRC text
+# M-x package-install RET bug-hunter
+# #+END_SRC
+Bug Hunter will be on Gelpa shortly. For now, do the following:
+1. Open the `bug-hunter.el` file.
+2. Issue `M-x package-install-from-buffer`.
diff --git a/bug-hunter.el b/bug-hunter.el
index b9964c2..c48d705 100644
--- a/bug-hunter.el
+++ b/bug-hunter.el
@@ -12,49 +12,65 @@
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
-
+;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
-
+;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
-;; `bug-hunter' is an Emacs library that finds the source of a bug inside
-;; any given `.el' file.
-;;
-;;
+;; `bug-hunter' is an Emacs library that finds the source of an error or
+;; unexpected behavior inside an elisp configuration file (tipically
+;; `init.el' or `.emacs').
+;;
+;;
;; Usage Examples
;; ==============
-;;
-;; 1. If your Emacs init file signals an error during startup, but you
-;; don’t know why, simply issue
-;; ,----
-;; | M-x bug-hunter-init-file RET RET
-;; `----
-;; and `bug-hunter' will find it for you.
-;;
-;; 2. If Emacs starts up without errors but something is not working as
-;; it should, invoke the same command, but give it in an assertion:
-;; ,----
-;; | M-x bug-hunter-init-file RET (when issue-detected t) RET
-;; `----
-;;
-;; 3. You can also use `bug-hunter-file' to hunt in other files, or even
-;; `bug-hunter-hunt' to search in a list of expressions.
-;;
-;;
-;; Installation
-;; ============
-;;
-;; It is part of Emacs and is available trough GNU Elpa. To install,
-;; issue
-;;
+;;
+;; If your Emacs init file signals an error during startup, but you don’t
+;; know why, simply issue
;; ,----
-;; | M-x package-install RET bug-hunter
+;; | M-x bug-hunter-init-file RET RET
;; `----
+;; and `bug-hunter' will find it for you.
+;;
+;; If Emacs starts up without errors but something is not working as it
+;; should, invoke the same command, but give it in an assertion.
+;; Essentially, if you can write a snippet that detects the issue and
+;; returns non-nil, just provide this snippet as the assertion and the
+;; Bug Hunter will do a bisection search for you.
+;;
+;; 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?
+;;
+;; ,----
+;; | M-x bug-hunter-init-file RET (featurep 'cl) RET
+;; `----
+;;
+;; *That’s it!* You’ll be given a nice buffer reporting the results:
+;;
+;; - 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
+;; ============
+;;
+;; Bug Hunter will be on Gelpa shortly. For now, do the following:
+;; 1. Open the `bug-hunter.el` file.
+;; 2. Issue `M-x package-install-from-buffer`.
;;; Code:
diff --git a/cl-example.png b/cl-example.png
new file mode 100644
index 0000000..51ea8e6
Binary files /dev/null and b/cl-example.png differ
- [elpa] externals/bug-hunter f9780b8 68/95: Style fixes, (continued)
- [elpa] externals/bug-hunter f9780b8 68/95: Style fixes, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 5075592 71/95: Inhibit readonly, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 5f61401 33/95: More tests, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter e903dd0 37/95: Ignore a dummy file, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 1778749 58/95: Improve bisection logic to avoid unnecessary step., Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 0794ccf 66/95: Merge pull request #8 from hariharanr5/master, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 0998393 70/95: Implement interactive assertion throughout, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 130cc12 45/95: Report what we can when the user aborts., Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 53a74dd 46/95: Whitespace, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter a4ba22d 49/95: checkdoc, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 91e1fea 50/95: Better Readme,
Stefan Monnier <=
- [elpa] externals/bug-hunter 5927de0 51/95: More verbose messages., Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 8d2d20e 63/95: Extended readme, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 1232c89 64/95: Don't assume Emacs 24.4. Fix #5, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter c796137 69/95: bug-hunter--run-and-test accepts an 'interactive assertion, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter d0f2034 73/95: Use -q when running interactively too., Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 2650778 93/95: Fix #17 - Minibuffer completion pre 25, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter ba63f00 42/95: Use pretty-printing on values, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter c819db8 47/95: Call-process instead of shell-command., Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 45811c4 52/95: Fix tests, Stefan Monnier, 2020/11/27
- [elpa] externals/bug-hunter 08d95ed 56/95: Update email and GH username., Stefan Monnier, 2020/11/27