emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/with-editor 6a37918bb9: Convert readme to Org


From: ELPA Syncer
Subject: [nongnu] elpa/with-editor 6a37918bb9: Convert readme to Org
Date: Tue, 29 Mar 2022 17:58:45 -0400 (EDT)

branch: elpa/with-editor
commit 6a37918bb9255ab96e94eb072e0208eab897084b
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Convert readme to Org
---
 README.md  | 51 ---------------------------------------------------
 README.org | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 51 deletions(-)

diff --git a/README.md b/README.md
deleted file mode 100644
index 4d41774e32..0000000000
--- a/README.md
+++ /dev/null
@@ -1,51 +0,0 @@
-With-Editor
-===========
-
-This library makes it possible to reliably use the Emacsclient as
-the `$EDITOR` of child processes.  It makes sure that they know how
-to call home.  For remote processes a substitute is provided, which
-communicates with Emacs on standard output/input instead of using a
-socket as the Emacsclient does.
-
-It provides the commands `with-editor-async-shell-command` and
-`with-editor-shell-command`, which are intended as replacements
-for `async-shell-command` and `shell-command`.  They automatically
-export `$EDITOR` making sure the executed command uses the current
-Emacs instance as "the editor".  With a prefix argument these
-commands prompt for an alternative environment variable such as
-`$GIT_EDITOR`.  To always use these variants add this to your init
-file:
-
-    (define-key (current-global-map)
-      [remap async-shell-command] 'with-editor-async-shell-command)
-    (define-key (current-global-map)
-      [remap shell-command] 'with-editor-shell-command)
-
-Alternatively use the global `shell-command-with-editor-mode`,
-which always sets `$EDITOR` for all Emacs commands which ultimately
-use `shell-command` to asynchronously run some shell command.
-
-The command `with-editor-export-editor` exports `$EDITOR` or
-another such environment variable in `shell-mode`, `eshell-mode`,
-`term-mode` and `vterm-mode` buffers.  Use this Emacs command
-before executing a shell command which needs the editor set, or
-always arrange for the current Emacs instance to be used as editor
-by adding it to the appropriate mode hooks:
-
-    (add-hook 'shell-mode-hook  'with-editor-export-editor)
-    (add-hook 'eshell-mode-hook 'with-editor-export-editor)
-    (add-hook 'term-exec-hook   'with-editor-export-editor)
-    (add-hook 'vterm-mode-hook  'with-editor-export-editor)
-
-Some variants of this function exist, these two forms are
-equivalent:
-
-    (add-hook 'shell-mode-hook
-              (apply-partially 'with-editor-export-editor "GIT_EDITOR"))
-    (add-hook 'shell-mode-hook 'with-editor-export-git-editor)
-
-This library can also be used by other packages which need to use
-the current Emacs instance as editor.  In fact this library was
-written for Magit and its `git-commit-mode` and `git-rebase-mode`.
-Consult `git-rebase.el` and the related code in `magit-sequence.el`
-for a simple example.
diff --git a/README.org b/README.org
new file mode 100644
index 0000000000..3578af86c7
--- /dev/null
+++ b/README.org
@@ -0,0 +1,56 @@
+* With-Editor
+
+This library makes it possible to reliably use the Emacsclient as
+the ~$EDITOR~ of child processes.  It makes sure that they know how
+to call home.  For remote processes a substitute is provided, which
+communicates with Emacs on standard output/input instead of using a
+socket as the Emacsclient does.
+
+It provides the commands ~with-editor-async-shell-command~ and
+~with-editor-shell-command~, which are intended as replacements
+for ~async-shell-command~ and ~shell-command~.  They automatically
+export ~$EDITOR~ making sure the executed command uses the current
+Emacs instance as "the editor".  With a prefix argument these
+commands prompt for an alternative environment variable such as
+~$GIT_EDITOR~.  To always use these variants add this to your init
+file:
+
+#+begin_src emacs-lisp
+  (define-key (current-global-map)
+    [remap async-shell-command] 'with-editor-async-shell-command)
+  (define-key (current-global-map)
+    [remap shell-command] 'with-editor-shell-command)
+#+end_src
+
+Alternatively use the global ~shell-command-with-editor-mode~,
+which always sets ~$EDITOR~ for all Emacs commands which ultimately
+use ~shell-command~ to asynchronously run some shell command.
+
+The command ~with-editor-export-editor~ exports ~$EDITOR~ or
+another such environment variable in ~shell-mode~, ~eshell-mode~,
+~term-mode~ and ~vterm-mode~ buffers.  Use this Emacs command
+before executing a shell command which needs the editor set, or
+always arrange for the current Emacs instance to be used as editor
+by adding it to the appropriate mode hooks:
+
+#+begin_src emacs-lisp
+  (add-hook 'shell-mode-hook  'with-editor-export-editor)
+  (add-hook 'eshell-mode-hook 'with-editor-export-editor)
+  (add-hook 'term-exec-hook   'with-editor-export-editor)
+  (add-hook 'vterm-mode-hook  'with-editor-export-editor)
+#+end_src
+
+Some variants of this function exist, these two forms are
+equivalent:
+
+#+begin_src emacs-lisp
+  (add-hook 'shell-mode-hook
+           (apply-partially 'with-editor-export-editor "GIT_EDITOR"))
+  (add-hook 'shell-mode-hook 'with-editor-export-git-editor)
+#+end_src
+
+This library can also be used by other packages which need to use
+the current Emacs instance as editor.  In fact this library was
+written for Magit and its ~git-commit-mode~ and ~git-rebase-mode~.
+Consult ~git-rebase.el~ and the related code in ~magit-sequence.el~
+for a simple example.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]