[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org ee507de 2/2: lisp/org.el (org-ctrl-c-ctrl-c): Fix b
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org ee507de 2/2: lisp/org.el (org-ctrl-c-ctrl-c): Fix bug |
Date: |
Sat, 1 May 2021 02:57:12 -0400 (EDT) |
branch: externals/org
commit ee507de47811ba9b8de1907cc2014326af8cf43c
Author: Bastien Guerry <bzg@gnu.org>
Commit: Bastien Guerry <bzg@gnu.org>
lisp/org.el (org-ctrl-c-ctrl-c): Fix bug
* lisp/org.el (org-ctrl-c-ctrl-c): Fix bug.
Commit aea31b065 introduced a bug: C-c C-c on a row of a table that
has no #+plot line, (org-element-property :post-affiliated context)
would return nil, so we first need to check whether we are on a #+plot
line.
---
lisp/org.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 2d013b2..a4fa583 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -17695,17 +17695,19 @@ This command does many different things, depending on
context:
(`statistics-cookie
(call-interactively #'org-update-statistics-cookies))
((or `table `table-cell `table-row)
- ;; At a table, recalculate every field and align it. Also
- ;; send the table if necessary. If the table has
- ;; a `table.el' type, just give up. At a table row or cell,
- ;; maybe recalculate line but always align table.
+ ;; At a table, generate a plot if on the #+plot line,
+ ;; recalculate every field and align it otherwise. Also
+ ;; send the table if necessary.
(cond
- ((and (< (point) (org-element-property :post-affiliated context))
- (org-match-line "[ \t]*#\\+plot:"))
+ ((and (org-match-line "[ \t]*#\\+plot:")
+ (< (point) (org-element-property :post-affiliated context)))
(org-plot/gnuplot))
+ ;; If the table has a `table.el' type, just give up.
((eq (org-element-property :type context) 'table.el)
(message "%s" (substitute-command-keys "\\<org-mode-map>\
Use `\\[org-edit-special]' to edit table.el tables")))
+ ;; At a table row or cell, maybe recalculate line but always
+ ;; align table.
((or (eq type 'table)
;; Check if point is at a TBLFM line.
(and (eq type 'table-row)