From 6eab01c580f2d77858f949bddc950395c1ba2a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Mon, 10 Jun 2024 13:59:31 +0200 Subject: [PATCH] Backport commit 331573e40 from Emacs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/org-element.el (org-element-copy-buffer): Repair incorrect escaping. * lisp/org-macs.el (org--line-empty-p): Fix broken skip-set. * lisp/org.el (org-setup-yank-dnd-handlers): Fix broken regexp. Org: fix mistakes in regexp, skip set and doc string 331573e40731d6635acd366694493c26b480c230 Mattias EngdegÄrd Mon Jun 10 14:07:07 2024 +0200 --- lisp/org-element.el | 2 +- lisp/org-macs.el | 2 +- lisp/org.el | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index 34520d16e..b15f0b69d 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -648,7 +648,7 @@ IMPORTANT: The buffer copy may also have variable `buffer-file-name' copied. To prevent Emacs overwriting the original buffer file, -`write-contents-functions' is set to \='(always). Do not alter this +`write-contents-functions' is set to \\='(always). Do not alter this variable and do not do anything that might alter it (like calling a major mode) to prevent data corruption. Also, do note that Emacs may jump into the created buffer if the original file buffer is closed and diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 555ff44a3..694e747b0 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -815,7 +815,7 @@ Match at beginning of line when WITH-BOL is non-nil." (and (not (bobp)) (save-excursion (forward-line n) - (skip-chars-forward "[ \t]") + (skip-chars-forward " \t") (eolp)))) (defun org-previous-line-empty-p () diff --git a/lisp/org.el b/lisp/org.el index ab676e623..ff5b63212 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20749,7 +20749,7 @@ it has a `diary' type." (yank-media-handler "image/.*" #'org--image-yank-media-handler) ;; Looks like different DEs go for different handler names, ;; https://larsee.com/blog/2019/05/clipboard-files/. - (yank-media-handler "x/special-\\(?:gnome\|KDE\|mate\\)-files" + (yank-media-handler "x/special-\\(?:gnome\\|KDE\\|mate\\)-files" #'org--copied-files-yank-media-handler)) (when (boundp 'x-dnd-direct-save-function) (setq-local x-dnd-direct-save-function #'org--dnd-xds-function)))