branch: externals/org
commit e24c2408e79483b5b1cf7e94be5dac79c4ce9a64
Merge: 331086ebec 3e4c89e556
Author: Ihor Radchenko <yanta...@posteo.net>
Commit: Ihor Radchenko <yanta...@posteo.net>

    Merge branch 'bugfix'
---
 lisp/ob-core.el     |  2 +-
 lisp/org-element.el |  2 +-
 lisp/org-macs.el    |  2 +-
 lisp/org.el         | 14 ++++++++------
 lisp/ox.el          |  2 +-
 5 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index c5dd20b0ed..d1984b2d6f 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -909,7 +909,7 @@ guess will be made."
                ;; insert a link to `:file'.
                (when (and result
                           (not (or (member "link" result-params)
-                                 (member "graphics" result-params))))
+                                   (member "graphics" result-params))))
                  (with-temp-file file
                    (insert (org-babel-format-result
                             result
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 34520d16e1..b15f0b69d9 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 555ff44a33..694e747b04 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 a727707c6a..f50f0cff3d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16982,10 +16982,11 @@ buffer boundaries with possible narrowing."
      (t nil))))
 
 (defun org-image--align (link)
-  "Determine the alignment of the image link.
+  "Determine the alignment of the image LINK.
+LINK is a link object.
 
 In decreasing order of priority, this is controlled:
-- Per image by the value of `:center' or ``:align' in the
+- Per image by the value of `:center' or `:align' in the
 affiliated keyword `#+attr_org'.
 - By the `#+attr_html' or `#+attr_latex` keywords with valid
   `:center' or `:align' values.
@@ -16999,15 +17000,16 @@ will cause it to be right-aligned.  A value of 
\"left\" or nil
 implies no special alignment."
   (let ((par (org-element-lineage link 'paragraph)))
     ;; Only align when image is not surrounded by paragraph text:
-    (when (and (= (org-element-begin link)
+    (when (and par ; when image is not in paragraph, but in 
table/headline/etc, do not align
+               (= (org-element-begin link)
                   (save-excursion
                     (goto-char (org-element-contents-begin par))
                     (skip-chars-forward "\t ")
                     (point)))           ;account for leading space
                                         ;before link
                (<= (- (org-element-contents-end par)
-                      (org-element-end link))
-                   1))                  ;account for trailing newline
+                     (org-element-end link))
+                  1))                  ;account for trailing newline
                                         ;at end of paragraph
       (save-match-data
         ;; Look for a valid ":center t" or ":align left|center|right"
@@ -20750,7 +20752,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)))
diff --git a/lisp/ox.el b/lisp/ox.el
index b28fe21795..1c52ca2905 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -185,7 +185,7 @@ All these properties should be backend agnostic.  Backend
 specific properties are set through `org-export-define-backend'.
 Properties redefined there have precedence over these.")
 
-(defconst org-export-filters-alist
+(defvar org-export-filters-alist
   '((:filter-body . org-export-filter-body-functions)
     (:filter-bold . org-export-filter-bold-functions)
     (:filter-babel-call . org-export-filter-babel-call-functions)

Reply via email to