update packages
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
;; -*- no-byte-compile: t; lexical-binding: nil -*-
|
||||
(define-package "with-editor" "20260301.1317"
|
||||
(define-package "with-editor" "20260625.855"
|
||||
"Use the Emacsclient as $EDITOR."
|
||||
'((emacs "26.1")
|
||||
(compat "30.1"))
|
||||
'((emacs "28.1")
|
||||
(compat "31.0")
|
||||
(cond-let "1.1")
|
||||
(llama "1.0"))
|
||||
:url "https://github.com/magit/with-editor"
|
||||
:commit "64211dcb815f2533ac3d2a7e56ff36ae804d8338"
|
||||
:revdesc "64211dcb815f"
|
||||
:commit "36c34610b6b700b4d1f39ccabd2b8b8c9642292d"
|
||||
:revdesc "36c34610b6b7"
|
||||
:keywords '("processes" "terminals")
|
||||
:authors '(("Jonas Bernoulli" . "emacs.with-editor@jonas.bernoulli.dev"))
|
||||
:maintainers '(("Jonas Bernoulli" . "emacs.with-editor@jonas.bernoulli.dev")))
|
||||
|
||||
@@ -6,9 +6,13 @@
|
||||
;; Homepage: https://github.com/magit/with-editor
|
||||
;; Keywords: processes terminals
|
||||
|
||||
;; Package-Version: 20260301.1317
|
||||
;; Package-Revision: 64211dcb815f
|
||||
;; Package-Requires: ((emacs "26.1") (compat "30.1"))
|
||||
;; Package-Version: 20260625.855
|
||||
;; Package-Revision: 36c34610b6b7
|
||||
;; Package-Requires: (
|
||||
;; (emacs "28.1")
|
||||
;; (compat "31.0")
|
||||
;; (cond-let "1.1")
|
||||
;; (llama "1.0"))
|
||||
|
||||
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
@@ -80,6 +84,8 @@
|
||||
|
||||
(require 'cl-lib)
|
||||
(require 'compat)
|
||||
(require 'cond-let)
|
||||
(require 'llama)
|
||||
(require 'server)
|
||||
(require 'shell)
|
||||
(eval-when-compile (require 'subr-x))
|
||||
@@ -125,14 +131,14 @@ please see https://github.com/magit/magit/wiki/Emacsclient."))))
|
||||
((bound-and-true-p emacsclient-program-name))
|
||||
("emacsclient"))
|
||||
path
|
||||
(mapcan (lambda (v) (cl-mapcar (lambda (e) (concat v e)) exec-suffixes))
|
||||
(mapcan (lambda (suffix) (mapcar (##concat suffix %) exec-suffixes))
|
||||
(nconc (and (boundp 'debian-emacs-flavor)
|
||||
(list (format ".%s" debian-emacs-flavor)))
|
||||
(cl-mapcon (lambda (v)
|
||||
(setq v (string-join (reverse v) "."))
|
||||
(list v
|
||||
(concat "-" v)
|
||||
(concat ".emacs" v)))
|
||||
(cl-mapcon (lambda (ver)
|
||||
(setq ver (string-join (reverse ver) "."))
|
||||
(list ver
|
||||
(concat "-" ver)
|
||||
(concat ".emacs" ver)))
|
||||
(reverse version-lst))
|
||||
(cons "" with-editor-emacsclient-program-suffixes)))
|
||||
(lambda (exec)
|
||||
@@ -383,7 +389,7 @@ And some tools that do not handle $EDITOR properly also break."
|
||||
(dolist (client clients)
|
||||
(message "client %S" client)
|
||||
(ignore-errors
|
||||
(server-send-string client "-error Canceled by user"))
|
||||
(server-send-string client "-error Canceled by user\n"))
|
||||
(delete-process client))
|
||||
(when (buffer-live-p buf)
|
||||
(kill-buffer buf)))
|
||||
@@ -546,12 +552,14 @@ at run-time.
|
||||
process-environment))
|
||||
;; As last resort fallback to the sleeping editor.
|
||||
(push (concat "ALTERNATE_EDITOR=" with-editor-sleeping-editor)
|
||||
process-environment)))
|
||||
process-environment)
|
||||
;; Work around bug in server.el of Emacs < 31.1. #139
|
||||
(when (member (getenv "TERM") '(nil ""))
|
||||
(setenv "TERM" "dumb"))))
|
||||
|
||||
(defun with-editor-server-window ()
|
||||
(or (and buffer-file-name
|
||||
(cdr (cl-find-if (lambda (cons)
|
||||
(string-match-p (car cons) buffer-file-name))
|
||||
(cdr (cl-find-if (##string-match-p (car %) buffer-file-name)
|
||||
with-editor-server-window-alist)))
|
||||
server-window))
|
||||
|
||||
@@ -732,8 +740,7 @@ OPEN \\([^]+?\\)\
|
||||
Files matching a regexp in `with-editor-file-name-history-exclude'
|
||||
are prevented from being added to that list."
|
||||
(pcase-dolist (`(,file . ,_) files)
|
||||
(when (cl-find-if (lambda (regexp)
|
||||
(string-match-p regexp file))
|
||||
(when (cl-find-if (##string-match-p % file)
|
||||
with-editor-file-name-history-exclude)
|
||||
(setq file-name-history
|
||||
(delete (abbreviate-file-name file) file-name-history)))))
|
||||
@@ -775,11 +782,11 @@ This works in `shell-mode', `term-mode', `eshell-mode' and
|
||||
(process-environment process-environment))
|
||||
(with-editor--setup)
|
||||
(while (accept-process-output vterm--process 1 nil t))
|
||||
(when-let ((v (getenv envvar)))
|
||||
(vterm-send-string (format " export %s=%S" envvar v))
|
||||
(when$ (getenv envvar)
|
||||
(vterm-send-string (format " export %s=%S" envvar $))
|
||||
(vterm-send-return))
|
||||
(when-let ((v (getenv "EMACS_SERVER_FILE")))
|
||||
(vterm-send-string (format " export EMACS_SERVER_FILE=%S" v))
|
||||
(when$ (getenv "EMACS_SERVER_FILE")
|
||||
(vterm-send-string (format " export EMACS_SERVER_FILE=%S" $))
|
||||
(vterm-send-return))
|
||||
(vterm-send-string " clear")
|
||||
(vterm-send-return))
|
||||
@@ -915,14 +922,13 @@ Also take care of that for `with-editor-[async-]shell-command'."
|
||||
(funcall fn command output-buffer error-buffer)
|
||||
(with-editor (funcall fn command output-buffer error-buffer)))
|
||||
;; The comint filter was overridden with our filter. Use both.
|
||||
(and-let* ((process (get-buffer-process
|
||||
(or output-buffer
|
||||
(get-buffer "*Async Shell Command*")))))
|
||||
(and-let ((process (get-buffer-process
|
||||
(or output-buffer
|
||||
(get-buffer "*Async Shell Command*")))))
|
||||
(prog1 process
|
||||
(set-process-filter process
|
||||
(lambda (proc str)
|
||||
(comint-output-filter proc str)
|
||||
(with-editor-process-filter proc str t))))))
|
||||
(add-function :after (process-filter process)
|
||||
(lambda (proc str)
|
||||
(with-editor-process-filter proc str t))))))
|
||||
((funcall fn command output-buffer error-buffer)))))
|
||||
|
||||
;;; _
|
||||
@@ -995,5 +1001,19 @@ See info node `(with-editor)Debugging' for instructions."
|
||||
;; byte-compile-warnings: (not docstrings-control-chars)
|
||||
;; indent-tabs-mode: nil
|
||||
;; lisp-indent-local-overrides: ((cond . 0) (interactive . 0))
|
||||
;; read-symbol-shorthands: (
|
||||
;; ("and$" . "cond-let--and$")
|
||||
;; ("thread$" . "cond-let--thread$")
|
||||
;; ("when$" . "cond-let--when$")
|
||||
;; ("and-let*" . "cond-let--and-let*")
|
||||
;; ("and-let" . "cond-let--and-let")
|
||||
;; ("if-let*" . "cond-let--if-let*")
|
||||
;; ("if-let" . "cond-let--if-let")
|
||||
;; ("when-let*" . "cond-let--when-let*")
|
||||
;; ("when-let" . "cond-let--when-let")
|
||||
;; ("while-let*" . "cond-let--while-let*")
|
||||
;; ("while-let" . "cond-let--while-let")
|
||||
;; ("match-string" . "match-string")
|
||||
;; ("match-str" . "match-string-no-properties"))
|
||||
;; End:
|
||||
;;; with-editor.el ends here
|
||||
|
||||
@@ -40,7 +40,7 @@ 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.4.9.
|
||||
This manual is for With-Editor version 3.5.1.
|
||||
|
||||
Copyright (C) 2015-2026 Jonas Bernoulli
|
||||
<emacs.with-editor@jonas.bernoulli.dev>
|
||||
|
||||
Reference in New Issue
Block a user