all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Tracking Tags ??
@ 2019-01-23  0:53 David Masterson
  2019-01-23 18:24 ` Colin Baxter
  0 siblings, 1 reply; 9+ messages in thread
From: David Masterson @ 2019-01-23  0:53 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

Anyone have a good method of tracking the Tags that you've use across
all of your Org files?  Some sort of Tag Index to help you keep track of
the tags you've used and where you've used them so that you don't start
creating new tags that differ from old ones by (say) capitalization?  Or
to help you find everything tagged a certain when you're moving to a new
tagging style?  Perhaps an index where you could keep a note on why and
when you created the tag?

Is there any tools for this?
--
David

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

* Re: Tracking Tags ??
@ 2019-01-23 15:17 Anders Johansson
  2019-01-24  1:07 ` David Masterson
  0 siblings, 1 reply; 9+ messages in thread
From: Anders Johansson @ 2019-01-23 15:17 UTC (permalink / raw)
  To: dsmasterson, emacs-orgmode

> Anyone have a good method of tracking the Tags that you've use 
> across
> all of your Org files?  Some sort of Tag Index to help you keep 
> track of
> the tags you've used and where you've used them so that you 
> don't start
> creating new tags that differ from old ones by (say) 
> capitalization?  Or
> to help you find everything tagged a certain when you're moving 
> to a new
> tagging style?  Perhaps an index where you could keep a note on 
> why and
> when you created the tag?

> Is there any tools for this?

I have struggled with similar issues in the context of using tags 
for coding in qualitative data analysis. The stuff that I’ve 
hacked together for solving this (pretty particular) use case are 
available here: https://gitlab.com/andersjohansson/orgqda

Maybe some of the ideas there can help?

This is centred around projects (a bunch of files with research 
material in text form) and I haven’t thought much about adapting 
it to be used for all my org files.

For a project, you can easily extract a list of all used tags, 
rename and merge them. You can define a file for each project as a 
codebook, where the use of each tag is documented. There is also a 
more fancy tag-completion via helm that optionally fetches info 
from the codebook file.

Another approach for keeping a sort of index is John Kitchin’s 
org-db

http://kitchingroup.cheme.cmu.edu/blog/2017/01/03/Find-stuff-in-org-mode-anywhere/
Current code:
https://github.com/jkitchin/scimax/blob/master/org-db.el

-- 
Anders Johansson

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

* Re: Tracking Tags ??
  2019-01-23  0:53 Tracking Tags ?? David Masterson
@ 2019-01-23 18:24 ` Colin Baxter
  2019-01-23 18:46   ` John Kitchin
  2019-01-24  1:12   ` David Masterson
  0 siblings, 2 replies; 9+ messages in thread
From: Colin Baxter @ 2019-01-23 18:24 UTC (permalink / raw)
  To: David Masterson; +Cc: emacs-orgmode@gnu.org

Hello David,
>>>>> David Masterson <dsmasterson@outlook.com> writes:

    > Anyone have a good method of tracking the Tags that you've use
    > across all of your Org files?  Some sort of Tag Index to help you
    > keep track of the tags you've used and where you've used them so
    > that you don't start creating new tags that differ from old ones
    > by (say) capitalization?  Or to help you find everything tagged a
    > certain when you're moving to a new tagging style?  Perhaps an
    > index where you could keep a note on why and when you created the
    > tag?

    > Is there any tools for this?  -- David

Maybe I'm old-fashioned, but what's wrong with just using grep?

Best wishes,


Colin Baxter
m43cap@yandex.com
---------------------------------------------------------------------
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
---------------------------------------------------------------------
Since mathematicians have invaded the theory of relativity, I do not
understand it myself. A. Einstein

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

* Re: Tracking Tags ??
  2019-01-23 18:24 ` Colin Baxter
