summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2020-02-02 19:39:26 +0100
committerBastien <bzg@gnu.org>2020-02-02 19:39:26 +0100
commita2b69c58f8d66d0d6cc58c74f32f1692bb5d9c0c (patch)
tree3f166fd34d4b6e0b69bd4efb7ef3b6a7bdb2ab91
parent8aa206583bfc23daae891271e4ded518325a3113 (diff)
downloadorg-mode-a2b69c58f8d66d0d6cc58c74f32f1692bb5d9c0c.tar.gz
org-agenda.el: Add `org-agenda-end-of-line'
* lisp/org-agenda.el (org-agenda-mode-map): Remap 'move-end-of-line to 'org-agenda-end-of-line. (org-agenda-end-of-line): New command. This fixes this bug: when moving to the end of line, if the next line is hidden, changing the timestamp of the current headline would not display the new time. This is also safer when archiving subtrees and when performing actions on agenda headlines in general.
-rw-r--r--lisp/org-agenda.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index d2397cc..9f355f3 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -93,6 +93,8 @@
(defvar org-habit-show-all-today)
(defvar org-habit-scheduled-past-days)
+(org-remap org-agenda-mode-map 'move-end-of-line 'org-agenda-end-of-line)
+
;; Defined somewhere in this file, but used before definition.
(defvar org-agenda-buffer-name "*Org Agenda*")
(defvar org-agenda-overriding-header nil)
@@ -1156,6 +1158,11 @@ argument, a calendar-style date list like (month day year)."
(string :tag "Format string")
(function :tag "Function")))
+(defun org-agenda-end-of-line ()
+ "Go to the end of visible line."
+ (interactive)
+ (goto-char (line-end-position)))
+
(defun org-agenda-format-date-aligned (date)
"Format a DATE string for display in the daily/weekly agenda.
This function makes sure that dates are aligned for easy reading."