Coder Social home page Coder Social logo

Question about tags about zetteldeft HOT 6 OPEN

efls avatar efls commented on June 8, 2024
Question about tags

from zetteldeft.

Comments (6)

EFLS avatar EFLS commented on June 8, 2024

I don't use org style tagging, as this only tags subtrees, while I like to tag files.

Personally, I simply use a set of memorized tags. I tend to use #tags for content related tags, and @tag to string notes together (for example when gathering notes to write a draft).

I also make specific notes that link to other notes, for example with a specific tag. The following code block automates that process (look for zd-insert-list-links in the documentation).

#+BEGIN_SRC emacs-lisp :results silent
(save-excursion
  (org-forward-element)
  ; Delete any existing list
  (when (org-in-item-p) (delete-region (point) (org-end-of-item-list)))
  ; New line & insert links
  (zd-insert-list-links "#meta")
  (org-return-indent)
  (insert (current-time-string) "\n"))
#+END_SRC

Now you can simply hit C-c C-c in this block, and a list with all #meta tagged notes will be generated.

from zetteldeft.

mediapathic avatar mediapathic commented on June 8, 2024

I'm using zetteldeft with markdown files, so org-style tagging is not available to me, and I don't miss it at all. I put most of my tags in a YAML block at the top of any file, so a file looks like

---
tags: #book
--- 
# 201906262124 BOOK - Underland
actual content etc

everything between the --- gets stripped out by most markdown parsers, so I can publish without worrying about tags showing up.

@EFLS that code looks really useful! Any chance of generalizing it to a function that takes a tag name as an input, and including it in zd? I am a fool and forgot this function already exists. Sorry!

from zetteldeft.

EFLS avatar EFLS commented on June 8, 2024

@EFLS that code looks really useful! Any chance of generalizing it to a function that takes a tag name as an input, and including it in zd? I am a fool and forgot this function already exists. Sorry!

It does indeed exist, but not in this interactrive manner. I might replace the code block by a single line in the future, for sake of consistency.

from zetteldeft.

TRSx80 avatar TRSx80 commented on June 8, 2024

I am trying to get my head around this as well. I am still in research phase so I might be misunderstanding, but tag functionality is something I also use/need, so I was wondering about it.

Even after reading through the docs a couple times however, I am still not sure what Zettledeft means by "tags", for instance:

  • Where can they be located?
    • Anywhere in the file, or?
    • Must they be in some meta data block at top?
  • How are they searchable?

As someone that does use tags In Orgmode, and is really only concerned about that sort of tagging (and not whatever Zettledeftt does) I was already thinking that by making the first line of the file a standard Org headline, something like:

* Some Title                             :tag1:tag2:

That you could maintain tags that would work in Org while still being able to find them from the Zettledeft interface. If my understanding is correct, this would also seem to negate the following comment:

I don't use org style tagging, as this only tags subtrees, while I like to tag files.

Zettledeft (I think) will also automatically remove the "* " heading prefix from Org, rendering a nice title in the interface, which is quite convenient.

If this is not the case, maybe someone can correct my misunderstanding.

from zetteldeft.

EFLS avatar EFLS commented on June 8, 2024

All relevant questions, and I guess this is a good indication that the documentation is lacking.

Everything in Zetteldeft relies on the plain text search Deft provides. This means tags are just strings that stand out and can be included anywhere in your document.

Tags are searchable directly in Deft, or you can visit a note and hit C-c d t (which is zetteldeft-avy-tag-search) to pop up an avy overlay and select a visible tag on your screen. Use C-c d T to generate a list of all tags.

You can also keep an automated list of links to note with a specific search string (or, in this case, a tag). I leverage Org-mode source blocks to achieve this.
This is documented in zd-tutorial, more specifically in these notes:

Zettledeft (I think) will also automatically remove the "* " heading prefix from Org, rendering a nice title in the interface

That is actually a feature from Deft, but it works on individual files. The titles shown are taken from files (rather than Org-mode tree headings).

from zetteldeft.

TRSx80 avatar TRSx80 commented on June 8, 2024

Everything in Zetteldeft relies on the plain text search Deft provides. This means tags are just strings that stand out and can be included anywhere in your document.

It is so obvious now that you mention it. I suppose I was scanning through all the tag specific menu parts, and "didn't see the forest for the trees." Therefore, not sure if it is any sign the docs need improvement.

automated list of links

Yes, there are some quite nice features in Zetteldeft, which is what got me looking at it in the first place. Thank you again for sharing it. 🍻

That is actually a feature from Deft, but it works on individual files. The titles shown are taken from files (rather than Org-mode tree headings).

I was reading some more deft docs last night, and I think you are right. I think deft will, by default, create #+TITLE: and not Org headings for the title of the individual note. However when searching the files for titles, I think it will take whatever is on the first line, whether that is #+TITLE:, Org or Markdown headling, etc... Now I wonder if I will be able to change settings in deft just to insert a plain "* Heading" type Org heading, instead of #+TITLE: by default. I guess I will go see...

I can say that I am excited enough about what I have read so far to give it a go. I'm sure things will become more clear to me once I start actually using the software.

Thanks for your quick replies, and sharing your insights, ELFS. 🍻

from zetteldeft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.