@ 2019-01-23 18:46   ` John Kitchin
  2019-01-23 19:48     ` Colin Baxter
  2019-01-24  1:12   ` David Masterson
  1 sibling, 1 reply; 9+ messages in thread
From: John Kitchin @ 2019-01-23 18:46 UTC (permalink / raw)
  To: Colin Baxter; +Cc: David Masterson, emacs-orgmode@gnu.org

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

There are a few ways to specify tags with inheritance at the file, and
heading level that would be trickier to get via grep. That said, if you
have a nice grep cmd/regexp that finds tags do share!

John

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



On Wed, Jan 23, 2019 at 1:25 PM Colin Baxter <m43cap@yandex.com> wrote:

> Hello David,
> >>>>> David Masterson <dsmasterson@outlook.com> writes:
>
>     > Anyone have a good method of tracking the Tags that you've use
>     > across all of your Org files?  Some sort of Tag Index to help you
>     > keep track of the tags you've used and where you've used them so
>     > that you don't start creating new tags that differ from old ones
>     > by (say) capitalization?  Or to help you find everything tagged a
>     > certain when you're moving to a new tagging style?  Perhaps an
>     > index where you could keep a note on why and when you created the
>     > tag?
>
>     > Is there any tools for this?  -- David
>
> Maybe I'm old-fashioned, but what's wrong with just using grep?
>
> Best wishes,
>
>
> Colin Baxter
> m43cap@yandex.com
> ---------------------------------------------------------------------
> GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
> ---------------------------------------------------------------------
> Since mathematicians have invaded the theory of relativity, I do not
> understand it myself. A. Einstein
>
>

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

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

* Re: Tracking Tags ??
  2019-01-23 18:46   ` John Kitchin
@ 2019-01-23 19:48     ` Colin Baxter
  2019-01-23 20:22       ` John Kitchin
  0 siblings, 1 reply; 9+ messages in thread
From: Colin Baxter @ 2019-01-23 19:48 UTC (permalink / raw)
  To: John Kitchin; +Cc: David Masterson, emacs-orgmode@gnu.org

>>>>> John Kitchin <jkitchin@andrew.cmu.edu> writes:

    > There are a few ways to specify tags with inheritance at the file,
    > and heading level that would be trickier to get via grep. That
    > said, if you have a nice grep cmd/regexp that finds tags do share!

I take your point. My setup must be very simple because I find just
'grep -irn <TAG> .' is sufficient.

Best wishes,

Colin Baxter
m43cap@yandex.com
---------------------------------------------------------------------
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
---------------------------------------------------------------------
The sole cause of all human misery is the inability of people to sit
quietly in their rooms.  Blaise Pascal, 1670

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

* Re: Tracking Tags ??
  2019-01-23 19:48     ` Colin Baxter
@ 2019-01-23 20:22       ` John Kitchin
  2019-01-23 21:57         ` Ken Mankoff
  0 siblings, 1 reply; 9+ messages in thread
From: John Kitchin @ 2019-01-23 20:22 UTC (permalink / raw)
  To: Colin Baxter; +Cc: David Masterson, emacs-orgmode@gnu.org

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

I see, that only finds files with the particular tag. I think the goal of
this is to get a list of all the tags, for use in completion, for example.

John

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



On Wed, Jan 23, 2019 at 2:48 PM Colin Baxter <m43cap@yandex.com> wrote:

> >>>>> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>
>     > There are a few ways to specify tags with inheritance at the file,
>     > and heading level that would be trickier to get via grep. That
>     > said, if you have a nice grep cmd/regexp that finds tags do share!
>
> I take your point. My setup must be very simple because I find just
> 'grep -irn <TAG> .' is sufficient.
>
> Best wishes,
>
> Colin Baxter
> m43cap@yandex.com
> ---------------------------------------------------------------------
> GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
> ---------------------------------------------------------------------
> The sole cause of all human misery is the inability of people to sit
> quietly in their rooms.  Blaise Pascal, 1670
>

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

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

* Re: Tracking Tags ??
  2019-01-23 20:22       ` John Kitchin
@ 2019-01-23 21:57         ` Ken Mankoff
  0 siblings, 0 replies; 9+ messages in thread
From: Ken Mankoff @ 2019-01-23 21:57 UTC (permalink / raw)
  To: John Kitchin; +Cc: David Masterson, Colin Baxter, emacs-orgmode@gnu.org


On 2019-01-23 at 12:22 -0800, John Kitchin <jkitchin@andrew.cmu.edu> wrote...
> I see, that only finds files with the particular tag. I think the goal of
> this is to get a list of all the tags, for use in completion, for example.

I do not think grep is the right solution, but as an ugly hack it can find most of my tags rather easily. Tags are wrapped in "::" and at the end of the line, I think. Assuming that, then,

grep -h -E -o "\:.*\:$" *.org | grep -v -E "PROPERTIES|CATEGORY|END|LOG|STYLE|REPEAT|ID|RESULTS" | tr ':' '\n' | sort | uniq -c | sort -n

Gives all my tags sorted by usage (I don't use them much) plus a few stray words others...

Since drawers are usually begin on the 1st column, or within the first few columns, an alternative to the negative grep could be "cat *.org | cut -c10- | ..." or some other method to skip the first few columns, rather than growing the negative grep list.

  -k.

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

* Re: Tracking Tags ??
  2019-01-23 15:17 Anders Johansson
@ 2019-01-24  1:07 ` David Masterson
  0 siblings, 0 replies; 9+ messages in thread
