bug#43401: 28.0.50; [PATCH] Emacs Lisp type error when the buffer passed to diff-buffer-with-file is not visiting a file

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#43401: 28.0.50; [PATCH] Emacs Lisp type error when the buffer passed to diff-buffer-with-file is not visiting a file

Emacs - Bugs mailing list
Steps to reproduce the problem:

emacs -Q
C-x b "Sample" RET (that is, create an empty buffer)
M-x diff-buffer-with-file RET
RET (confirm the default buffer)

Actual result:

Emacs shows "Wrong type argument: stringp, nil"

Expected result:

Emacs shows a more descriptive error that explains why the command
couldn't be executed.

I've attached a patch that implements the expected result.

Thank you very much.


0001-Check-that-the-buffer-in-diff-buffer-with-file-is-vi.patch (976 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#43401: 28.0.50; [PATCH] Emacs Lisp type error when the buffer passed to diff-buffer-with-file is not visiting a file

Lars Ingebrigtsen
Daniel Martín <[hidden email]> writes:

> Emacs shows a more descriptive error that explains why the command
> couldn't be executed.
>
> I've attached a patch that implements the expected result.

Thanks; applied to Emacs 28.

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no