Function: org-ctags-append-topic

org-ctags-append-topic is an interactive and byte-compiled function defined in org-ctags.el.gz.

Signature

(org-ctags-append-topic NAME &optional NARROWP)

Documentation

This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS.

Append a new toplevel heading to the end of the current buffer. The heading contains NAME surrounded by <<angular brackets>>, thus making the heading a destination for the tag NAME.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-ctags.el.gz
(defun org-ctags-append-topic (name &optional narrowp)
  "This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS.
Append a new toplevel heading to the end of the current buffer.  The
heading contains NAME surrounded by <<angular brackets>>, thus making
the heading a destination for the tag `NAME'."
  (interactive "sTopic: ")
  (widen)
  (goto-char (point-max))
  (newline 2)
  (message "Adding topic in buffer %s" (buffer-name))
  (insert (org-ctags-string-search-and-replace
           "%t" (capitalize name) org-ctags-new-topic-template))
  (backward-char 4)
  (end-of-line)
  (forward-line 2)
  (when narrowp
    ;;(org-tree-to-indirect-buffer 1)  ;; opens new frame
    (org-narrow-to-subtree))
  t)