Function: org-agenda-show-the-flagging-note

org-agenda-show-the-flagging-note is an interactive and byte-compiled function defined in org-agenda.el.gz.

Signature

(org-agenda-show-the-flagging-note)

Documentation

Display the flagging note in the other window.

When called a second time in direct sequence, offer to remove the FLAGGING tag and (if present) the flagging note.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
;;; Flagging notes

(defun org-agenda-show-the-flagging-note ()
  "Display the flagging note in the other window.
When called a second time in direct sequence, offer to remove the FLAGGING
tag and (if present) the flagging note."
  (interactive)
  (let ((hdmarker (org-get-at-bol 'org-hd-marker))
	(win (selected-window))
	note) ;; heading newhead
    (unless hdmarker
      (user-error "No linked entry at point"))
    (if (and (eq this-command last-command)
	     (y-or-n-p "Unflag and remove any flagging note? "))
	(progn
	  (org-agenda-remove-flag hdmarker)
	  (let ((win (get-buffer-window "*Flagging Note*")))
	    (and win (delete-window win)))
	  (message "Entry unflagged"))
      (setq note (org-entry-get hdmarker "THEFLAGGINGNOTE"))
      (unless note
	(user-error "No flagging note"))
      (org-kill-new note)
      (switch-to-buffer-other-window "*Flagging Note*")
      (erase-buffer)
      (insert note)
      (goto-char (point-min))
      (while (re-search-forward "\\\\n" nil t)
	(replace-match "\n" t t))
      (goto-char (point-min))
      (select-window win)
      (message "%s" (substitute-command-keys "Flagging note pushed to \
kill ring.  Press `\\[org-agenda-show-the-flagging-note]' again to remove \
tag and note")))))