[Top][All Lists]

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

[elpa] master 58d530b 53/57: Add vdiff-temp-files

From: Justin Burkett
Subject: [elpa] master 58d530b 53/57: Add vdiff-temp-files
Date: Tue, 3 Nov 2020 14:32:27 -0500 (EST)

branch: master
commit 58d530bc30293663761067f17c61660280bfe1ef
Author: Justin Burkett <justin@burkett.cc>
Commit: Justin Burkett <justin@burkett.cc>

    Add vdiff-temp-files
    Fixes #26
 vdiff.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/vdiff.el b/vdiff.el
index 29c02a4..eff7363 100644
--- a/vdiff.el
+++ b/vdiff.el
@@ -1930,6 +1930,18 @@ arguments."
                  (find-file-noselect file-b)
                  rotate on-quit))
+(defun vdiff-temp-files ()
+  "Start a vidff session for two new temp files.
+This might be useful if you want to paste compare text pasted
+from another source."
+  (interactive)
+  (let ((file-a (make-temp-file "vdiff-"))
+        (file-b (make-temp-file "vdiff-")))
+    (write-region "\n" nil file-a)
+    (write-region "\n" nil file-b)
+    (vdiff-files file-a file-b)))
 (defcustom vdiff-2way-layout-function 'vdiff-2way-layout-function-default
   "Function to layout windows in 2way diffs.

reply via email to

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