mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-07 15:22:06 +00:00
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.
This commit is contained in:
parent
84d6c31069
commit
ee507de478
14
lisp/org.el
14
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)
|
||||
|
Loading…
Reference in New Issue
Block a user