trying to fix
This commit is contained in:
parent
fa407dfeb6
commit
e013d7569e
22945 changed files with 447936 additions and 0 deletions
18
straight/build/with-editor/dir
Normal file
18
straight/build/with-editor/dir
Normal file
|
@ -0,0 +1,18 @@
|
|||
This is the file .../info/dir, which contains the
|
||||
topmost node of the Info hierarchy, called (dir)Top.
|
||||
The first time you invoke Info you start off looking at this node.
|
||||
|
||||
File: dir, Node: Top This is the top of the INFO tree
|
||||
|
||||
This (the Directory node) gives a menu of major topics.
|
||||
Typing "q" exits, "H" lists all Info commands, "d" returns here,
|
||||
"h" gives a primer for first-timers,
|
||||
"mEmacs<Return>" visits the Emacs manual, etc.
|
||||
|
||||
In Emacs, you can click mouse button 2 on a menu item or cross reference
|
||||
to select it.
|
||||
|
||||
* Menu:
|
||||
|
||||
Emacs
|
||||
* With-Editor: (with-editor). Using the Emacsclient as $EDITOR.
|
105
straight/build/with-editor/with-editor-autoloads.el
Normal file
105
straight/build/with-editor/with-editor-autoloads.el
Normal file
|
@ -0,0 +1,105 @@
|
|||
;;; with-editor-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*-
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
|
||||
;;;### (autoloads nil "with-editor" "with-editor.el" (0 0 0 0))
|
||||
;;; Generated autoloads from with-editor.el
|
||||
|
||||
(autoload 'with-editor-export-editor "with-editor" "\
|
||||
Teach subsequent commands to use current Emacs instance as editor.
|
||||
|
||||
Set and export the environment variable ENVVAR, by default
|
||||
\"EDITOR\". The value is automatically generated to teach
|
||||
commands to use the current Emacs instance as \"the editor\".
|
||||
|
||||
This works in `shell-mode', `term-mode', `eshell-mode' and
|
||||
`vterm'.
|
||||
|
||||
\(fn &optional (ENVVAR \"EDITOR\"))" t nil)
|
||||
|
||||
(autoload 'with-editor-export-git-editor "with-editor" "\
|
||||
Like `with-editor-export-editor' but always set `$GIT_EDITOR'." t nil)
|
||||
|
||||
(autoload 'with-editor-export-hg-editor "with-editor" "\
|
||||
Like `with-editor-export-editor' but always set `$HG_EDITOR'." t nil)
|
||||
|
||||
(defvar shell-command-with-editor-mode nil "\
|
||||
Non-nil if Shell-Command-With-Editor mode is enabled.
|
||||
See the `shell-command-with-editor-mode' command
|
||||
for a description of this minor mode.")
|
||||
|
||||
(custom-autoload 'shell-command-with-editor-mode "with-editor" nil)
|
||||
|
||||
(autoload 'shell-command-with-editor-mode "with-editor" "\
|
||||
Teach `shell-command' to use current Emacs instance as editor.
|
||||
|
||||
This is a minor mode. If called interactively, toggle the
|
||||
`Shell-Command-With-Editor mode' mode. If the prefix argument is
|
||||
positive, enable the mode, and if it is zero or negative, disable
|
||||
the mode.
|
||||
|
||||
If called from Lisp, toggle the mode if ARG is `toggle'. Enable
|
||||
the mode if ARG is nil, omitted, or is a positive number.
|
||||
Disable the mode if ARG is a negative number.
|
||||
|
||||
To check whether the minor mode is enabled in the current buffer,
|
||||
evaluate `(default-value \\='shell-command-with-editor-mode)'.
|
||||
|
||||
The mode's hook is called both when the mode is enabled and when
|
||||
it is disabled.
|
||||
|
||||
Teach `shell-command', and all commands that ultimately call that
|
||||
command, to use the current Emacs instance as editor by executing
|
||||
\"EDITOR=CLIENT COMMAND&\" instead of just \"COMMAND&\".
|
||||
|
||||
CLIENT is automatically generated; EDITOR=CLIENT instructs
|
||||
COMMAND to use to the current Emacs instance as \"the editor\",
|
||||
assuming no other variable overrides the effect of \"$EDITOR\".
|
||||
CLIENT may be the path to an appropriate emacsclient executable
|
||||
with arguments, or a script which also works over Tramp.
|
||||
|
||||
Alternatively you can use the `with-editor-async-shell-command',
|
||||
which also allows the use of another variable instead of
|
||||
\"EDITOR\".
|
||||
|
||||
\(fn &optional ARG)" t nil)
|
||||
|
||||
(autoload 'with-editor-async-shell-command "with-editor" "\
|
||||
Like `async-shell-command' but with `$EDITOR' set.
|
||||
|
||||
Execute string \"ENVVAR=CLIENT COMMAND\" in an inferior shell;
|
||||
display output, if any. With a prefix argument prompt for an
|
||||
environment variable, otherwise the default \"EDITOR\" variable
|
||||
is used. With a negative prefix argument additionally insert
|
||||
the COMMAND's output at point.
|
||||
|
||||
CLIENT is automatically generated; ENVVAR=CLIENT instructs
|
||||
COMMAND to use to the current Emacs instance as \"the editor\",
|
||||
assuming it respects ENVVAR as an \"EDITOR\"-like variable.
|
||||
CLIENT may be the path to an appropriate emacsclient executable
|
||||
with arguments, or a script which also works over Tramp.
|
||||
|
||||
Also see `async-shell-command' and `shell-command'.
|
||||
|
||||
\(fn COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER ENVVAR)" t nil)
|
||||
|
||||
(autoload 'with-editor-shell-command "with-editor" "\
|
||||
Like `shell-command' or `with-editor-async-shell-command'.
|
||||
If COMMAND ends with \"&\" behave like the latter,
|
||||
else like the former.
|
||||
|
||||
\(fn COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER ENVVAR)" t nil)
|
||||
|
||||
(register-definition-prefixes "with-editor" '("server-" "shell-command--shell-command-with-editor-mode" "start-file-process--with-editor-process-filter" "with-editor"))
|
||||
|
||||
;;;***
|
||||
|
||||
(provide 'with-editor-autoloads)
|
||||
;; Local Variables:
|
||||
;; version-control: never
|
||||
;; no-byte-compile: t
|
||||
;; no-update-autoloads: t
|
||||
;; coding: utf-8
|
||||
;; End:
|
||||
;;; with-editor-autoloads.el ends here
|
1
straight/build/with-editor/with-editor.el
Symbolic link
1
straight/build/with-editor/with-editor.el
Symbolic link
|
@ -0,0 +1 @@
|
|||
/home/chris/.emacs.d/straight/repos/with-editor/with-editor.el
|
BIN
straight/build/with-editor/with-editor.elc
Normal file
BIN
straight/build/with-editor/with-editor.elc
Normal file
Binary file not shown.
416
straight/build/with-editor/with-editor.info
Normal file
416
straight/build/with-editor/with-editor.info
Normal file
|
@ -0,0 +1,416 @@
|
|||
This is with-editor.info, produced by makeinfo version 6.8 from
|
||||
with-editor.texi.
|
||||
|
||||
Copyright (C) 2015-2021 Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
You can redistribute this document and/or modify 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 document 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.
|
||||
|
||||
INFO-DIR-SECTION Emacs
|
||||
START-INFO-DIR-ENTRY
|
||||
* With-Editor: (with-editor). Using the Emacsclient as $EDITOR.
|
||||
END-INFO-DIR-ENTRY
|
||||
|
||||
|
||||
File: with-editor.info, Node: Top, Next: Using the With-Editor package, Up: (dir)
|
||||
|
||||
With-Editor User Manual
|
||||
***********************
|
||||
|
||||
The library ‘with-editor’ makes it easy to use the Emacsclient as the
|
||||
‘$EDITOR’ of child processes, making sure they know how to call home.
|
||||
For remote processes a substitute is provided, which communicates with
|
||||
Emacs on standard output instead of using a socket as the Emacsclient
|
||||
does.
|
||||
|
||||
This library was written because Magit has to be able to do the above
|
||||
to allow the user to edit commit messages gracefully and to edit rebase
|
||||
sequences, which wouldn’t be possible at all otherwise.
|
||||
|
||||
Because other packages can benefit from such functionality, this
|
||||
library is made available as a separate package. It also defines some
|
||||
additional functionality which makes it useful even for end-users, who
|
||||
don’t use Magit or another package which uses it internally.
|
||||
|
||||
This manual is for With-Editor version 3.0.5.
|
||||
|
||||
Copyright (C) 2015-2021 Jonas Bernoulli <jonas@bernoul.li>
|
||||
|
||||
You can redistribute this document and/or modify 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 document 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.
|
||||
|
||||
* Menu:
|
||||
|
||||
* Using the With-Editor package::
|
||||
* Using With-Editor as a library::
|
||||
* Debugging::
|
||||
* Command Index::
|
||||
* Function Index::
|
||||
* Variable Index::
|
||||
|
||||
— The Detailed Node Listing —
|
||||
|
||||
Using the With-Editor package
|
||||
|
||||
* Configuring With-Editor::
|
||||
* Using With-Editor commands::
|
||||
|
||||
|
||||
|
||||
File: with-editor.info, Node: Using the With-Editor package, Next: Using With-Editor as a library, Prev: Top, Up: Top
|
||||
|
||||
1 Using the With-Editor package
|
||||
*******************************
|
||||
|
||||
The ‘With-Editor’ package is used internally by Magit when editing
|
||||
commit messages and rebase sequences. It also provides some commands
|
||||
and features which are useful by themselves, even if you don’t use
|
||||
Magit.
|
||||
|
||||
For information about using this library in you own package, see
|
||||
*note Using With-Editor as a library::.
|
||||
|
||||
* Menu:
|
||||
|
||||
* Configuring With-Editor::
|
||||
* Using With-Editor commands::
|
||||
|
||||
|
||||
File: with-editor.info, Node: Configuring With-Editor, Next: Using With-Editor commands, Up: Using the With-Editor package
|
||||
|
||||
1.1 Configuring With-Editor
|
||||
===========================
|
||||
|
||||
With-Editor tries very hard to locate a suitable ‘emacsclient’
|
||||
executable, so ideally you should never have to customize the option
|
||||
‘with-editor-emacsclient-executable’. When it fails to do so, then the
|
||||
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
|
||||
|
||||
The ‘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.
|
||||
|
||||
This option is automatically set at startup by looking in
|
||||
‘exec-path’, and other places where the executable could be
|
||||
installed, to find the ‘emacsclient’ executable most suitable for
|
||||
the current Emacs instance.
|
||||
|
||||
You should *not* customize this option permanently. If you have to
|
||||
do it, then you should consider that a temporary kludge and inform
|
||||
the Magit maintainer as described in *note Debugging::.
|
||||
|
||||
If With-Editor fails to find a suitable ‘emacsclient’ on you
|
||||
system, then this should be fixed for all users at once, by
|
||||
teaching ‘with-editor-locate-emacsclient’ how to do so on your
|
||||
system and system like yours. Doing it this way has the advantage,
|
||||
that you won’t have do it again every time you update Emacs, and
|
||||
that other users who have installed Emacs the same way as you have,
|
||||
won’t have to go through the same trouble.
|
||||
|
||||
Note that there also is a nuclear option; setting this variable to
|
||||
‘nil’ causes the "sleeping editor" described below to be used even
|
||||
for local child processes. Obviously we don’t recommend that you
|
||||
use this except in "emergencies", i.e. before we had a change to
|
||||
add a kludge appropriate for you setup.
|
||||
|
||||
-- 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.
|
||||
|
||||
The ‘emacsclient’ cannot be used when using Tramp to run a process on
|
||||
a remote machine. (Theoretically it could, but that would be hard to
|
||||
setup, very fragile, and rather insecure).
|
||||
|
||||
With-Editor provides an alternative "editor" which can be used by
|
||||
remote processes in much the same way as local processes use an
|
||||
‘emacsclient’ executable. This alternative is known as the "sleeping
|
||||
editor" because it is implemented as a shell script which sleeps until
|
||||
it receives a signal.
|
||||
|
||||
-- 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.
|
||||
|
||||
This fallback is used for asynchronous process started inside the
|
||||
macro ‘with-editor’, when the process runs on a remote machine or
|
||||
for local processes when ‘with-editor-emacsclient-executable’ is
|
||||
‘nil’.
|
||||
|
||||
Where the latter uses a socket to communicate with Emacs’ server,
|
||||
this substitute prints edit requests to its standard output on
|
||||
which a process filter listens for such requests. As such it is
|
||||
not a complete substitute for a proper ‘emacsclient’, it can only
|
||||
be used as ‘$EDITOR’ of child process of the current Emacs
|
||||
instance.
|
||||
|
||||
Some shells do not execute traps immediately when waiting for a
|
||||
child process, but by default we do use such a blocking child
|
||||
process.
|
||||
|
||||
If you use such a shell (e.g. ‘csh’ on FreeBSD, but not Debian),
|
||||
then you have to edit this option. You can either replace ‘sh’
|
||||
with ‘bash’ (and install that), or you can use the older, less
|
||||
performant implementation:
|
||||
|
||||
"sh -c '\
|
||||
echo \"WITH-EDITOR: $$ OPEN $0 IN $(pwd)\"; \
|
||||
trap \"exit 0\" USR1; \
|
||||
trap \"exit 1\" USR2; \
|
||||
while true; do sleep 1; done'"
|
||||
|
||||
Note that the unit separator character () right after the file
|
||||
name ($0) is required.
|
||||
|
||||
Also note that using this alternative implementation leads to a
|
||||
delay of up to a second. The delay can be shortened by replacing
|
||||
‘sleep 1’ with ‘sleep 0.01’, or if your implementation does not
|
||||
support floats, then by using ‘nanosleep’ instead.
|
||||
|
||||
|
||||
File: with-editor.info, Node: Using With-Editor commands, Prev: Configuring With-Editor, Up: Using the With-Editor package
|
||||
|
||||
1.2 Using With-Editor commands
|
||||
==============================
|
||||
|
||||
This section describes how to use the ‘with-editor’ library _outside_ of
|
||||
Magit. You don’t need to know any of this just to create commits using
|
||||
Magit.
|
||||
|
||||
The commands ‘with-editor-async-shell-command’ and
|
||||
‘with-editor-shell-command’ are intended as drop in 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’.
|
||||
|
||||
-- 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
|
||||
|
||||
This command is like ‘shell-command’, but if the shell command ends
|
||||
with ‘&’ and is therefore run asynchronously, then the current
|
||||
Emacs instance is exported as ‘$EDITOR’.
|
||||
|
||||
To always use these variants add this to you 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’.
|
||||
|
||||
-- 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 command. This affects most variants of that command, whether
|
||||
they are defined in Emacs or in some third-party package.
|
||||
|
||||
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-exec-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)
|
||||
|
||||
-- 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
|
||||
|
||||
This command is like ‘with-editor-export-editor’ but exports
|
||||
‘$GIT_EDITOR’.
|
||||
|
||||
-- Command: with-editor-export-hg-editor
|
||||
|
||||
This command is like ‘with-editor-export-editor’ but exports
|
||||
‘$HG_EDITOR’.
|
||||
|
||||
|
||||
File: with-editor.info, Node: Using With-Editor as a library, Next: Debugging, Prev: Using the With-Editor package, Up: Top
|
||||
|
||||
2 Using With-Editor as a library
|
||||
********************************
|
||||
|
||||
This section describes how to use the ‘with-editor’ library _outside_ of
|
||||
Magit to teach another package how to have its child processes call
|
||||
home, just like Magit does. You don’t need to know any of this just to
|
||||
create commits using Magit. You can also ignore this if you use
|
||||
‘with-editor’ outside of Magit, but only as an end-user.
|
||||
|
||||
For information about interactive use and options that affect both
|
||||
interactive and non-interactive use, see *note Using the With-Editor
|
||||
package::.
|
||||
|
||||
-- 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 call home to the current Emacs instance when they require that
|
||||
the user edits a file.
|
||||
|
||||
This is done by establishing a local binding for
|
||||
‘process-environment’ and changing the value of the ‘EDITOR’
|
||||
environment variable in that scope. This affects all
|
||||
(asynchronous) processes started by forms (dynamically) inside
|
||||
BODY.
|
||||
|
||||
If BODY begins with a literal string, then that variable is set
|
||||
instead of ‘EDITOR’.
|
||||
|
||||
-- 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
|
||||
|
||||
This function is like ‘set-process-filter’ but ensures that adding
|
||||
the new FILTER does not remove the ‘with-editor-process-filter’.
|
||||
This is done by wrapping the two filter functions using a lambda,
|
||||
which becomes the actual filter. It calls FILTER first, which may
|
||||
or may not insert the text into the PROCESS’s buffer. Then it
|
||||
calls ‘with-editor-process-filter’, passing t as
|
||||
NO-STANDARD-FILTER.
|
||||
|
||||
|
||||
File: with-editor.info, Node: Debugging, Next: Command Index, Prev: Using With-Editor as a library, Up: Top
|
||||
|
||||
3 Debugging
|
||||
***********
|
||||
|
||||
With-Editor tries very hard to locate a suitable ‘emacsclient’
|
||||
executable, and then sets option ‘with-editor-emacsclient-executable’
|
||||
accordingly. In very rare cases this fails. When it does fail, then
|
||||
the 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.
|
||||
|
||||
If you are having problems using ‘with-editor’, e.g. you cannot
|
||||
commit in Magit, then please open a new issue at
|
||||
<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’.
|
||||
|
||||
|
||||
File: with-editor.info, Node: Command Index, Next: Function Index, Prev: Debugging, Up: Top
|
||||
|
||||
Appendix A Command Index
|
||||
************************
|
||||
|
||||
|