Function: org-edit-headline

org-edit-headline is an interactive and byte-compiled function defined in org.el.gz.

Signature

(org-edit-headline &optional HEADING)

Documentation

Edit the current headline.

Set it to HEADING when provided.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-edit-headline (&optional heading)
  "Edit the current headline.
Set it to HEADING when provided."
  (interactive)
  (org-with-wide-buffer
   (org-back-to-heading t)
   (let ((case-fold-search nil))
     (when (looking-at org-complex-heading-regexp)
       (let* ((old (match-string-no-properties 4))
	      (new (save-match-data
		     (org-trim (or heading (read-string "Edit: " old))))))
	 (unless (equal old new)
	   (if old (replace-match new t t nil 4)
	     (goto-char (or (match-end 3) (match-end 2) (match-end 1)))
	     (insert " " new))
	   (when org-auto-align-tags (org-align-tags))
	   (when (looking-at "[ \t]*$") (replace-match ""))))))))