summaryrefslogtreecommitdiff
path: root/with-editor.el
Commit message (Collapse)AuthorAge
* Suppress error if vterm module cannot be buildJonas Bernoulli2020-10-30
| | | | Closes #85.
* Require subr-x for when-letJonas Bernoulli2020-10-26
| | | | Closes #83.
* with-editor-export-editor: Support vtermJonas Bernoulli2020-10-24
| | | | Closes #81.
* server-switch-buffer: Adjust advice for emacs 28Jonas Bernoulli2020-09-30
| | | | | | In Emacs 28 `server-switch-buffer' gains an additional argument. Closes #82.
* make-process--with-editor-process-filter: &allow-other-keysJonas Bernoulli2020-06-17
| | | | | | | | Callers may pass invalid keyword arguments to `make-process', which is their problem and should not result in me having to explain that to anyone. Closes #79 and https://github.com/hlissner/doom-emacs/issues/3384.
* Add an advice for `make-process'Philipp Stephani2020-06-09
| | | | | | | This is necessary because in Emacs 27, `make-process' can also start remote processes. Fixes #75.
* Fix typoJonas Bernoulli2020-05-13
|
* Silence byte-compilerJonas Bernoulli2020-02-17
| | | | Closes #74.
* with-editor-export-editor: Use printf instead of echoStéphane Soppera2020-02-14
| | | | | | | | | | | | | | | The `-e' flag of `echo' that makes the command interpret backslash-escaped sequences (in particular "\037") is not supported in all shells. Shells that do not support it print the flag instead. So here we replace `echo' by `printf' which seems to be better supported and does the interpretation of backslash-escaped sequence by default. Re #71. Closes #72.
* with-editor-export-editor: Fix for term-modeStéphane Soppera2020-02-04
| | | | | | | | | | | | | | | | The previous value of `with-editor-sleeping-editor' variable was using the \x1f character in the elisp string and sending it to the shell/term process. For `shell-mode' this is not an issue since the character is not interpreted by the shell. But in `term-mode' the terminal emulation interprets it and remove previous characters, the "$0" string. So we end up with an EDITOR environment variable that contains an echo command with "…OPEN IN…" instead of "…OPEN $0^_ IN…" (here "^_" is used to represent the \x1f byte). This change fixes the issue by using `-e' flag of `echo' and using the `\037' octal escape sequence for the \x1f byte.
* Release version 2.9.1Jonas Bernoulli2020-01-02
|
* with-editor-finish: Fix bug concerning git-commit-post-finish-hookJonas Bernoulli2019-12-22
| | | | | | | | | | | | | | `git-commit-post-finish-hook' is intended to be set locally. Because the buffer in which it is locally does not exist anymore by the time we have reached the "post finish" time, we use a temporary buffer and carry over the value from the other buffer. However we accidentally only copied the value of the hook variable if it already non-nil locally in the temporary buffer (which should not be the case) or non-nil globally (which might very well not be the case. Closes #68.
* Fix typosJonas Bernoulli2019-11-05
|
* with-editor-kill-buffer-noop: Revert previous kludgeJonas Bernoulli2019-10-24
| | | | | Re #64. Closes #66.
* Handle async-bytecomp-allowed-packages properlyJonas Bernoulli2019-10-08
| | | | | | | | | | | Previously the value of `async-bytecomp-allowed-packages' always was a list packages and the special symbol `all'. We failed to handle `all'. Now the value can also be one of the atoms `t' and `all'. Adjust our related code to handle all valid values. Re https://github.com/jwiegley/emacs-async/pull/113. Re https://github.com/magit/magit/pull/3981.
* with-editor-usage-message: CosmeticsJonas Bernoulli2019-07-15
|
* with-editor-usage-message: New variableJonas Bernoulli2019-07-15
| | | | | Modes can set that to display their own usage message instead of the default one.
* with-editor-usage-message: Delay message a little longerJonas Bernoulli2019-07-15
| | | | | | | We try to display our message after the one displayed by `server-execute', which is run using a timer. The timer starts "immediately" but apparently that takes longer than 0.01 seconds, so we now wait five times that long.
* Fix previous commitJonas Bernoulli2019-05-11
|
* with-editor-kill-buffer-noop: When killing Emacs silently cancelJonas Bernoulli2019-05-08
| | | | Closes #64.
* with-editor-finish: Preserve local git-commit-post-finish-hookJonas Bernoulli2018-11-03
|
* with-editor-{finish,cancel}-hook: No longer ignore global valueJonas Bernoulli2018-11-03
|
* with-editor*: Correct debug declarationJonas Bernoulli2018-10-29
|
* with-editor*: New macroJonas Bernoulli2018-10-26
|
* with-editor-{finish,cancel}: Run post hooks in correct directoryJonas Bernoulli2018-10-09
| | | | | | | | Run `with-editor-post-{finish,cancel}-hook' in the same directory as was current in the buffer from which `with-editor-{finish,cancel}' was invoked. This is necessary because running `with-editor-return' likely changes the value of `default-directory', since it changes the current directory.
* Update documentationJonas Bernoulli2018-10-08
|
* with-editor-shell-command-use-emacsclient: Fix last modified infoJonas Bernoulli2018-10-08
| | | | The default value was modified between 2.7.0 and 2.7.1.
* with-editor-sleeping-editor: Also print the working directoryJonas Bernoulli2018-10-03
| | | | | | | | | | | | | | | | | | | | When `git-commit' is invoked from a sub-directory, then it changes the working directory to the root of the working tree before invoking the editor. Additionally it ask the editor to edit a relative path in most cases. That path is relative to the top-level, so we need the sleeping editor to also print the name of that directory; or we would end up trying to edit e.g. "/path/to/repo/subdir/.git/COMMIT_EDITMSG" instead of "/path/to/repo/.git/COMMIT_EDITMSG". Actually, as of 2.19.0, `git-commit' no longer does this, it uses an absolute file-name now. But programs might still do it and that is legitimate. `$EDITOR' inherits the working directory from its parent process, so it normally isn't a problem if the file-name is relative. It only a problem here because `$EDITOR' in hour case forwards the edit request to a running `emacs' instance, which is not a child process and therefore does not inherit the working directory. Fixes #55.
* Improve detection of remacs client in macOSChristian Johansson2018-04-14
|
* Changing heading of library footer sectionJonas Bernoulli2018-03-18
| | | | The old heading was a bit silly.
* Use process-live-p to check whether process is aliveMario Rodas2018-02-17
| | | | | | When `server-process` dies, it still keeps the reference to the died process with status `closed` and is evaluated as non-nil, therefore does not restart correctly in such cases.
* Add some autoloadRémi Vanicat2018-02-13
| | | | | | The selected function are the function describe as entry point in README.md plus with-editor-export-hg-editor that has the same role than with-editor-export-git-editor, but for another VCS.
* Release version 2.7.1Jonas Bernoulli2018-01-11
|
* Use the emacsclient again when running shell commandsJonas Bernoulli2017-11-27
| | | | | | | This fixes the issues described in #40 and reintroduces the issue described in #23. Users who do not care about #40 but don't like #23 can set the new option `with-editor-shell-command-use-emacsclient' to nil.
* shell-command: enable with-editor-mode when appropriateJonas Bernoulli2017-10-02
| | | | | | | | | | | | Because `emacsclient' only passed the environment along when its `--create-frame' argument is used, we cannot tell whether `with-editor' is involved, and therefore should not enable `with-editor-mode'. If we use the sleeping editor, then we know that `with-editor' is involved, so always use that in our advice to `shell-command'. Fixes #23.
* .travis.yml: fail on byte compilation warningsNoam Postavsky2017-09-27
| | | | Require pcase at compile time only.
* Require pcaseJonas Bernoulli2017-09-25
|
* with-editor-output-filter: don't assume default-directory is validJonas Bernoulli2017-09-24
| | | | | | | | | ... because `with-editor-process-filter' may bind it to nil. When we still used `file-remote-p' instead of `tramp-tramp-file-p' in `with-editor-output-filter' (i.e. before 9fc047751b53), then that did not matter because the latter simply returns nil when its argument is nil, while the former raises an error.
* Cosmetics and typo fixesJonas Bernoulli2017-09-24
|
* with-editor-export-editor: remove unnecessary leftoversJonas Bernoulli2017-09-24
| | | | | Previously we just reinstated to already set filter. This completes fab38c451da40db17d021009ffbc53199b5e2237.
* Guard against nonexistent default directoryPhilipp Stephani2017-08-17
| | | | | | Fixes #34. Modified-by: Jonas Bernoulli <jonas@bernoul.li>
* with-editor-locate-emacsclient: don't assume version string lengthJonas Bernoulli2017-08-16
| | | | | | | | | Emacs usually identifies itself as "N.M.1" or "N.0.[59][0-9]" but at least one users Emacs identifies itself as just "N.M", so stop assuming that the version string always consist of at least three elements. Fixes #33.
* with-editor--setup: create from code previously in with-editorJonas Bernoulli2017-08-03
| | | | | | This makes it easier to make changes without having to recompile all packages that use the `with-editor' macro, and the result of macro-expansion gets smaller too.
* Drop dependency on dashJonas Bernoulli2017-08-03
|
* Use user-error when appropriateJonas Bernoulli2017-08-03
| | | | ...instead of `error' or `message'.
* Provide actual url when mentioning old Magit issue numbersJonas Bernoulli2017-08-03
|
* Fix doc-string typosJonas Bernoulli2017-08-03
|
* Use remacsclient when using remacsJonas Bernoulli2017-07-30
| | | | Closes #32.
* with-editor-locate-emacsclient: fix previous commitJonas Bernoulli2017-07-07
| | | | | | | | If `*-1' fails, then we have to return nil. To make it clear that this is what happens, show the return value (nil) before the sexp-wise confusing multi-line warning text. Also remove the unnecessary `format'.
* with-editor-locate-emacsclient: cosmeticsJonas Bernoulli2017-07-06
|