re created using regexp-opt fails in an org agenda command

2021-12-12 Thread Samuel Wales
this bug is strange because it appears as if regexp-opt is broken, but
the only likely difference is an org upgrade via git clone.

in an org agenda command, the same set of org todo kw works if a
regexp was created using mapconcat, but not with regexp-opt.

i expected that regexp-opt with 'words is identical to the mapconcat
version in functionality in this context.

===

i am trying to upgrade to recent org 9.5 main.  [goal is to eventually
use bugfix branch with a couple of patches.]  [on main, however, i
intend to first try the batch agenda archive speedups.  current is org
9.4.6.  thank you very very much for those.]

i am running 25.1.1
i used git clone from savannah to get the org repo
i have not tried -Q yet as that woudl require a lot of setup
i compiled with make which defaulted to make oldorg

in my current versin of org, this bug does not exist, even though
regexp-opt should not have changed.

===

here is the org-agenda-custom-commands command.  i have provided some
raw strings produced by the commands.

this version errors with "and: Invalid regexp: "Unmatched ( or \\("".
toggling backtrace on does not produce a backtrace.

but if the regexp-opt is commented out and mapconcat is uncommented,
it does not produce an error and it works.

it also works with the string /produced by/ mapconcat.  but it still
fails with the string produced by regexp-opt.  i confirmed that the
string version of the regexp-opt works using re-search-forward, so idk
why it would not work from one version of org.

("ne" "clean up by expired CLOSED"
 tags (concat
   ;; the + makes no difference seemingly
   "+CLOSED<\"<-1w>\"={^"
   ;; "DONE"
   ;; (alpha-org-todo-of--regexp :doneish)
   ;; (apply #'append (mapcar #'alpha-org-todo-of '(:doneish)))
   (regexp-opt '("DONEKA" "DONE" "MOSTKA" "MOST"
"ANYWAY" "DUPLICATEKA" "DUPLICATE" "MOOTKA" "MOOT" "WAKARANAI")
'words)
   ;;
"\\<\\(ANYWAY\\|D\\(?:ONE\\(?:KA\\)?\\|UPLICATE\\(?:KA\\)?\\)\\|MO\\(?:OT\\(?:KA\\)?\\|ST\\(?:KA\\)?\\)\\|WAKARANAI\\)\\>"
   ;; (re-search-forward
"\\<\\(ANYWAY\\|D\\(?:ONE\\(?:KA\\)?\\|UPLICATE\\(?:KA\\)?\\)\\|MO\\(?:OT\\(?:KA\\)?\\|ST\\(?:KA\\)?\\)\\|WAKARANAI\\)\\>")
;; this line works
   ;; (mapconcat #'identity (apply #'append (mapcar
#'alpha-org-todo-of '(:doneish))) "\\|")
   ;; this line works
   ;;
"DONEKA\\|DONE\\|MOSTKA\\|MOST\\|ANYWAY\\|DUPLICATEKA\\|DUPLICATE\\|MOOTKA\\|MOOT\\|WAKARANAI"
   "$}")

thanks.

-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



Re: Org-mode ASCII Export to support numbered references for links

2021-12-12 Thread Samuel Wales
you can also use inline footnotes.google[fn::https://google.com] which
will be exported like you like as a kludge if there is noe.

On 12/12/21, Samuel Wales  wrote:
> idk but you can put them in place using org-ascii-links-to-notes for a
> dry effect.
>
> On 12/12/21, Husain Alshehhi  wrote:
>> Org-mode's ascii export uses the link's description to create a reference
>> to
>> it at the end of the document. For example, a link to google will look
>> like
>> this:
>>
>> ,
>> | This is a [link to google].
>> |
>> | [link to google] 
>> `
>>
>> Is there a way to modify this behavior to using a number reference rather
>> than link description? Such as:
>>
>> ,
>> |
>> | This is a link to google[1].
>> |
>> | [1] 
>> `
>>
>> The reasoning behind this is that using numbers is more intuitive (as it
>> is
>> the common practice it plain text posts, emails etc.) Also, when there
>> are
>> two different links with the same description, the export is going to be
>> confusing to the reader. This happens when I use the description "link".
>>
>>
>>
>
>
> --
> The Kafka Pandemic
>
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



Re: Org-mode ASCII Export to support numbered references for links

2021-12-12 Thread Samuel Wales
idk but you can put them in place using org-ascii-links-to-notes for a
dry effect.

On 12/12/21, Husain Alshehhi  wrote:
> Org-mode's ascii export uses the link's description to create a reference to
> it at the end of the document. For example, a link to google will look like
> this:
>
> ,
> | This is a [link to google].
> |
> | [link to google] 
> `
>
> Is there a way to modify this behavior to using a number reference rather
> than link description? Such as:
>
> ,
> |
> | This is a link to google[1].
> |
> | [1] 
> `
>
> The reasoning behind this is that using numbers is more intuitive (as it is
> the common practice it plain text posts, emails etc.) Also, when there are
> two different links with the same description, the export is going to be
> confusing to the reader. This happens when I use the description "link".
>
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



Org-mode ASCII Export to support numbered references for links

2021-12-12 Thread Husain Alshehhi
Org-mode's ascii export uses the link's description to create a reference to it 
at the end of the document. For example, a link to google will look like this:

,
| This is a [link to google].
|
| [link to google] 
`

Is there a way to modify this behavior to using a number reference rather than 
link description? Such as:

,
|
| This is a link to google[1].
|
| [1] 
`

The reasoning behind this is that using numbers is more intuitive (as it is the 
common practice it plain text posts, emails etc.) Also, when there are two 
different links with the same description, the export is going to be confusing 
to the reader. This happens when I use the description "link".




Video: Org for Non-Users

2021-12-12 Thread Eduardo Ochs
Hi all,

A few months ago I finally understood why I have always found Org so
difficult to learn, and I started to work on a way to use eev - a
package that I wrote - to create notes on Org that would complement
the official docs "exactly in the way that I needed". I recorded a
video about that, and it is here:

  http://angg.twu.net/2021-org-for-non-users.html

TL;DR: I discovered that I am a "non-user" and recorded a video on how
I am now documenting Org for "non-users" like me. Initially I am
writing the docs in that format for myself, but I hope that they will
inspire other people...

  Cheers,
Eduardo Ochs
http://angg.twu.net/#eev



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Thomas S. Dye

Aloha Nicolas,

Nicolas Goaziou  writes:


"Thomas S. Dye"  writes:


IIUC, the map in 'org-cite-biblatex-styles' is correct for
biblatex-chicago.


biblatex-chicago introduces new LaTeX commands. Does that mean 
those can

be ignored?


If the goal is to support the styles and variants in 
org-cite-biblatex-styles, then I believe the answer is 'yes'.


A potentially useful biblatex-chicago extension to \textcite is 
\gentextcite, which depending on the package option genallnames 
will give all authors' names or the last author's name in genitive 
form.  This defaults to the English 's, but there is an optional 
argument so it can be tailored to other languages.  It might be 
worthwhile to map this to a new 'gen' variant of the 'text' style.


Rasmus has been active in biblatex-chicago development, so I'd be 
keen to hear his thoughts on the capabilities of 
oc-biblatex-chicago.


All the best,
Tom

--
Thomas S. Dye
https://tsdye.online/tsdye



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Nicolas Goaziou
"Thomas S. Dye"  writes:

> IIUC, the map in 'org-cite-biblatex-styles' is correct for
> biblatex-chicago.

biblatex-chicago introduces new LaTeX commands. Does that mean those can
be ignored?

Regards,



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Thomas S. Dye

Aloha Nicolas,

Nicolas Goaziou  writes:


"Thomas S. Dye"  writes:


Hmm, I can't find 'org-cite-biblatex-styles' in main.

Do you mean the map represented by the nested pcase in
org-cite-biblatex-export-citation function, or something else?


You need to update main. `org-cite-biblatex-styles' is a recent 
addition

to oc-biblatex.el. The pcase you're talking about does not exist
anymore.


Got it.  Thanks.

IIUC, the map in 'org-cite-biblatex-styles' is correct for 
biblatex-chicago.


All the best,
Tom

--
Thomas S. Dye
https://tsdye.online/tsdye



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Nicolas Goaziou
"Thomas S. Dye"  writes:

> Hmm, I can't find 'org-cite-biblatex-styles' in main.
>
> Do you mean the map represented by the nested pcase in
> org-cite-biblatex-export-citation function, or something else?

You need to update main. `org-cite-biblatex-styles' is a recent addition
to oc-biblatex.el. The pcase you're talking about does not exist
anymore.

Thank you for having a look.

Regards,



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Thomas S. Dye

Aloha Nicolas,

Nicolas Goaziou  writes:


Hello,

"Thomas S. Dye"  writes:


Nicolas Goaziou  writes:

Another possibility it to write, e.g., 
"oc-biblatex-chicago.el" and
define a new ‘biblatex-chicago’ export processor, re-using 
most
functions from "oc-biblatex.el". It would probably only be 
necessary

to
re-define ‘org-cite-biblatex-export-citation’ and
‘org-cite-biblatex-prepare-preamble’.

This is probably the path of least resistance for users who 
want to use biblatex-chicago out of the box, rather than as a 
basis for deriving a specific style.


I can write a biblatex-chicago citation processor. However, it 
would
help me tremendously if someone could map styles/variants to 
LaTeX

commands when using this package.

See for example `org-cite-biblatex-styles' in main branch.


Hmm, I can't find 'org-cite-biblatex-styles' in main.

Do you mean the map represented by the nested pcase in 
org-cite-biblatex-export-citation function, or something else?


All the best,
Tom

--
Thomas S. Dye
https://tsdye.online/tsdye



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Nicolas Goaziou
Hello,

"Thomas S. Dye"  writes:

> Nicolas Goaziou  writes:
>
>> Another possibility it to write, e.g., "oc-biblatex-chicago.el" and
>> define a new ‘biblatex-chicago’ export processor, re-using most
>> functions from "oc-biblatex.el". It would probably only be necessary
>> to
>> re-define ‘org-cite-biblatex-export-citation’ and
>> ‘org-cite-biblatex-prepare-preamble’.
>>
> This is probably the path of least resistance for users who want to use 
> biblatex-chicago out of the box, rather than as a basis for deriving a 
> specific style.

I can write a biblatex-chicago citation processor. However, it would
help me tremendously if someone could map styles/variants to LaTeX
commands when using this package.

See for example `org-cite-biblatex-styles' in main branch.

Any volunteer?

Regards,
-- 
Nicolas Goaziou