0

I've got a file with a lot of headlines, each of which has the keyword property defined. The basic case is that an entry has multiple keywords.

I'd like to define a custom agenda command that asks for an input keyword and displays all and only the headlines that have that keyword as one of its keywords. I can't figure out how to define a custom agenda command that asks for an input and then performs operations on/with it.

I know how to hardwire that the command should search only one of my .org files, rather than all of the files that are listed in agenda list. I.e., I know to start thus:

(setq org-agenda-custom-commands
      (quote
       (;this parenthesis is the beginning of the list of agenda custom views
    ("k" "Keyword Search in the Zettelkasten"
     ( ; start list of commands

      ;; command 
      ( ;; presumably the commands asking for user input go here (??)
          (              ; begin list of options
           (org-agenda-files '("~/org/zettelkasten.org")) ; only use zettelkasten
           )                 ; end list of options
          )                  ; end of scheduling command

      ) ;end list of commands
     (  ; begin view-wide options
      (org-agenda-compact-blocks t) ; compact view (this is just there to
                    ; show the place for view-wide options.
      ) ; end view-wide options
     )  ; end of definition of of this view 
    ;; The following parentheses are for the whole defintion of the variable
         )      ; marks the end of the list of views
    )       ; end of the quote needed to correctly set the variable
       )        ; end of setq command

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.