branch: elpa/with-editor commit 87f8cbf5400bc9b6561f61970576831170362cb9 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
manual: Use updated support for definition commands Instead of ox-texinfo+.el use the new implementation that I expect to be merged into Org itself. --- default.mk | 1 - docs/.orgconfig | 4 ++-- docs/Makefile | 3 +-- docs/with-editor.org | 32 +++++++++++++------------------- docs/with-editor.texi | 33 +++++---------------------------- 5 files changed, 21 insertions(+), 52 deletions(-) diff --git a/default.mk b/default.mk index 6a82f9fda7..84892b341a 100644 --- a/default.mk +++ b/default.mk @@ -21,7 +21,6 @@ LOAD_PATH += -L . ifndef ORG_LOAD_PATH ORG_LOAD_PATH = -L ../../org/lisp -ORG_LOAD_PATH += -L ../../ox-texinfo+ endif INSTALL_INFO ?= $(shell command -v ginstall-info || printf install-info) diff --git a/docs/.orgconfig b/docs/.orgconfig index 8919537a19..3a00c75840 100644 --- a/docs/.orgconfig +++ b/docs/.orgconfig @@ -3,8 +3,8 @@ #+options: H:4 num:4 toc:2 #+property: header-args :eval never -#+texinfo_deffn: t +#+macro: kbd (eval (let ((case-fold-search nil) (regexp (regexp-opt '("SPC" "RET" "LFD" "TAB" "BS" "ESC" "DELETE" "SHIFT" "Ctrl" "Meta" "Alt" "Cmd" "Super" "UP" "LEFT" "RIGHT" "DOWN") 'words))) (format "@@texinfo:@kbd{@@%s@@texinfo:}@@" (replace-regexp-in-string regexp "@@texinfo:@key{@@\\&@@texinfo:}@@" $1 t)))) #+macro: year (eval (format-time-string "%Y")) -#+macro: version (eval (ox-texinfo+-get-version 'mixed)) +#+macro: version (eval (or (getenv "PACKAGE-VERSION") (ignore-errors (car (process-lines "git" "describe" "--exact"))) (ignore-errors (concat (car (process-lines "git" "describe" (if (getenv "AMEND") "HEAD~" "HEAD"))) "+1")))) #+language: en diff --git a/docs/Makefile b/docs/Makefile index d1cb3ee2e2..b41c80828c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -7,8 +7,7 @@ info: $(PKG).info dir html: $(PKG).html pdf: $(PKG).pdf -ORG_ARGS = --batch -Q $(ORG_LOAD_PATH) -l ox-texinfo+ -ORG_EVAL = --eval "(setq org-texinfo+-dissolve-noexport-headlines t)" +ORG_ARGS = --batch -Q $(ORG_LOAD_PATH) ORG_EVAL += --eval "(setq indent-tabs-mode nil)" ORG_EVAL += --eval "(setq org-src-preserve-indentation nil)" ORG_EVAL += --funcall org-texinfo-export-to-texinfo diff --git a/docs/with-editor.org b/docs/with-editor.org index 42336cf9d1..93278e830c 100644 --- a/docs/with-editor.org +++ b/docs/with-editor.org @@ -62,7 +62,7 @@ most likely reason is that someone found yet another way to package Emacs (most likely on macOS) without putting the executable on ~$PATH~, and we have to add another kludge to find it anyway. -- User Option: with-editor-emacsclient-executable +- User Option: with-editor-emacsclient-executable :: The ~emacsclient~ executable used as the editor by child process of this Emacs instance. By using this executable, child processes can @@ -91,7 +91,7 @@ and we have to add another kludge to find it anyway. this except in "emergencies", i.e. before we had a change to add a kludge appropriate for you setup. -- Function: with-editor-locate-emacsclient +- Function: with-editor-locate-emacsclient :: The function used to set the initial value of the option ~with-editor-emacsclient-executable~. There's a lot of voodoo here. @@ -106,7 +106,7 @@ remote processes in much the same way as local processes use an editor" because it is implemented as a shell script which sleeps until it receives a signal. -- User Option: with-editor-sleeping-editor +- User Option: with-editor-sleeping-editor :: The sleeping editor is a shell script used as the editor of child processes when the ~emacsclient~ executable cannot be used. @@ -159,12 +159,12 @@ The commands ~with-editor-async-shell-command~ and instance as "the editor". With a prefix argument these commands prompt for an alternative environment variable such as ~$GIT_EDITOR~. -- Command: with-editor-async-shell-command +- Command: with-editor-async-shell-command :: This command is like ~async-shell-command~, but it runs the shell command with the current Emacs instance exported as ~$EDITOR~. -- Command: with-editor-shell-command +- Command: with-editor-shell-command :: This command is like ~shell-command~, but if the shell command ends with ~&~ and is therefore run asynchronously, then the current Emacs @@ -181,7 +181,7 @@ To always use these variants add this to you init file: Alternatively use the global ~shell-command-with-editor-mode~. -- Variable: shell-command-with-editor-mode +- Variable: shell-command-with-editor-mode :: When this mode is active, then ~$EDITOR~ is exported whenever ultimately ~shell-command~ is called to asynchronously run some shell @@ -210,18 +210,18 @@ Some variants of this function exist; these two forms are equivalent: (add-hook 'shell-mode-hook 'with-editor-export-git-editor) #+end_src -- Command: with-editor-export-editor +- Command: with-editor-export-editor :: When invoked in a ~shell-mode~, ~eshell-mode~, ~term-mode~ or ~vterm-mode~ buffer, this command teaches shell commands to use the current Emacs instance as the editor, by exporting ~$EDITOR~. -- Command: with-editor-export-git-editor +- Command: with-editor-export-git-editor :: This command is like ~with-editor-export-editor~ but exports ~$GIT_EDITOR~. -- Command: with-editor-export-hg-editor +- Command: with-editor-export-hg-editor :: This command is like ~with-editor-export-editor~ but exports ~$HG_EDITOR~. @@ -238,7 +238,7 @@ For information about interactive use and options that affect both interactive and non-interactive use, see [[*Using the With-Editor package]]. -- Macro: with-editor &rest body +- Macro: with-editor &rest body :: This macro arranges for the ~emacsclient~ or the sleeping editor to be used as the editor of child processes, effectively teaching them to @@ -253,12 +253,12 @@ package]]. If BODY begins with a literal string, then that variable is set instead of ~EDITOR~. -- Macro: with-editor envvar &rest body +- Macro: with-editor envvar &rest body :: This macro is like ~with-editor~ instead that the ENVVAR argument is required and that it is evaluated at run-time. -- Function: with-editor-set-process-filter process filter +- Function: with-editor-set-process-filter process filter :: This function is like ~set-process-filter~ but ensures that adding the new FILTER does not remove the ~with-editor-process-filter~. This is @@ -282,12 +282,7 @@ https://github.com/magit/with-editor/issues and provide information about your Emacs installation. Most importantly how did you install Emacs and what is the output of ~M-x with-editor-debug RET~. -* Command Index -:PROPERTIES: -:APPENDIX: t -:INDEX: cp -:END: -* Function Index +* Function and Command Index :PROPERTIES: :APPENDIX: t :INDEX: fn @@ -323,7 +318,6 @@ General Public License for more details. # IMPORTANT: Also update ORG_ARGS and ORG_EVAL in the Makefile. # Local Variables: # eval: (require 'magit-utils nil t) -# eval: (require 'ox-texinfo+ nil t) # indent-tabs-mode: nil # org-src-preserve-indentation: nil # End: diff --git a/docs/with-editor.texi b/docs/with-editor.texi index 73c89f6f65..57bf475706 100644 --- a/docs/with-editor.texi +++ b/docs/with-editor.texi @@ -31,7 +31,7 @@ General Public License for more details. @finalout @titlepage @title With-Editor User Manual -@subtitle for version 3.0.5 +@subtitle for version v3.0.5-16-g46de358be6+1 @author Jonas Bernoulli @page @vskip 0pt plus 1filll @@ -60,7 +60,7 @@ additional functionality which makes it useful even for end-users, who don't use Magit or another package which uses it internally. @noindent -This manual is for With-Editor version 3.0.5. +This manual is for With-Editor version v3.0.5-16-g46de358be6+1. @quotation Copyright (C) 2015-2021 Jonas Bernoulli <jonas@@bernoul.li> @@ -82,8 +82,7 @@ General Public License for more details. * Using the With-Editor package:: * Using With-Editor as a library:: * Debugging:: -* Command Index:: -* Function Index:: +* Function and Command Index:: * Variable Index:: @detailmenu @@ -124,7 +123,6 @@ Emacs (most likely on macOS) without putting the executable on @code{$PATH}, and we have to add another kludge to find it anyway. @defopt with-editor-emacsclient-executable - The @code{emacsclient} executable used as the editor by child process of this Emacs instance. By using this executable, child processes can call home to their parent process. @@ -154,7 +152,6 @@ kludge appropriate for you setup. @end defopt @defun with-editor-locate-emacsclient - The function used to set the initial value of the option @code{with-editor-emacsclient-executable}. There's a lot of voodoo here. @end defun @@ -170,7 +167,6 @@ editor" because it is implemented as a shell script which sleeps until it receives a signal. @defopt with-editor-sleeping-editor - The sleeping editor is a shell script used as the editor of child processes when the @code{emacsclient} executable cannot be used. @@ -224,16 +220,12 @@ The commands @code{with-editor-async-shell-command} and instance as "the editor". With a prefix argument these commands prompt for an alternative environment variable such as @code{$GIT_EDITOR}. -@cindex with-editor-async-shell-command @deffn Command with-editor-async-shell-command - This command is like @code{async-shell-command}, but it runs the shell command with the current Emacs instance exported as @code{$EDITOR}. @end deffn -@cindex with-editor-shell-command @deffn Command with-editor-shell-command - This command is like @code{shell-command}, but if the shell command ends with @code{&} and is therefore run asynchronously, then the current Emacs instance is exported as @code{$EDITOR}. @@ -251,7 +243,6 @@ To always use these variants add this to you init file: Alternatively use the global @code{shell-command-with-editor-mode}. @defvar shell-command-with-editor-mode - When this mode is active, then @code{$EDITOR} is exported whenever ultimately @code{shell-command} is called to asynchronously run some shell command. This affects most variants of that command, whether they @@ -280,24 +271,18 @@ Some variants of this function exist; these two forms are equivalent: (add-hook 'shell-mode-hook 'with-editor-export-git-editor) @end lisp -@cindex with-editor-export-editor @deffn Command with-editor-export-editor - When invoked in a @code{shell-mode}, @code{eshell-mode}, @code{term-mode} or @code{vterm-mode} buffer, this command teaches shell commands to use the current Emacs instance as the editor, by exporting @code{$EDITOR}. @end deffn -@cindex with-editor-export-git-editor @deffn Command with-editor-export-git-editor - This command is like @code{with-editor-export-editor} but exports @code{$GIT_EDITOR}. @end deffn -@cindex with-editor-export-hg-editor @deffn Command with-editor-export-hg-editor - This command is like @code{with-editor-export-editor} but exports @code{$HG_EDITOR}. @end deffn @@ -315,7 +300,6 @@ For information about interactive use and options that affect both interactive and non-interactive use, see @ref{Using the With-Editor package}. @defmac with-editor &rest body - This macro arranges for the @code{emacsclient} or the sleeping editor to be used as the editor of child processes, effectively teaching them to call home to the current Emacs instance when they require that the @@ -331,13 +315,11 @@ instead of @code{EDITOR}. @end defmac @defmac with-editor envvar &rest body - This macro is like @code{with-editor} instead that the ENVVAR argument is required and that it is evaluated at run-time. @end defmac @defun with-editor-set-process-filter process filter - This function is like @code{set-process-filter} but ensures that adding the new FILTER does not remove the @code{with-editor-process-filter}. This is done by wrapping the two filter functions using a lambda, which @@ -362,13 +344,8 @@ in Magit, then please open a new issue at about your Emacs installation. Most importantly how did you install Emacs and what is the output of @code{M-x with-editor-debug RET}. -@node Command Index -@appendix Command Index - -@printindex cp - -@node Function Index -@appendix Function Index +@node Function and Command Index +@appendix Function and Command Index @printindex fn