all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#38575: 27.0.50; Document that `diff' arguments OLD and NEW can be buffers
@ 2019-12-12  6:46 Phil Sainty
  2019-12-12  7:44 ` Phil Sainty
  2019-12-12  9:21 ` Eli Zaretskii
  0 siblings, 2 replies; 9+ messages in thread
From: Phil Sainty @ 2019-12-12  6:46 UTC (permalink / raw)
  To: 38575

The docstring for `diff' is:

     (diff OLD NEW &optional SWITCHES NO-ASYNC)

     Find and display the differences between OLD and NEW files.
     When called interactively, read NEW, then OLD, using the
     minibuffer.  The default for NEW is the current buffer’s file
     name, and the default for OLD is a backup file for NEW, if one
     exists.  If NO-ASYNC is non-nil, call diff synchronously.

     When called interactively with a prefix argument, prompt
     interactively for diff switches.  Otherwise, the switches
     specified in the variable ‘diff-switches’ are passed to the
     diff command.


However either (or both) of OLD and NEW may alternatively be buffers,
with temporary files automatically created as necessary.  This happens
via `diff-file-local-copy' called by `diff-no-select'.

This feature is utilised by `diff-buffer-with-file', and is far too
useful to be undocumented by `diff'.

I suggest the following additional paragraph:

     Non-interactively, OLD and NEW may each be buffers, in which
     case a temporary file will be used.


If that wording is ok, I can commit the change.


-Phil






^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-08-21 15:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-12  6:46 bug#38575: 27.0.50; Document that `diff' arguments OLD and NEW can be buffers Phil Sainty
2019-12-12  7:44 ` Phil Sainty
2019-12-12  9:23   ` Eli Zaretskii
2019-12-12  9:21 ` Eli Zaretskii
2019-12-12 10:15   ` Phil Sainty
2019-12-12 11:35     ` Eli Zaretskii
2019-12-14  8:22       ` Phil Sainty
2019-12-14  9:03         ` Eli Zaretskii
2020-08-21 15:01           ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.