emacs-devel
[Top][All Lists]
Advanced

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

Re: master 4803fba487 1/2: 'C-x v v' on a diff buffer commits it as a pa


From: Eli Zaretskii
Subject: Re: master 4803fba487 1/2: 'C-x v v' on a diff buffer commits it as a patch (bug#52349)
Date: Wed, 31 Aug 2022 14:23:14 +0300

> Date: Wed, 31 Aug 2022 05:32:42 +0300
> Cc: "Alfred M. Szmidt" <ams@gnu.org>, eliz@gnu.org, larsi@gnus.org,
>  juri@jurta.org, emacs-devel@gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> 
> >> I can look into adapting this approach for other VCS if nobody beats
> >> me to it. As long as we fundamentally agree on the behavior.
> > Thank you.
> 
> This seems to work.

Thanks.

> +      (dolist (f files)
> +        (copy-file (expand-file-name f root)
> +                   (expand-file-name f tmpdir)))

What if f includes leading directories, as in "lisp/foo.el"?  If
tmpdir doesn't have a subdirectory 'lisp', the copy-file will fail,
no?

> +      (unwind-protect
> +          (let ((default-directory root))
> +            (dolist (f files)
> +              (with-current-buffer (get-file-buffer f)
                                      ^^^^^^^^^^^^^^^^^^^
This assumes that all the files are visited in buffers?  Is that
guaranteed?



reply via email to

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