diff options
| author | Daniel Mendler | 2026-01-11 13:30:22 +0100 |
|---|---|---|
| committer | Eli Zaretskii | 2026-01-17 15:08:52 +0200 |
| commit | b04fbc59e95a2ccdef460dd0fb10bdd8080f61e2 (patch) | |
| tree | 5b62fca5437a2187a20833ffe0206b0a669eb8bf | |
| parent | c97b8e6650fa28f44e36e200f966046ffe99fe0f (diff) | |
| download | emacs-b04fbc59e95a2ccdef460dd0fb10bdd8080f61e2.tar.gz emacs-b04fbc59e95a2ccdef460dd0fb10bdd8080f61e2.zip | |
gnus-msg-mail: Attempt to start Gnus if not yet alive
* lisp/gnus/gnus-msg.el (gnus-msg-mail): Attempt to start Gnus
if not yet alive. In case of failure, fall back to plain
message mode. (Bug#80173)
| -rw-r--r-- | lisp/gnus/gnus-msg.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index e35f87288e9..99f1735dfec 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -467,11 +467,17 @@ Gcc: header for archiving purposes. | |||
| 467 | If Gnus isn't running, a plain `message-mail' setup is used | 467 | If Gnus isn't running, a plain `message-mail' setup is used |
| 468 | instead." | 468 | instead." |
| 469 | (interactive) | 469 | (interactive) |
| 470 | (if (not (gnus-alive-p)) | 470 | (if (and (not (gnus-alive-p)) |
| 471 | (progn | 471 | (condition-case err |
| 472 | (message "Gnus not running; using plain Message mode") | 472 | (progn |
| 473 | (message-mail to subject other-headers continue | 473 | (message "Gnus not running. Starting Gnus...") |
| 474 | switch-action yank-action send-actions return-action)) | 474 | (save-window-excursion (gnus)) |
| 475 | nil) | ||
| 476 | (error | ||
| 477 | (message "Gnus failed with %s. Using plain Message mode" | ||
| 478 | (error-message-string err))))) | ||
| 479 | (message-mail to subject other-headers continue | ||
| 480 | switch-action yank-action send-actions return-action) | ||
| 475 | (let ((buf (current-buffer)) | 481 | (let ((buf (current-buffer)) |
| 476 | ;; Don't use posting styles corresponding to any existing group. | 482 | ;; Don't use posting styles corresponding to any existing group. |
| 477 | ;; (group-name gnus-newsgroup-name) | 483 | ;; (group-name gnus-newsgroup-name) |