emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* assign tags via helm/avy?
@ 2016-05-29 15:00 Xebar Saram
  2016-05-31  0:42 ` John Kitchin
  0 siblings, 1 reply; 6+ messages in thread
From: Xebar Saram @ 2016-05-29 15:00 UTC (permalink / raw)
  To: org mode

[-- Attachment #1: Type: text/plain, Size: 647 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: assign tags via helm/avy?
  2016-05-29 15:00 assign tags via helm/avy? Xebar Saram
@ 2016-05-31  0:42 ` John Kitchin
  2016-05-31  3:17   ` Xebar Saram
  0 siblings, 1 reply; 6+ messages in thread
From: John Kitchin @ 2016-05-31  0:42 UTC (permalink / raw)
  To: Xebar Saram; +Cc: org mode

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: assign tags via helm/avy?
  2016-05-31  0:42 ` John Kitchin
@ 2016-05-31  3:17   ` Xebar Saram
  2016-05-31  3:40     ` Kaushal Modi
  0 siblings, 1 reply; 6+ messages in thread
From: Xebar Saram @ 2016-05-31  3:17 UTC (permalink / raw)
  To: John Kitchin; +Cc: org mode

[-- Attachment #1: Type: text/plain, Size: 1738 bytes --]

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 <jkitchin@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
>

[-- Attachment #2: Type: text/html, Size: 2840 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: assign tags via helm/avy?
  2016-05-31  3:17   ` Xebar Saram
@ 2016-05-31  3:40     ` Kaushal Modi
  2016-06-01  7:15       ` Xebar Saram
  0 siblings, 1 reply; 6+ messages in thread
From: Kaushal Modi @ 2016-05-31  3:40 UTC (permalink / raw)
  To: Xebar Saram, John Kitchin; +Cc: org mode

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

On Mon, May 30, 2016, 11:18 PM Xebar Saram <zeltakc@gmail.com> wrote:

> 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
>

If you use the ivy-family of list completion, check out the counsel
package, and the cousel-org-tag function in there.

> --

-- 
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 952 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: assign tags via helm/avy?
  2016-05-31  3:40     ` Kaushal Modi
@ 2016-06-01  7:15       ` Xebar Saram
  2016-06-01 11:19         ` John Kitchin
  0 siblings, 1 reply; 6+ messages in thread
From: Xebar Saram @ 2016-06-01  7:15 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: org mode, John Kitchin

[-- Attachment #1: Type: text/plain, Size: 1213 bytes --]

Thx so much guys for the great answers

Kaushal Modi: cousel-org-tag is fantastic and works very well for me

John: i did try helm with (mapcar 'car 'org-tag-persistent-alist ) but it
gave me an error:

cons: Wrong type argument: sequencep, org-tag-persistent-alist


the code i used:

(defun helm-tagger ()
  (interactive)
  (helm
   :sources
   `((name . "HELM tag setter")
     (candidates . ,(mapcar 'car 'org-tag-persistent-alist ))
     (action . (lambda (candidate)
                 (org-set-tags-to (helm-marked-candidates)))))))


to be honest cousel-org-tag works really well but if anyone else is
interested in the helm part ive posted the error

kind regards

Z



On Tue, May 31, 2016 at 6:40 AM, Kaushal Modi <kaushal.modi@gmail.com>
wrote:

>
>
> On Mon, May 30, 2016, 11:18 PM Xebar Saram <zeltakc@gmail.com> wrote:
>
>> 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
>>
>
> If you use the ivy-family of list completion, check out the counsel
> package, and the cousel-org-tag function in there.
>
>> --
>
> --
> Kaushal Modi
>

[-- Attachment #2: Type: text/html, Size: 3657 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: assign tags via helm/avy?
  2016-06-01  7:15       ` Xebar Saram
@ 2016-06-01 11:19         ` John Kitchin
  0 siblings, 0 replies; 6+ messages in thread
From: John Kitchin @ 2016-06-01 11:19 UTC (permalink / raw)
  To: Xebar Saram; +Cc: org mode, Kaushal Modi

I had one too many quotes in there. It should have been ,(mapcar 'car
org-tag-persistent-alist)

The counsel command is nice too. I have a lot of helm muscle memory to
work with though ;)

Xebar Saram writes:

> Thx so much guys for the great answers
>
> Kaushal Modi: cousel-org-tag is fantastic and works very well for me
>
> John: i did try helm with (mapcar 'car 'org-tag-persistent-alist ) but it
> gave me an error:
>
> cons: Wrong type argument: sequencep, org-tag-persistent-alist
>
>
> the code i used:
>
> (defun helm-tagger ()
>   (interactive)
>   (helm
>    :sources
>    `((name . "HELM tag setter")
>      (candidates . ,(mapcar 'car 'org-tag-persistent-alist ))
>      (action . (lambda (candidate)
>                  (org-set-tags-to (helm-marked-candidates)))))))
>
>
> to be honest cousel-org-tag works really well but if anyone else is
> interested in the helm part ive posted the error
>
> kind regards
>
> Z
>
>
>
> On Tue, May 31, 2016 at 6:40 AM, Kaushal Modi <kaushal.modi@gmail.com>
> wrote:
>
>>
>>
>> On Mon, May 30, 2016, 11:18 PM Xebar Saram <zeltakc@gmail.com> wrote:
>>
>>> 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
>>>
>>
>> If you use the ivy-family of list completion, check out the counsel
>> package, and the cousel-org-tag function in there.
>>
>>> --
>>
>> --
>> Kaushal Modi
>>


-- 
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-01 11:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-29 15:00 assign tags via helm/avy? Xebar Saram
2016-05-31  0:42 ` John Kitchin
2016-05-31  3:17   ` Xebar Saram
2016-05-31  3:40     ` Kaushal Modi
2016-06-01  7:15       ` Xebar Saram
2016-06-01 11:19         ` John Kitchin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).