mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-07-15 15:46:27 +00:00
Merge branch 'maint'
This commit is contained in:
commit
613333d665
|
@ -8294,7 +8294,7 @@ When called with a prefix argument, include all archive files as well."
|
|||
(when (next-single-property-change (point-at-eol) 'org-marker)
|
||||
(move-end-of-line 1)
|
||||
(goto-char (next-single-property-change (point) 'org-marker))))
|
||||
(org-move-to-column col nil nil t))
|
||||
(org-move-to-column col))
|
||||
(org-agenda-do-context-action))
|
||||
|
||||
(defun org-agenda-previous-item (n)
|
||||
|
@ -8306,7 +8306,7 @@ When called with a prefix argument, include all archive files as well."
|
|||
(move-end-of-line 0)
|
||||
(previous-single-property-change (point) 'org-marker))))
|
||||
(if goto (goto-char goto))
|
||||
(org-move-to-column col nil nil t)))
|
||||
(org-move-to-column col)))
|
||||
(org-agenda-do-context-action))
|
||||
|
||||
(defun org-agenda-do-context-action ()
|
||||
|
@ -8813,7 +8813,7 @@ the same tree node, and the headline of the tree node in the Org-mode file."
|
|||
(string-match (concat "^" (regexp-opt org-done-keywords-for-agenda))
|
||||
newhead)
|
||||
(org-agenda-unmark-clocking-task))
|
||||
(org-move-to-column col nil nil t))))
|
||||
(org-move-to-column col))))
|
||||
|
||||
(defun org-agenda-add-note (&optional arg)
|
||||
"Add a time-stamped note to the entry at point."
|
||||
|
@ -8969,7 +8969,7 @@ Called with a universal prefix arg, show the priority instead of setting it."
|
|||
(end-of-line 1)
|
||||
(setq newhead (org-get-heading)))
|
||||
(org-agenda-change-all-lines newhead hdmarker)
|
||||
(org-move-to-column col nil nil t)))))
|
||||
(org-move-to-column col)))))
|
||||
|
||||
;; FIXME: should fix the tags property of the agenda line.
|
||||
(defun org-agenda-set-tags (&optional tag onoff)
|
||||
|
@ -9178,7 +9178,7 @@ Called with a universal prefix arg, show the priority instead of setting it."
|
|||
(goto-char (point-max))
|
||||
(while (not (bobp))
|
||||
(when (equal marker (org-get-at-bol 'org-marker))
|
||||
(org-move-to-column (- (window-width) (length stamp)) t nil t)
|
||||
(org-move-to-column (- (window-width) (length stamp)) t)
|
||||
(org-agenda-fix-tags-filter-overlays-at (point))
|
||||
(if (featurep 'xemacs)
|
||||
;; Use `duplicable' property to trigger undo recording
|
||||
|
@ -9280,7 +9280,7 @@ ARG is passed through to `org-deadline'."
|
|||
(org-clock-in arg)
|
||||
(setq newhead (org-get-heading)))
|
||||
(org-agenda-change-all-lines newhead hdmarker))
|
||||
(org-move-to-column col nil nil t))))
|
||||
(org-move-to-column col))))
|
||||
|
||||
(defun org-agenda-clock-out ()
|
||||
"Stop the currently running clock."
|
||||
|
@ -9300,7 +9300,7 @@ ARG is passed through to `org-deadline'."
|
|||
(setq newhead (org-get-heading))))))
|
||||
(org-agenda-change-all-lines newhead marker)
|
||||
(move-marker marker nil)
|
||||
(org-move-to-column col nil nil t)
|
||||
(org-move-to-column col)
|
||||
(org-agenda-unmark-clocking-task)))
|
||||
|
||||
(defun org-agenda-clock-cancel (&optional arg)
|
||||
|
|
|
@ -343,10 +343,25 @@ Works on both Emacs and XEmacs."
|
|||
(org-xemacs-without-invisibility (indent-line-to column))
|
||||
(indent-line-to column)))
|
||||
|
||||
(defun org-move-to-column (column &optional force buffer ignore-invisible)
|
||||
(let ((buffer-invisibility-spec ignore-invisible))
|
||||
(defun org-move-to-column (column &optional force buffer)
|
||||
"Move to column COLUMN.
|
||||
Pass COLUMN and FORCE to `move-to-column'.
|
||||
Pass BUFFER to the XEmacs version of `move-to-column'."
|
||||
(let ((buffer-invisibility-spec
|
||||
(if (or
|
||||
;; Ignore all visibility spec in agenda
|
||||
(not (derived-mode-p 'org-mode))
|
||||
;; Ignore bracket links elsewere
|
||||
(and (save-excursion
|
||||
(forward-line 0)
|
||||
(looking-at (concat "^.*" org-bracket-link-regexp)))
|
||||
(member '(org-link)
|
||||
buffer-invisibility-spec)))
|
||||
t
|
||||
buffer-invisibility-spec)))
|
||||
(if (featurep 'xemacs)
|
||||
(org-xemacs-without-invisibility (move-to-column column force buffer))
|
||||
(org-xemacs-without-invisibility
|
||||
(move-to-column column force buffer))
|
||||
(move-to-column column force))))
|
||||
|
||||
(defun org-get-x-clipboard-compat (value)
|
||||
|
|
|
@ -1142,12 +1142,12 @@ copying. In the case of a timestamp, increment by one day."
|
|||
(< (string-to-number txt) 100000000))
|
||||
(setq txt (format "%d" (+ (string-to-number txt) 1))))
|
||||
(insert txt)
|
||||
(org-move-to-column col nil nil t)
|
||||
(org-move-to-column col)
|
||||
(if (and org-table-copy-increment (org-at-timestamp-p t))
|
||||
(org-timestamp-up-day)
|
||||
(org-table-maybe-recalculate-line))
|
||||
(org-table-align)
|
||||
(org-move-to-column col nil nil t))
|
||||
(org-move-to-column col))
|
||||
(user-error "No non-empty field found"))))
|
||||
|
||||
(defun org-table-check-inside-data-field (&optional noerror)
|
||||
|
@ -1376,12 +1376,12 @@ However, when FORCE is non-nil, create new columns if necessary."
|
|||
t
|
||||
(let ((col (current-column))
|
||||
(end (org-table-end)))
|
||||
(org-move-to-column col nil nil t)
|
||||
(org-move-to-column col)
|
||||
(while (and (< (point) end)
|
||||
(or (not (= (current-column) col))
|
||||
(org-at-table-hline-p)))
|
||||
(beginning-of-line 2)
|
||||
(org-move-to-column col nil nil t))
|
||||
(org-move-to-column col))
|
||||
(if (and (org-at-table-p)
|
||||
(not (org-at-table-hline-p)))
|
||||
t
|
||||
|
@ -1530,7 +1530,7 @@ first dline below it is used. When ABOVE is non-nil, the one above is used."
|
|||
(beginning-of-line tonew)
|
||||
(insert txt)
|
||||
(beginning-of-line 0)
|
||||
(org-move-to-column col nil nil t)
|
||||
(org-move-to-column col)
|
||||
(unless (or hline1p hline2p
|
||||
(not (or (not org-table-fix-formulas-confirm)
|
||||
(funcall org-table-fix-formulas-confirm
|
||||
|
@ -1582,7 +1582,7 @@ With prefix ABOVE, insert above the current line."
|
|||
(beginning-of-line (if above 1 2))
|
||||
(insert line "\n")
|
||||
(beginning-of-line (if above 1 -1))
|
||||
(org-move-to-column col nil nil t)
|
||||
(org-move-to-column col)
|
||||
(and org-table-overlay-coordinates (org-table-align))))
|
||||
|
||||
;;;###autoload
|
||||
|
@ -1622,7 +1622,7 @@ In particular, this does handle wide and invisible characters."
|
|||
(dline (org-table-current-dline)))
|
||||
(kill-region (point-at-bol) (min (1+ (point-at-eol)) (point-max)))
|
||||
(if (not (org-at-table-p)) (beginning-of-line 0))
|
||||
(org-move-to-column col nil nil t)
|
||||
(org-move-to-column col)
|
||||
(when (or (not org-table-fix-formulas-confirm)
|
||||
(funcall org-table-fix-formulas-confirm "Fix formulas? "))
|
||||
(org-table-fix-formulas "@" (list (cons (number-to-string dline) "INVALID"))
|
||||
|
|
|
@ -14533,6 +14533,7 @@ If ONOFF is `on' or `off', don't toggle but set to this state."
|
|||
|
||||
(defun org-align-tags-here (to-col)
|
||||
;; Assumes that this is a headline
|
||||
"Align tags on the current headline to TO-COL."
|
||||
(let ((pos (point)) (col (current-column)) ncol tags-l p)
|
||||
(beginning-of-line 1)
|
||||
(if (and (looking-at (org-re ".*?\\([ \t]+\\)\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"))
|
||||
|
@ -14551,7 +14552,7 @@ If ONOFF is `on' or `off', don't toggle but set to this state."
|
|||
(insert (make-string (- ncol (current-column)) ?\ ))
|
||||
(setq ncol (current-column))
|
||||
(when indent-tabs-mode (tabify p (point-at-eol)))
|
||||
(org-move-to-column (min ncol col) t nil t))
|
||||
(org-move-to-column (min ncol col)))
|
||||
(goto-char pos))))
|
||||
|
||||
(defun org-set-tags-command (&optional arg just-align)
|
||||
|
@ -14610,9 +14611,7 @@ If DATA is nil or the empty string, any tags will be removed."
|
|||
(defun org-set-tags (&optional arg just-align)
|
||||
"Set the tags for the current headline.
|
||||
With prefix ARG, realign all tags in headings in the current buffer.
|
||||
When JUST-ALIGN is non-nil, only align tags.
|
||||
When JUST-ALIGN is 'ignore-column, align tags without trying to set
|
||||
the column by ignoring invisible text."
|
||||
When JUST-ALIGN is non-nil, only align tags."
|
||||
(interactive "P")
|
||||
(if (and (org-region-active-p) org-loop-over-headlines-in-active-region)
|
||||
(let ((cl (if (eq org-loop-over-headlines-in-active-region 'start-level)
|
||||
|
@ -14709,7 +14708,7 @@ the column by ignoring invisible text."
|
|||
(and (not (featurep 'xemacs)) c0 indent-tabs-mode (tabify p0 (point)))
|
||||
tags)
|
||||
(t (error "Tags alignment failed")))
|
||||
(org-move-to-column col nil nil (not (eq just-align 'ignore-column)))
|
||||
(org-move-to-column col)
|
||||
(unless just-align
|
||||
(run-hooks 'org-after-tags-change-hook))))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue