[FEATURE REQUEST] Introduce support for FILETAGS in the org-set/toggle-tag function. [9.6.6 (release_9.6.6 @ /opt/homebrew/Cellar/emacs-head@30/30.0.50_1/share/emacs/30.0.50/lisp/org/)]

2023-09-13 Thread Tianshu Wang
I am seeking this support because when adding Attachments to Org File
without Headlines, I get a user-error: Before first headline at position
1 in buffer filename.org, even if the attachment has been successfully
added. I hope there are no errors, and the #+FILETAGS of filename.org
buffer has added `org-attach-auto-tag'. After a simple exploration, I
found that this requires the support of org-set/toggle-tag to modify
FILETAGS.

Emacs  : GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin22.4.0, NS 
appkit-2299.50 Version 13.3.1 (a) (Build 22E772610a))
 of 2023-05-25
Package: Org mode version 9.6.6 (release_9.6.6 @ 
/opt/homebrew/Cellar/emacs-head@30/30.0.50_1/share/emacs/30.0.50/lisp/org/)

--
Tianshu Wang



Re: Description list with " :: " in the tag.

2023-09-13 Thread Tom Alexander
I've written a patch (attached) with my proposed wording changes to the 
documentation, should I be starting another thread or does dropping it here 
work best? I do not have commit access so I'd need someone with such authority 
to do the last bit.

-- 
Tom Alexander
From 20addaa5ab7d4e9420ade1125c2a337345ecdd31 Mon Sep 17 00:00:00 2001
From: Tom Alexander 
Date: Wed, 13 Sep 2023 18:19:05 -0400
Subject: [PATCH] org-syntax.org: Fix definition of description list tags.

Description lists support objects in their tags and they support the substring " :: ".
---
 org-syntax.org | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/org-syntax.org b/org-syntax.org
index 123fc232..3046e26c 100644
--- a/org-syntax.org
+++ b/org-syntax.org
@@ -470,9 +470,10 @@ BULLET COUNTER-SET CHECK-BOX TAG CONTENTS
 + CHECK-BOX (optional) :: A single whitespace character, an =X=
   character, or a hyphen enclosed by square brackets (i.e. =[ ]=, =[X]=, or =[-]=).
 + TAG (optional) :: An instance of the pattern =TAG-TEXT ::= where
-  =TAG-TEXT= represents a string consisting of non-newline characters
-  that does not contain the substring =" :: "= (two colons surrounded by
-  whitespace, without the quotes).
+  =TAG-TEXT= is one of more objects from the standard set so long as
+  they do not contain a newline character, until the last occurrence
+  of the substring =" :: "= (two colons surrounded by whitespace,
+  without the quotes).
 + CONTENTS (optional) :: A collection of zero or more elements, ending
   at the first instance of one of the following:
   - The next item.
-- 
2.42.0



Re: How do I enable exports of code only for the whole file?

2023-09-13 Thread Fraga, Eric
On Wednesday, 13 Sep 2023 at 22:24, Vladimir Nikishkin wrote:
> I know that I can write src_org[:exports code], but doing that for each
> inline code block is a lot of (needless) work.

Not really answering your question but do remember that Emacs is a
brilliant text editor and it would take a single command to modify all
src_org in your file?

But coming back to your question, could you not modify

org-babel-default-inline-header-args

to have code exported?  You could define it as a file local variable to
not affect other documents.

-- 
: Eric S Fraga, with org release_9.6.7-635-gf9e083 in Emacs 30.0.50


Re: [BUG] wrong-type-argument listp 4240 [9.7-pre (release_9.6.8-749-g4fe52f @ .emacs.d/org-mode-git/lisp/)]

2023-09-13 Thread Paul Stansell
Hello Ihor,

Please let us know if you keep seeing the error more than once.
>
> If you do, we will provide instructions how to get more debugging info,
> so that we can figure out what exactly is going wrong.
>

Since I reported the first warning message in this thread, I've had about
half a dozen similar (but not identical) ones when opening an org file.
They are not repeatable though, in the sense that if I close the file and
re-open it I don't see the warning a second time.

The latest message is this:

   Warning (org-element-cache): org-element--cache: Org parser error
   in file.org::1687. Resetting.
The error was: (error "Invalid search bound (wrong side of point)")
Backtrace:
   nil
Please report this to Org mode mailing list (M-x
org-submit-bug-report). Disable showing Disable logging

Paul


How do I enable exports of code only for the whole file?

2023-09-13 Thread Vladimir Nikishkin
Hello, everyone

I have quite a lot of src_XXX code blocks in my article.
I want to export them all as code only.
I know that I can write src_org[:exports code], but doing that for each
inline code block is a lot of (needless) work.

The manual on page [[info:org#Exporting Code Blocks][org#Exporting Code 
Blocks]] 
is pointing to the page: [[info:org#Literal Examples][org#Literal Examples]],
but this page does not have that information either.


-- 
Your sincerely,
Vladimir Nikishkin (MiEr, lockywolf)
(Laptop)



Re: Preventing inadvertent global modifications

2023-09-13 Thread Max Nikulin

On 13/09/2023 15:02, Ihor Radchenko wrote:

Max Nikulin writes:


Yesterday, when I was going to commit changes after editing several
headings in different places of an Org file, I was surprised by huge
diff with hundreds of chunks. Tags spread across the whole file were
adjusted by one or tow spaces. Probably I just accidentally hit C-u
before setting a tag to a new heading by C-c C-q. Of course, I did not
noticed it immediately. I managed to create a commit with real changes
without noise due to tags realignment. However I would like to prevent
similar issues in future.


You can set `org-auto-align-tags' to nil.


I saw it, but from its description I decided that its effect may be to 
broad. I have tried it and to my surprise it does not affect editing of 
heading, tags are kept aligned. M- and M- do not realign 
tags, so the value is not ignored.


C-u C-c C-q still realigns all tags in the buffer, so this option would 
not save me from getting huge diff.


I suspect there are enough commands having similar global (and so mostly 
hidden) effect. I may be unaware of them because I do not feel that I 
need such commands.


I admit that some fraction of users keep their files tidy calling C-u 
C-c C-q regularly. Perhaps at certain moment I will decide no align 
tags, but it should be a dedicated commit not mixed with other changes. 
My opinion that, by default, commands performing massive changes should 
require reasonable efforts to execute. It should help to avoid calling 
them unintentionally. Perhaps there is a better approach than annoying 
`yes-or-no-p'.






Patch: hiding org emphasis markers

2023-09-13 Thread Tommy Phillips
Hello,

Here is a suggested small patch for how org hides emphasis markers.
It's my first patch so hopefully I'm submitting it correctly.

All the best,
Tommy


0001-lisp-org.el-Only-hide-emphasis-markers-that-are-in-o.patch
Description: Binary data


Re: Preventing inadvertent global modifications

2023-09-13 Thread Ihor Radchenko
Max Nikulin  writes:

> Yesterday, when I was going to commit changes after editing several 
> headings in different places of an Org file, I was surprised by huge 
> diff with hundreds of chunks. Tags spread across the whole file were 
> adjusted by one or tow spaces. Probably I just accidentally hit C-u 
> before setting a tag to a new heading by C-c C-q. Of course, I did not 
> noticed it immediately. I managed to create a commit with real changes 
> without noise due to tags realignment. However I would like to prevent 
> similar issues in future.

You can set `org-auto-align-tags' to nil.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [BUG] src and example blocks do not properly escape headings [9.6.6 (release_9.6.6 @ /usr/share/emacs/30.0.50/lisp/org/)]

2023-09-13 Thread Ihor Radchenko
note meta  writes:

> I think you might use a comma.
>
> See here https://orgmode.org/worg/org-syntax.html#Blocks
>
> Lines beginning with an asterisk or #+ must be quoted by a comma (,*, ,#+).

Exactly. Closing.
Canceled.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: ICalendar export

2023-09-13 Thread Ihor Radchenko
Henrik Frisk  writes:

> Recently (not sure when) the ics output came out malformed and a newline is
> omitted between the end of one event and the beginning of another:
>
> END:VEVENT
> BEGIN:VEVENT
>
> is now
>
> END:VEVENTBEGIN:VEVENT
>
> I can't figure out wha the pattern is, for some events the output is
> correct.
>
> This is on Org mode version 9.7-pre release_9.6.8-719-gf299fb and emacs 29.1

We recently did some major changes to comply better to the icalendar
specs and introduced new feature. As it usually goes, major changes can
easily introduce new bugs.

Does the attached patch fix the problem for you?

>From 5ab376c558cbd0c1dcdbba99b4a42ff11e27418a Mon Sep 17 00:00:00 2001
Message-ID: <5ab376c558cbd0c1dcdbba99b4a42ff11e27418a.1694591956.git.yanta...@posteo.net>
From: Ihor Radchenko 
Date: Wed, 13 Sep 2023 10:58:15 +0300
Subject: [PATCH] ox-icalendar: Ensure that entries in icalendar end with a
 newline

* lisp/ox-icalendar.el (org-icalendar--vevent):
(org-icalendar--vtodo): Make sure that there is a newline after the
exported VEVENT and VTODO.

Reported-by: Henrik Frisk 
Link: https://orgmode.org/list/CAO0LSb4aQhUMny4xr=1lb3t5f-k-wnjk1zc+qr7jy+69vr2...@mail.gmail.com
---
 lisp/ox-icalendar.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el
index 980bb0ed3..20efad243 100644
--- a/lisp/ox-icalendar.el
+++ b/lisp/ox-icalendar.el
@@ -809,7 +809,7 @@ (\"PUBLIC\", \"CONFIDENTIAL\", and \"PRIVATE\") are predefined, others
 	"CATEGORIES:" categories "\n"
 	;; VALARM.
 	(org-icalendar--valarm entry timestamp summary)
-	"END:VEVENT")))
+	"END:VEVENT\n")))
 
 (defun org-icalendar--repeater-type (elem)
   "Return ELEM's repeater-type if supported, else warn and return nil."
@@ -952,7 +952,7 @@ (defun org-icalendar--vtodo
 		(if (eq (org-element-property :todo-type entry) 'todo)
 			"NEEDS-ACTION"
 		  "COMPLETED"))
-	"END:VTODO")))
+	"END:VTODO\n")))
 
 (defun org-icalendar--valarm (entry timestamp summary)
   "Create a VALARM component.
-- 
2.42.0


-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at