org-table: Fix table formulas editing
* lisp/org-table.el (org-table-show-reference): Do not move point outside the table when editing formulas. Fix docstring. Reported-by: Samuel Wales <samologist@gmail.com> <http://permalink.gmane.org/gmane.emacs.orgmode/104472>
This commit is contained in:
parent
a37996910e
commit
75ee067410
|
@ -3927,13 +3927,13 @@ With prefix ARG, apply the new formulas to the table."
|
|||
(defvar org-show-positions nil)
|
||||
|
||||
(defun org-table-show-reference (&optional local)
|
||||
"Show the location/value of the $ expression at point."
|
||||
"Show the location/value of the $ expression at point.
|
||||
When LOCAL is non-nil, show references for the table at point."
|
||||
(interactive)
|
||||
(org-table-remove-rectangle-highlight)
|
||||
(when local (org-table-analyze))
|
||||
(catch 'exit
|
||||
(let ((pos (if local (point) org-pos))
|
||||
(table-start (if local org-table-current-begin-pos (org-table-begin)))
|
||||
(face2 'highlight)
|
||||
(org-inhibit-highlight-removal t)
|
||||
(win (selected-window))
|
||||
|
@ -3986,6 +3986,8 @@ With prefix ARG, apply the new formulas to the table."
|
|||
(marker-buffer pos)))))
|
||||
(goto-char pos)
|
||||
(org-table-force-dataline)
|
||||
(let ((table-start
|
||||
(if local org-table-current-begin-pos (org-table-begin))))
|
||||
(when dest
|
||||
(setq name (substring dest 1))
|
||||
(cond
|
||||
|
@ -4052,7 +4054,7 @@ With prefix ARG, apply the new formulas to the table."
|
|||
(set-window-start (selected-window) min)
|
||||
(goto-char max)
|
||||
(or (pos-visible-in-window-p max)
|
||||
(set-window-start (selected-window) max))))
|
||||
(set-window-start (selected-window) max)))))
|
||||
(select-window win))))
|
||||
|
||||
(defun org-table-force-dataline ()
|
||||
|
|
Loading…
Reference in New Issue