Function: org-agenda-set-restriction-lock-from-agenda

org-agenda-set-restriction-lock-from-agenda is an interactive and byte-compiled function defined in org-agenda.el.gz.

Signature

(org-agenda-set-restriction-lock-from-agenda ARG)

Documentation

Set the restriction lock to the agenda item at point from within the agenda.

When called with a C-u (universal-argument) prefix, restrict to the file which contains the item. Argument ARG is the prefix argument.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-agenda.el.gz
(defun org-agenda-set-restriction-lock-from-agenda (arg)
  "Set the restriction lock to the agenda item at point from within the agenda.
When called with a `\\[universal-argument]' prefix, restrict to
the file which contains the item.
Argument ARG is the prefix argument."
  (interactive "P")
  (unless  (derived-mode-p 'org-agenda-mode)
    (user-error "Not in an Org agenda buffer"))
  (let* ((marker (or (org-get-at-bol 'org-marker)
                     (org-agenda-error)))
         (buffer (marker-buffer marker))
         (pos (marker-position marker)))
    (with-current-buffer buffer
      (goto-char pos)
      (org-agenda-set-restriction-lock arg))))