bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#55149: 29.0.50; Commit f30625943e broke magit/with-editor


From: Tassilo Horn
Subject: bug#55149: 29.0.50; Commit f30625943e broke magit/with-editor
Date: Thu, 28 Apr 2022 06:47:50 +0200
User-agent: mu4e 1.7.13; emacs 29.0.50

"M. Ian Graham" <hello@miangraham.com> writes:

>> With stock-emacs when doing "emacsclient foo.txt", it just prints
>> "Waiting for Emacs..." but finishes immediately.
>
> Hi, quick clarification on this: As far as I can tell from my own
> observations, all emacsclient breakage here is a downstream
> side-effect of magit/with-editor's advice calls somehow getting messed
> up.

Oh, you are right.  But I was able to extract (at least one of) the
problematic with-editor advice(s) which cause the breakage.

Save the below as bug-recipe.el:

--8<---------------cut here---------------start------------->8---
(advice-add 'server-visit-files :after
            #'server-visit-files--with-editor-file-name-history-exclude)

(defun server-visit-files--with-editor-file-name-history-exclude
    (files _proc &optional _nowait)
  (pcase-dolist (`(,file . ,_) files)
    (when (cl-find-if (lambda (regexp)
                        (string-match-p regexp file))
                      '("don't care"))
      (setq file-name-history (delete file file-name-history)))))

(server-start)
--8<---------------cut here---------------end--------------->8---

Then start emacs as "emacs -Q -l bug-recipe.el" and you'll be able to
perform my "stock emacs" recipe, i.e.,

  emacsclient foo.txt => finishes immediately
  emacsclient -c foo.txt => doesn't display the foo.txt buffer

Bye,
Tassilo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]