From: David Masterson @ 2019-01-24  1:07 UTC (permalink / raw)
  To: Anders Johansson; +Cc: emacs-orgmode@gnu.org

I wrote:

>> Anyone have a good method of tracking the Tags that you've used across
>> all of your Org files?  Some sort of Tag Index to help you keep track
>> of the tags you've used and where you've used them so that you don't
>> start creating new tags that differ from old ones by (say)
>> capitalization?  Or to help you find everything tagged a certain way
>> when you're moving to a new tagging style?  Perhaps an index where
>> you could keep a note on why and when you created the tag?
>>
>> Is there any tools for this?

Geez, my grammar is terrible because I dropped words! (fixed)

Anders Johansson <mejlaandersj@gmail.com> writes:

> I have struggled with similar issues in the context of using tags for
> coding in qualitative data analysis. The stuff that I’ve hacked
> together for solving this (pretty particular) use case are available
> here: https://gitlab.com/andersjohansson/orgqda
>
> Maybe some of the ideas there can help?
>
> This is centred around projects (a bunch of files with research
> material in text form) and I haven’t thought much about adapting it to
> be used for all my org files.

Interesting.  It seems you're building an Emacs internal database of
tags stored in Emacs variables.  I'm thinking it might be better to
store the information as Org meta file where a header is a tag and under
that might be a note and a table of references to where the tag is used.

> For a project, you can easily extract a list of all used tags, rename
> and merge them. You can define a file for each project as a codebook,
> where the use of each tag is documented. There is also a more fancy
> tag-completion via helm that optionally fetches info from the codebook
> file.

Still learning helm and how it applies.

> Another approach for keeping a sort of index is John Kitchin’s org-db
>
> http://kitchingroup.cheme.cmu.edu/blog/2017/01/03/Find-stuff-in-org-mode-anywhere/
> Current code:
> https://github.com/jkitchin/scimax/blob/master/org-db.el

Hmm. Beyond my Emacs hacking...

Thanks.
--
David

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

* Re: Tracking Tags ??
  2019-01-23 18:24 ` Colin Baxter
  2019-01-23 18:46   ` John Kitchin
@ 2019-01-24  1:12   ` David Masterson
  1 sibling, 0 replies; 9+ messages in thread
From: David Masterson @ 2019-01-24  1:12 UTC (permalink / raw)
  To: Colin Baxter; +Cc: emacs-orgmode@gnu.org

Colin Baxter <m43cap@yandex.com> writes:

> Hello David,

>>>>>> David Masterson <dsmasterson@outlook.com> writes:
>
>     > Anyone have a good method of tracking the Tags that you've use
>     > across all of your Org files?  Some sort of Tag Index to help you
>     > keep track of the tags you've used and where you've used them so
>     > that you don't start creating new tags that differ from old ones
>     > by (say) capitalization?  Or to help you find everything tagged a
>     > certain when you're moving to a new tagging style?  Perhaps an
>     > index where you could keep a note on why and when you created the
>     > tag?
>
>     > Is there any tools for this?  -- David
>
> Maybe I'm old-fashioned, but what's wrong with just using grep?

Hmm.  Little old-fashioned myself, but I was thinking of something a
little more integrated with Org.  Perhaps something that could populate
an Org table with the Tag information for reference.  Just a thought...

--
David

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

end of thread, other threads:[~2019-01-24  1:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-23  0:53 Tracking Tags ?? David Masterson
2019-01-23 18:24 ` Colin Baxter
2019-01-23 18:46   ` John Kitchin
2019-01-23 19:48     ` Colin Baxter
2019-01-23 20:22       ` John Kitchin
2019-01-23 21:57         ` Ken Mankoff
2019-01-24  1:12   ` David Masterson
  -- strict thread matches above, loose matches on Subject: below --
2019-01-23 15:17 Anders Johansson
2019-01-24  1:07 ` David Masterson

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.