如何删除组织模式导出中的标签?

发布于 2024-12-03 01:55:57 字数 134 浏览 0 评论 0原文

将组织模式文件导出为 ical 格式,标签似乎保留在事件和待办事项标题中。在议程模式下,我可以使用 org-agenda-remove-tags 删除它们,但我找不到这样的用于 ical 导出的选项。这个功能实现了吗?

谢谢你的建议...

Exporting an org-mode file to ical format, it seems that tags stay in events and todo titles. In agenda mode, i can remove them using org-agenda-remove-tags but i cannot find such an option for ical export. Is this feature implemented ?

Thank you for your advice...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

吐个泡泡 2024-12-10 01:55:57

您可以使用

#+OPTIONS: tags:nil

抑制导出文件中的标签。


但是,您使用的是 Org-Mode 的最新版本吗?

我只是尝试做我理解你的问题的事情,但标签似乎不包含在内。

如果我在没有默认设置的情况下导出以下标题:

* TODO Movie                                                :Movie:blah:
  Go see a movie
  <2011-09-17 Sat 13:00-14:00>

我的 .ics 文件具有以下内容:

BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:test
PRODID:-////Emacs with Org-mode//EN
X-WR-TIMEZONE:-0400
X-WR-CALDESC:nil
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID: TS-61193c39-f2e6-444c-9105-9499a2552bf5
DTSTART:20110917T130000
DTEND:20110917T140000
SUMMARY:TODO Movie
DESCRIPTION: Go see a movie\n<2011-09-17 Sat 13:00-14:00>
CATEGORIES:Movie,blah,test
END:VEVENT
END:VCALENDAR

我可以看到列为“类别”的标签,但看不到其他任何地方。

导出只会更改 UID

#+OPTIONS: tags:nil 

如果我添加到文件, 。尽管添加该选项后,ASCII 或 HTML 导出都会抑制标签。

You can use

#+OPTIONS: tags:nil

to suppress the tags in exported files.


However, are you using the most up-to-date version fo Org-Mode?

I just tried doing what I understand your question to be and the tags don't seem to be included.

If I export the following headlines without the default settings:

* TODO Movie                                                :Movie:blah:
  Go see a movie
  <2011-09-17 Sat 13:00-14:00>

My .ics file has the following:

BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:test
PRODID:-////Emacs with Org-mode//EN
X-WR-TIMEZONE:-0400
X-WR-CALDESC:nil
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID: TS-61193c39-f2e6-444c-9105-9499a2552bf5
DTSTART:20110917T130000
DTEND:20110917T140000
SUMMARY:TODO Movie
DESCRIPTION: Go see a movie\n<2011-09-17 Sat 13:00-14:00>
CATEGORIES:Movie,blah,test
END:VEVENT
END:VCALENDAR

I can see the tags listed as CATEGORIES, but not anywhere else.

The export only changes the UID if I add

#+OPTIONS: tags:nil 

to the file. Although an ASCII or HTML export will both suppress the tags when the option is added.

烟酒忠诚 2024-12-10 01:55:57

全局:(setq org-icalendar-categories nil)

仅适用于特定执行:(let ((org-icalendar-categories nil)) (org-icalendar-export-to-ics nil t))

我是怎么找到它的?

我通过 org-icalendar-export-to-ics 函数到达源代码,从那里,我找到了这个变量(如您所见,默认为 '(本地标签类别) value):

(defcustom org-icalendar-categories '(local-tags category)
  "Items that should be entered into the \"categories\" field.

This is a list of symbols, the following are valid:
`category'    The Org mode category of the current file or tree
`todo-state'  The todo state, if any
`local-tags'  The tags, defined in the current line
`all-tags'    All tags, including inherited ones."
  :group 'org-export-icalendar
  :type '(repeat
      (choice
       (const :tag "The file or tree category" category)
       (const :tag "The TODO state" todo-state)
       (const :tag "Tags defined in current line" local-tags)
       (const :tag "All tags, including inherited ones" all-tags))))

Extra ball

(org-icalendar-export-to-ics nil t) 是如何工作的?从声明的子树中读取属性(从这个意义上说,其工作方式与使用 org-export 内容导出子树非常相似),因此,在父级中您还可以设置属性 :EXPORT_FILE_NAME: ,这样您可以指向另一个文件路径,例如 /tmp/invite.ics :)

globally: (setq org-icalendar-categories nil)

only for a particular execution: (let ((org-icalendar-categories nil)) (org-icalendar-export-to-ics nil t))

How I found it?

I arrived to the sourcecode through org-icalendar-export-to-ics function, from there, I found this variable (that, as you see, defaults to '(local-tags category) value):

(defcustom org-icalendar-categories '(local-tags category)
  "Items that should be entered into the \"categories\" field.

This is a list of symbols, the following are valid:
`category'    The Org mode category of the current file or tree
`todo-state'  The todo state, if any
`local-tags'  The tags, defined in the current line
`all-tags'    All tags, including inherited ones."
  :group 'org-export-icalendar
  :type '(repeat
      (choice
       (const :tag "The file or tree category" category)
       (const :tag "The TODO state" todo-state)
       (const :tag "Tags defined in current line" local-tags)
       (const :tag "All tags, including inherited ones" all-tags))))

Extra ball

How (org-icalendar-export-to-ics nil t) works? Read the properties from the declared subtree (in that sense, works very similar to exporting a subtree with the org-export stuff), hence, in the parent you can also set property :EXPORT_FILE_NAME: and that way you can point to another file path such as /tmp/invite.ics :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文