thx so much john!

is there a way where the function can auto read all the tags from
"org-tag-persistent-alist " instead of manfully adding to the function each
time a new tag is added?

best

Z

On Tue, May 31, 2016 at 3:42 AM, John Kitchin <jkitc...@andrew.cmu.edu>
wrote:

> Here is a helm approach that seems like what you want.
>
> #+BEGIN_SRC emacs-lisp
> (defun tag-lister ()
>   "Function that gets and returns possible tags."
>   (list "tag1" "tag2" "tag3"))
>
> (defun helm-tagger ()
>   (interactive)
>   (helm
>    :sources
>    `((name . "HELM tag setter")
>      (candidates . ,(tag-lister))
>      (action . (lambda (candidate)
>                  (org-set-tags-to (helm-marked-candidates)))))))
>
>
> #+END_SRC
> Xebar Saram writes:
>
> > Hi guys
> >
> > i have a bunch of tags i define via
> >
> > (:startgroup)
> >     ("Where?")
> >     (:grouptags)
> >      ("@home" . ?h)
> >      ("@work" . ?w)
> >      ("@pc" . ?p)
> >      ("@family" . ?f)
> >      ("@shop" . ?s)
> >      (:endgroup)
> >
> > (:startgrouptag)
> >     ("people")
> >     (:grouptags)
> >     ("allan" . ?a)
> >     ("bob" . ?o)
> >     ("joel" . ?j)
> >     ("david" . ?d)
> >     ("boris" . ?b)
> >     ("massimo" . ?s)
> >      (:endgrouptag)
> >
> > anyone know of a way to quick add tags via a helm/avy interface?
> >
> > right now its quite cumbersome to press C-c then C-c to see a list of all
> > tags. also some tags have the same key (?a) and then its impossible to
> > select the 2nd one
> >
> > thx alot in advance
> >
> > Z
>
>
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>

Reply via email to