Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+ char used to separate multiple tags remains in the front-matter too #5

Closed
kaushalmodi opened this issue Jun 10, 2022 · 7 comments
Closed

Comments

@kaushalmodi
Copy link
Contributor

Recipe to reproduce the issue:

  1. M-x denote
  2. abc (entering title)
  3. tag1+tag2 (entering 2 tags for this note)

Generated file:

#+title:      abc
#+date:       2022-06-10
#+filetags:   tag1+tag2
#+identifier: 20220610T101714

Expected file:

#+title:      abc
#+date:       2022-06-10
#+filetags:   :tag1:tag2:
#+identifier: 20220610T101714

Example #+FILETAGS value in the Org manual: https://orgmode.org/manual/Tag-Inheritance.html.

  • Note: This will work too: #+filetags: tag1 tag2. But that is not documented in the Org manual.

Summary

The + used to separate multiple tags when entering them using M-x denote should not make it way to the front-matter.

@protesilaos
Copy link
Owner

Recipe to reproduce the issue:

I can't reproduce it. My tags are separated by two spaces.

When I evaluate this:

(denote "This is a test" '("tag1" "tag2"))

I get:

#+title:      This is a test
#+date:       2022-06-10
#+filetags:   tag1  tag2
#+identifier: 20220610T172624

2022-06-10_17:26:45_541x256

  • Note: This will work too: #+filetags: tag1 tag2. But that is
    not documented in the Org manual.

Indeed! This is what I settled on as it works for the other file types
as well.

The + used to separate multiple tags when entering them using M-x denote should not make it way to the front-matter.

Agreed!

@protesilaos
Copy link
Owner

By the way, I have no strong opinion about the "two spaces". I first introduced them by accident and then liked how they looked. But I am happy to go with one if that is the standard or whatnot.

@kaushalmodi
Copy link
Contributor Author

kaushalmodi commented Jun 10, 2022

When I evaluate this: (denote "This is a test" '("tag1" "tag2"))

I was using the interactive approach M-x denote. I was unable to add multiple tags to the "File keyword:" prompt, and so I used + to separate them. But then those + chars stay in the #+filetags too.

@protesilaos
Copy link
Owner

Oh I see. Did you try with the comma, which is the default crm-separator?

@kaushalmodi
Copy link
Contributor Author

kaushalmodi commented Jun 10, 2022

I have no strong opinion about the "two spaces". I first introduced them by accident and then liked how they looked.

I don't have a strong opinion about them either.

But I don't know if allowing spaces in tags has a strong use case. It will get a bit more complicated when supporting them in the front-matter. I'll open another ticket to discuss that.

Update: Ticket regarding multiple-word keywords: #6

@kaushalmodi
Copy link
Contributor Author

kaushalmodi commented Jun 10, 2022

Did you try with the comma, which is the default crm-separator?

That works! Thanks!

I did miss this in the manual:

Multiple keywords can be inserted by separating them with a comma (or whatever the value of the ~crm-indicator~ is---which should be a comma).

Sorry about that.

@protesilaos
Copy link
Owner

You are welcome!

protesilaos added a commit to protesilaos/ef-themes that referenced this issue Aug 20, 2022
Thanks to Spike-Leung for reminding me about it in issue 5 over at the
GitHub mirror: <protesilaos/denote#5>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants