Re: More Worg build workflow

2022-06-14 Thread Ihor Radchenko
Tim Cross  writes:

> Based on only a few hours going through worg and Org mode's support for
> generating static web content, there are 3 very broad goals I would like
> to achieve 
>
> 1. Improve worg's presentation layer to 
> ...
> 2. Make it easier for users to contribute new content, updates for
>existing content or provide feedback  
> 
> 3. Improve the build and deployment workflow. 
> ...

Sounds good.

> What I'm thinking and wanted feedback on is
>
> 1. Update the build process to be based on org publish by defining an
>org-publish-project-alist variable.

This does make sense.

> 2. Moving as many 'global' and/or static settings to be managed within
>the org-publish-project-alist properties and removing them from each
>individual org file.

Also makes sense.

> Finally, as this is likely to be a sizeable piece of work, can anyone
> tell me if the FSF copyright assignment process comes into play? I know
> this is the case with org changes, but I'm hoping it isn't with worg as
> I have other constraints which prevent me from signing such an
> agreement. 

No, AFAIK. WORG is supposed to be more lax licence-wise.

I am CCing Bastien in case if there are any cavears I am not aware
about.

Best,
Ihor



Re: Orgmode plain list bullet : change automatically with list depth

2022-06-14 Thread Ihor Radchenko
DEBRY.Edouard  writes:

> But it breaks the org file.

What do you mean by "breaks the org file"?



Re: [PATCH] #+begin_example lang used in manual and worg (was: [DISCUSSION] Refactoring fontification system)

2022-06-14 Thread Max Nikulin

On 10/06/2022 09:06, Ihor Radchenko wrote:

Max Nikulin writes:


Side note: I can not say that #+begin_example with language is widely
used, but one case may be found in org-manual.org and a dozen in worg.


Which should probably be fixed. LANG parameter is ignored on export
anyway. See the attached patches for WORG and emacs-manual.


Thank you for your intent to fix it.


diff --git a/doc/org-manual.org b/doc/org-manual.org
index 32a45f884..51aa4d77e 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -4488,7 +4488,7 @@ ** Breaking Down Tasks into Subtasks
 include the word =recursive= into the value of the =COOKIE_DATA=
 property.
 
-#+begin_example org

+#+begin_example
 ,* Parent capturing statistics [2/20]
   :PROPERTIES:
   :COOKIE_DATA: todo recursive


It is consistent with other examples in the manual. Only one snippet is 
wrapped into "#+begin_src org" and it is a recent addition caused a long 
discussion on Shakespeare's poetry. I am curious why #+begin_src is used 
for elisp examples, but not for org markup.


For worg pages #+begin_example to #+begin_src substitution may be a 
better option than dropping language.



--- a/org-tutorials/org-jekyll.org
+++ b/org-tutorials/org-jekyll.org
@@ -172,7 +172,7 @@ * Creating an org File to be Published with Jekyll
 
 Below is a short extract from one of my org files showing my setup:
 
-#+BEGIN_EXAMPLE org

+#+BEGIN_EXAMPLE
 #+STARTUP: showall indent
 #+STARTUP: hidestars
 #+BEGIN_EXPORT html


It is not the scope of this patch but looks like missed commas to escape 
leading "#".




you to copy .org-id-locations from one machine to another

2022-06-14 Thread Uwe Brauer


Hi 

My .org-id-locations file contain relative path like this
("~/ALLES/HGs/HG-Org/answer.org" "5dc7a5e5-aebd-432a-8156-c69d9c0e4740"
"ce79da39-8158-4df2-aca0-c2697bda168a"
"70b317ce-2786-45d0-a72e-99d5fad8")

I copied  a particular directory from one machine to another so the ID
concide, however when I also copy my .org-id-locations file from one
machine to the other, but on my target machine my .org-id-locations file
is basically ignored. 

I don't want to regenerate all my IDs again for that directory, so what
is the trick here?

Uwe Brauer 




Re: [PATCH] Re: New source block results option for attaching file to node

2022-06-14 Thread Ryan Scott
Awesome!
Thanks again for all the help. It's been a crash course in org internals
and the contribution process.
Well prepared for next time to go much smoother.

Cheers,
  -ryan

On Tue, Jun 14, 2022 at 6:47 AM Ihor Radchenko  wrote:

> Ryan Scott  writes:
>
> > I put together a clean setup in docker for running the tests and believe
> > I've gotten to the source of the problem.
> > However I've thought that a few times now.
>
> Would you be interested to share it? It might be helpful for other
> people trying to develop on Windows.
>
> > This version of the patch has all tests passing.
> > The problem was in org-results-to-file and the attach dir detection. It
> > both had problems with an introduced assumption that the buffer-file-name
> > would be non-nil (causing several tests to fail) as well as being
> generally
> > overzealous in detecting file result paths as attachment links.
>
> Thanks!
>
> Applied onto main via 226119124 with several amendments.
>
> I have added some missing "." at the end of sentences, made sure that
> all sentences are separated by doube "  " as required by our conventions
> and dropped `quoting' from non-symbols.
>
> Best,
> Ihor
>


Orgmode plain list bullet : change automatically with list depth

2022-06-14 Thread DEBRY . Edouard

When making a plain list in orgmode, I would like to change of bullet
autmatically depending on the list depth.

Currently, I use this to prettify bullets :

(font-lock-add-keywords 'org-mode
'(("^ *\\([-]\\) "
   (0 (prog1
  ()
(setq bullet "•")
(compose-region (match-beginning 1) (match-end 
1) bullet))

I attempted to this :
(font-lock-add-keywords 'org-mode
 '(("^ *\\([-]\\) "
(0 (let* ((depth (org-list--depth 
(org-element-at-point)))
  (bullet (cond ((= depth 1) "•")
((= depth 2) "▸")
(t "-"
 (prog1 () (compose-region (match-beginning 1) 
(match-end 1) bullet)))

for the bullet to change with respect to the org list depth, so to have
(e.g.) :
• test
  ▸ test1
  ▸ test2

But it breaks the org file.

How could I achieve this ?

Regards

___

This email and any attachments are confidential to the intended recipient and 
may also be privileged.
If you are not the intended recipient please delete it from your system and 
notify the sender. 
You should not copy it or use it for any purpose nor disclose or distribute its 
contents to any other person.
 

Ce courriel et ses pieces-jointes sont envoyes de maniere confidentielle et 
doivent etre traites avec attention.
Si vous n'etes pas le destinataire, merci de le detruire et d'en informer son 
auteur. 
Vous ne devez pas copier, utiliser, reveler ou diffuser son contenu a quiconque.



Re: [PATCH] Don't quote symbols in defcustom types

2022-06-14 Thread Ihor Radchenko
Robert Pluim  writes:

> >> What's a TINYCHANGE?
>
> Ihor> See https://orgmode.org/worg/org-contribute.html#first-patch
> Ihor> We need to put this word at the end of commit messages for 
> contributors
> Ihor> without FSF copyright assignment.
>
> The first patch I sent last week in <87ilp81pcx@gmail.com>
> mentioned that I have assigned copyright to the FSF for Emacs.

Sorry, I missed this fact when I was checking this email thread. I am
bad at remembering names and you are not yet listed in
https://orgmode.org/worg/contributors.html. Should be fixed soon.

Best,
Ihor



Re: [PATCH] org.el (org-format-latex-header): put DEFAULT-PACKAGES before PACKAGES

2022-06-14 Thread Sébastien Miquel

Hi,

Ihor Radchenko writes:

We actually have 2 options here:
1. Change the docstring
2. Change the template

Can moving [PACKAGES] up break the existing configs? It might.
I am inclined to change the docstring instead.


Thanks for having a look at this.

It makes more sense for a package in PACKAGES to depend on a
DEFAULT-PACKAGE than vice versa.

=org-latex-packages-alist= and =org-latex-classes=' are two important
docstrings. People are likely to have crafted their configuration by
reading these documentation.

I've also just checked that by default, for document export,
DEFAULT-PACKAGES are inserted before PACKAGES --- the default
templates from =org-latex-classes= do not include =DEFAULT-PACKAGES=
nor =PACKAGES=, and in this case, =org-splice-latex-header= adds both
default packages and packages at the end, with default packages coming
first.

=org-format-latex-header= is only used to generate images for preview,
and in some cases by ob-latex to compile a document from a LaTeX src
block.

Regards,

--
Sébastien Miquel




Re: [PATCH] Don't quote symbols in defcustom types

2022-06-14 Thread Robert Pluim
> On Tue, 14 Jun 2022 22:19:23 +0800, Ihor Radchenko  
> said:

Ihor> Robert Pluim  writes:
>>> On Tue, 14 Jun 2022 22:04:10 +0800, Ihor Radchenko 
 said:
>> 
Ihor> Daniel Fleischer  writes:
>> >> Thanks for the patch, merged. 
>> 
Ihor> BTW, should it be a TINYCHANGE?
>> 
>> What's a TINYCHANGE?

Ihor> See https://orgmode.org/worg/org-contribute.html#first-patch
Ihor> We need to put this word at the end of commit messages for 
contributors
Ihor> without FSF copyright assignment.

The first patch I sent last week in <87ilp81pcx@gmail.com>
mentioned that I have assigned copyright to the FSF for Emacs.

Robert
-- 



Re: [PATCH] Don't quote symbols in defcustom types

2022-06-14 Thread Ihor Radchenko
Robert Pluim  writes:

>> On Tue, 14 Jun 2022 22:04:10 +0800, Ihor Radchenko  
>> said:
>
> Ihor> Daniel Fleischer  writes:
> >> Thanks for the patch, merged. 
>
> Ihor> BTW, should it be a TINYCHANGE?
>
> What's a TINYCHANGE?

See https://orgmode.org/worg/org-contribute.html#first-patch
We need to put this word at the end of commit messages for contributors
without FSF copyright assignment.

Best,
Ihor




Re: [BUG] Cursor is moved after changing list bullets

2022-06-14 Thread Daniel Fleischer
Ihor Radchenko [2022-06-14 Tue 21:30] wrote:

> I am unable to reproduce using any of the supported Emacs versions.
> Could you please provide more concrete steps? Or better a test.

Create a file called `list.org` with the following:

* Test

- Hello.
- hi.
- bye.

Then call:

emacs -Q -L ./Projects/org-mode/lisp/ -l org list.org

Then put the cursor on one of the hyphens and change its style using
S-right. The bullet will change and the cursor will move to the
beginning of a word instead of stay in place.

-- 

Daniel Fleischer



Re: [PATCH] Don't quote symbols in defcustom types

2022-06-14 Thread Robert Pluim
> On Tue, 14 Jun 2022 22:04:10 +0800, Ihor Radchenko  
> said:

Ihor> Daniel Fleischer  writes:
>> Thanks for the patch, merged. 

Ihor> BTW, should it be a TINYCHANGE?

What's a TINYCHANGE?

Robert
-- 



Re: [BUG] org-copy-subtree in a file with local variables marks buffer as modified [9.5.3 (release_9.5.3-6-gef41f3 @ /home/ignacio/repos/emacs/lisp/org/)]

2022-06-14 Thread Ihor Radchenko
Ignacio Casso  writes:

>>> +   (setq buffer-undo-list
>>> + (seq-drop-while 'identity buffer-undo-list)))
>>
>> This looks fragile and can be disasterous when buffer-undo-list is
>> large.
>
> I agree that it is very fragile, but could you explain why is it also
> problematic with a large `buffer-undo-list'? I guess you mean
> efficiency-wise, but it would only iterate through the few items added
> since the call to (undo-boundary). Is there something else I'm not seeing?

Simply because I saw iteration over a potentially large list. Looking
closer, you are indeed right and performance should not be a problem in
this particular scenario.

>> Maybe just use with-silent-modifications or some ideas from there (for
>> example, wrapping modifications inside let-bound (buffer-undo-list t))?
>> We should not inhibit modification hooks though. Otherwise, it will mess
>> up with caching code.
>
> Done. I attach the new patch:

LGTM!
Applied onto main via aa789b89d.

Best,
Ihor



Re: [PATCH] Don't quote symbols in defcustom types

2022-06-14 Thread Ihor Radchenko
Daniel Fleischer  writes:

> Thanks for the patch, merged. 

BTW, should it be a TINYCHANGE?

Best,
Ihor



Re: [BUG] org-capture autoload bug? [9.5.2 (9.5.2-gfbff08 @ /home/ignacio/.emacs.d/elpa/org-9.5.2/)]

2022-06-14 Thread Ihor Radchenko
Ignacio Casso  writes:

>> Please don't use ditto. (what does it even mean?)
>
> It means the same thing again. I saw it in the message of the Emacs
> commit I referenced earlier in this thread, so I assumed it was standard
> practice. I have replaced it with "The same". But if the problem is that
> it makes it difficult to work later with the changelog, I can copy and
> paste.

Never mind.
Applied onto main via f9ea6c61e with necessary amendments to the commit
message.

What I meant is simply leaving all but last description empty:

* lisp/ob-shell.el (org-babel-shell-names):
* lisp/org-capture.el (org-capture-templates):
* lisp/org-clock.el (org-clock-ask-before-exiting):
...
* lisp/ob-lilypond.el (org-babel-lilypond-commands): Use
`set-default-toplevel-value' instead of `set' or `set-default' in
`defcustom' :set argument.

Best,
Ihor



Re: [PATCH] Re: New source block results option for attaching file to node

2022-06-14 Thread Ihor Radchenko
Ryan Scott  writes:

> I put together a clean setup in docker for running the tests and believe
> I've gotten to the source of the problem.
> However I've thought that a few times now.

Would you be interested to share it? It might be helpful for other
people trying to develop on Windows.

> This version of the patch has all tests passing.
> The problem was in org-results-to-file and the attach dir detection. It
> both had problems with an introduced assumption that the buffer-file-name
> would be non-nil (causing several tests to fail) as well as being generally
> overzealous in detecting file result paths as attachment links.

Thanks!

Applied onto main via 226119124 with several amendments.

I have added some missing "." at the end of sentences, made sure that
all sentences are separated by doube "  " as required by our conventions
and dropped `quoting' from non-symbols.

Best,
Ihor



Re: [BUG] Cursor is moved after changing list bullets

2022-06-14 Thread Ihor Radchenko
Daniel Fleischer  writes:

> Hi, there is a regression introduced in:
>
> ed6f8dc67 org-list: Do not move point and change space when
>   promoting/demoting items
>
> When calling `org-cycle-list-bullet' (e.g. using S-right or S-left) the
> cursor moves to the beginning of the text after changing the bullet
> type. It used to not move which is useful to when trying different
> bullet styles. This is due to the changes in
> `org-list-struct-apply-struct'. I tried to debug it but I'm not sure
> what was the issue the patch was meant to solve.

I am unable to reproduce using any of the supported Emacs versions.
Could you please provide more concrete steps? Or better a test.

Best,
Ihor



Re: [PATCH] org.el (org-format-latex-header): put DEFAULT-PACKAGES before PACKAGES

2022-06-14 Thread Ihor Radchenko
Sébastien Miquel  writes:

> The attached patch puts DEFAULT-PACKAGES before PACKAGES in 
> org-format-latex-header, as per org-latex-packages-alist's and 
> org-latex-classes' documentations.
> ...
> -\[PACKAGES]
>  \[DEFAULT-PACKAGES]
> +\[PACKAGES]

Thanks!

We actually have 2 options here:
1. Change the docstring
2. Change the template

Can moving [PACKAGES] up break the existing configs? It might.
I am inclined to change the docstring instead.

Best,
Ihor



[BUG] Cursor is moved after changing list bullets

2022-06-14 Thread Daniel Fleischer
Hi, there is a regression introduced in:

ed6f8dc67 org-list: Do not move point and change space when
  promoting/demoting items

When calling `org-cycle-list-bullet' (e.g. using S-right or S-left) the
cursor moves to the beginning of the text after changing the bullet
type. It used to not move which is useful to when trying different
bullet styles. This is due to the changes in
`org-list-struct-apply-struct'. I tried to debug it but I'm not sure
what was the issue the patch was meant to solve.

Thanks, 

-- 

Daniel Fleischer



More Worg build workflow

2022-06-14 Thread Tim Cross


apologies if these questions about worg are becoming a little tiresome -
still just trying to work out how things all work and more importantly,
what level of comfort the community has with change. i

As I'm digging more and more into understanding worg, I'm finding things
which I think need to be changed. This is not to say what has been done
is wrong, but rather that as things have developed, as technology
(including org) has improved and as user expectations have changed,
there are things we probably should adjust to bring worg forward and
keep it current. However, it is also likely some things are the way they
are for very good reasons I'm just not aware of. I'm therefore reluctant
to make any significant changes without first raising it on this list.

Based on only a few hours going through worg and Org mode's support for
generating static web content, there are 3 very broad goals I would like
to achieve 

1. Improve worg's presentation layer to 
   - Improve page responsiveness wrt different size screens
   - Improve accessibility support (fonts, colours, links, tags etc)
   - Improve page navigation. Make it easier to find specific
 information and easier to browse and explore the site. 

2. Make it easier for users to contribute new content, updates for
   existing content or provide feedback  

3. Improve the build and deployment workflow. 
   - Add the ability to deploy to a dev/uat site. Reduce unexpected
 impact to production site and increase confidence when making
 changes or adding new content. 
   - Allow anyone to easily clone the worg repository and bring up a
 working site locally for development, testing and experimentation
 etc.

Today I have been going through what is required in order to deploy a
copy of the worg site locally so that I have something to work with
while looking at points 1 and 2. This has been slightly harder than I
think it should be. Some of the issues are due to hard coded paths and
URLs scattered through the source files, conflicts with my local Emacs
and org settings and possibly some version issues (not sure yet). 

Some of these issues seem to be related to the very simple build
workflow being used. The worg site is not using the org publish
functionality - while it sort of does the same thing, it really is just
a recursive call to org-html-export-to-html for all files with a *.org
extension. While org publish does pretty much the same thing, it does
have some 'sugar' which can make the process a little more flexible and
provides a consistent way to apply settings consistently across the
whole project. 

As a simple example. Each org file has an org-html-link-home settings
which is https://orgmode.org/worg/. We really don't want that link hard
coded in every *.org file. Would be far better if that link is added as
part of the publishing process as we could then change it depending on
the environment we are deploying to. Removing things like this from the
individual org files also means things are easier for new contributors
as they don't need to worry about adding such values. 

What I'm thinking and wanted feedback on is

1. Update the build process to be based on org publish by defining an
   org-publish-project-alist variable. 
2. Moving as many 'global' and/or static settings to be managed within
   the org-publish-project-alist properties and removing them from each
   individual org file.

These changes will likely also require re-arrangement of file and
directory layout within the git repository to better meet the updated
publishing workflow requirements. 

Finally, as this is likely to be a sizeable piece of work, can anyone
tell me if the FSF copyright assignment process comes into play? I know
this is the case with org changes, but I'm hoping it isn't with worg as
I have other constraints which prevent me from signing such an
agreement. 



Re: [PATCH] Don't quote symbols in defcustom types

2022-06-14 Thread Daniel Fleischer
Thanks for the patch, merged. 

Daniel Fleischer


Re: [Patch] ob-tangle.el: New value 'ascii' for the header argument ':comments'

2022-06-14 Thread Ihor Radchenko
Juan Manuel Macías  writes:

> On the other hand, I have a curiosity. I understand that the behavior of
> the `:comments org' option should be left intact to ensure backwards
> compatibility. But I've always wondered if there is any use case where
> this value, as it behaves, might be practical. I don't quite understand
> how useful all the Org metadata in the comments of the tangled file can
> be. The expectation with `:comments org' is that only the content of the
> Org document will be rendered (as comments), but not its metadata, that
> all they do is unnecessarily fatten up the source file. I'm thinking,
> for example, of headers with lots of properties. or comment blocks,
> which would be visible in the tangled source file:

The original proposal by Eric Schulte:
https://list.orgmode.org/4bffee4f.5010...@ccbr.umn.edu/
>>> Maybe we should allow either exporting just the headlines of the
>>> org-mode file or exporting the entire org-mode file -- possibly after an
>>> ASCII export -- this would have the effect of prefixing every line in
>>> the org-mode file behind a comment *except* for the tangled source-code
>>> blocks.

Clearly, the "possible after an ASCII export" dropped somewhere in the
middle.

Best,
Ihor



Re: [Patch] ob-tangle.el: New value 'ascii' for the header argument ':comments'

2022-06-14 Thread Juan Manuel Macías
Ihor Radchenko writes:

> I think that the existing code can be improved. Relying on the
> undocumented behavior of (org-back-to-heading) is not ideal. Not to
> mention code blocks before first headline.
>
> It would be great if you rewrite the existing code to suite both the
> defaults and the proposed behavior.

Yes, I agree that this needs a more robust approach. Also, I've noticed
that the patch I've proposed has a rather silly bug: replacing the
second `match-end 0' with `match-beginning 0' naturally causes
intermediate code blocks to be exported as comments (!). Returning it to
`match-end 0' everything is OK, but the present approach is still
tricky.

I'm going to see if I can try something cleaner these days. Ideally,
everything should be controlled from org-babel-process-comment-text...

On the other hand, I have a curiosity. I understand that the behavior of
the `:comments org' option should be left intact to ensure backwards
compatibility. But I've always wondered if there is any use case where
this value, as it behaves, might be practical. I don't quite understand
how useful all the Org metadata in the comments of the tangled file can
be. The expectation with `:comments org' is that only the content of the
Org document will be rendered (as comments), but not its metadata, that
all they do is unnecessarily fatten up the source file. I'm thinking,
for example, of headers with lots of properties. or comment blocks,
which would be visible in the tangled source file:

┌
│ ;;   Header
│ ;;   :PROPERTIES:
│ ;;   :A_LOT_OF: properties
│ ;;   :END:
│ 
│ ;; #+begin_comment
│ ;; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec hendrerit 
tempor tellus.
│ ;; Donec pretium posuere tellus. Proin quam nisl, tincidunt et, mattis eget, 
convallis nec,
│ ;; purus. Cum sociis natoque penatibus et magnis dis parturient montes, 
nascetur ridiculus
│ ;; mus. Nulla posuere. Donec vitae dolor. Nullam tristique diam non turpis. 
Cras placerat
│ ;; accumsan nulla. Nullam rutrum. Nam vestibulum accumsan nisl.
│ ;; #+end_comment
└

Best regards,

Juan Manuel 



Re: [PATCH] Don't quote symbols in defcustom types

2022-06-14 Thread Robert Pluim
> On Tue, 14 Jun 2022 13:12:54 +0300, Daniel Fleischer  
> said:

Daniel> Robert Pluim [2022-06-14 Tue 11:28] wrote:
>> A couple of places in org main quoted symbols in defcustom types, but
>> the type itself is already quoted, so thatʼs not necessary.

Daniel> Is it harmful though?

Thereʼs the absolutist argument of "itʼs wrong!", or the practical
argument of "it causes warnings when byte compiling". Take your pick.

>> -  (const :tag "Overlays" 'overlays)
>> -  (const :tag "Text properties" 'text-properties)))
>> +  (const :tag "Overlays" overlays)
>> +  (cnost :tag "Text properties" text-properties)))

Daniel> Typo here `cnost`.

Of course there is. Murphy and all that. Updated patch attached

Robert
-- 


>From 2c75a28bff8842f731611ebd7838c5f13122ac4d Mon Sep 17 00:00:00 2001
From: Robert Pluim 
Date: Mon, 13 Jun 2022 16:15:10 +0200
Subject: [PATCH] Don't quote symbols in defcustom types

* lisp/org-fold-core.el (org-fold-core-style):
* lisp/org-persist.el (org-persist-remote-files):
(org-persist-default-expiry):
Don't quote the symbol given as value for a const.
---
 lisp/org-fold-core.el | 4 ++--
 lisp/org-persist.el   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/org-fold-core.el b/lisp/org-fold-core.el
index 5dda133fb..3ba63b725 100644
--- a/lisp/org-fold-core.el
+++ b/lisp/org-fold-core.el
@@ -302,8 +302,8 @@ (defcustom org-fold-core-style 'text-properties
   :group 'org
   :package-version '(Org . "9.6")
   :type '(choice
-  (const :tag "Overlays" 'overlays)
-  (const :tag "Text properties" 'text-properties)))
+  (const :tag "Overlays" overlays)
+  (const :tag "Text properties" text-properties)))
 
 (defvar-local org-fold-core-isearch-open-function #'org-fold-core--isearch-reveal
   "Function used to reveal hidden text found by isearch.
diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index 068f58cec..ab1365220 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -196,7 +196,7 @@ (defcustom org-persist-remote-files 100
   :type '(choice (const :tag "Never" nil)
  (const :tag "Always" t)
  (number :tag "Keep not more than X files")
- (const :tag "Check if exist on remote" 'check-existence)))
+ (const :tag "Check if exist on remote" check-existence)))
 
 (defcustom org-persist-default-expiry 30
   "Default expiry condition for persistent data.
@@ -207,7 +207,7 @@ (defcustom org-persist-default-expiry 30
 it should be a function returning non-nil when the data is expired.  The
 function will be called with a single argument - collection."
   :group 'org-persist
-  :type '(choice (const :tag "Never" 'never)
+  :type '(choice (const :tag "Never" never)
  (const :tag "Always" nil)
  (number :tag "Keep N days")
  (function :tag "Function")))
-- 
2.35.1.607.gf01e51a7cf



Re: [PATCH] Don't quote symbols in defcustom types

2022-06-14 Thread Daniel Fleischer
Robert Pluim [2022-06-14 Tue 11:28] wrote:

> A couple of places in org main quoted symbols in defcustom types, but
> the type itself is already quoted, so thatʼs not necessary.

Is it harmful though?

> -  (const :tag "Overlays" 'overlays)
> -  (const :tag "Text properties" 'text-properties)))
> +  (const :tag "Overlays" overlays)
> +  (cnost :tag "Text properties" text-properties)))

Typo here `cnost`.

-- 

Daniel Fleischer



Re: [PATCH] New remote resource download policy

2022-06-14 Thread Robert Pluim
> On Sun, 12 Jun 2022 22:43:07 +0800, Timothy  said:

Timothy> Hi All,
Timothy> As was raised in the `#+include: URL' thread
Timothy> (), currently 
Org will
Timothy> automatically download files without confirmation in various 
circumstances.

Timothy> This patch introduces two variables to control Org’s attitude 
towards
Timothy> downloading files, and hooks them into the relevant parts of the 
codebase.

I think that would be a good addition. 
 
Timothy> +(defcustom org-download-remote-resources 'prompt
Timothy> +  "The policy applied to requests to obtain remote resources.
Timothy> +
Timothy> +This affects keywords like #+setupfile and #+incude on export,
Timothy> +`org-persist-write:url',and `org-attach-attach' in
Timothy> +non-interactive Emacs sessions.
Timothy> +
Timothy> +This recognises four possible values:
Timothy> +- t, remote resources should always be downloaded.
Timothy> +- prompt, you will be prompted to download resources nt 
considered safe.

'prompted when downloading unsafe resources'

maybe?

Does this need a 'prompt-always option? I guess thatʼs what you get
with the default value of `org-safe-remote-resources', but maybe it
makes sense to be explicit?

Robert
-- 



[PATCH] Don't quote symbols in defcustom types

2022-06-14 Thread Robert Pluim

A couple of places in org main quoted symbols in defcustom types, but
the type itself is already quoted, so thatʼs not necessary.

Thanks

Robert
-- 
>From 3163652a7eecbf84c767c6740822e00cf842e607 Mon Sep 17 00:00:00 2001
From: Robert Pluim 
Date: Mon, 13 Jun 2022 16:15:10 +0200
Subject: [PATCH] Don't quote symbols in defcustom types

* lisp/org-fold-core.el (org-fold-core-style):
* lisp/org-persist.el (org-persist-remote-files):
(org-persist-default-expiry):
Don't quote the symbol given as value for a const.
---
 lisp/org-fold-core.el | 4 ++--
 lisp/org-persist.el   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/org-fold-core.el b/lisp/org-fold-core.el
index 5dda133fb..939702c5c 100644
--- a/lisp/org-fold-core.el
+++ b/lisp/org-fold-core.el
@@ -302,8 +302,8 @@ (defcustom org-fold-core-style 'text-properties
   :group 'org
   :package-version '(Org . "9.6")
   :type '(choice
-  (const :tag "Overlays" 'overlays)
-  (const :tag "Text properties" 'text-properties)))
+  (const :tag "Overlays" overlays)
+  (cnost :tag "Text properties" text-properties)))
 
 (defvar-local org-fold-core-isearch-open-function #'org-fold-core--isearch-reveal
   "Function used to reveal hidden text found by isearch.
diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index 068f58cec..ab1365220 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -196,7 +196,7 @@ (defcustom org-persist-remote-files 100
   :type '(choice (const :tag "Never" nil)
  (const :tag "Always" t)
  (number :tag "Keep not more than X files")
- (const :tag "Check if exist on remote" 'check-existence)))
+ (const :tag "Check if exist on remote" check-existence)))
 
 (defcustom org-persist-default-expiry 30
   "Default expiry condition for persistent data.
@@ -207,7 +207,7 @@ (defcustom org-persist-default-expiry 30
 it should be a function returning non-nil when the data is expired.  The
 function will be called with a single argument - collection."
   :group 'org-persist
-  :type '(choice (const :tag "Never" 'never)
+  :type '(choice (const :tag "Never" never)
  (const :tag "Always" nil)
  (number :tag "Keep N days")
  (function :tag "Function")))
-- 
2.35.1.607.gf01e51a7cf



[PATCH] Escape single left quotes in docstrings

2022-06-14 Thread Robert Pluim

The emacs-29 byte compiler now complains about unescaped single left
quote. Patch attached.

Robert
-- 
>From d86ba4e5522a33f6960207327f6a84b58caa3d04 Mon Sep 17 00:00:00 2001
From: Robert Pluim 
Date: Tue, 14 Jun 2022 11:29:12 +0200
Subject: [PATCH] Escape single left quotes in docstrings

* lisp/ob-core.el (org-babel-default-header-args):
* lisp/ob-julia.el (org-babel-julia-evaluate-external-process):
(org-babel-julia-evaluate-session):
* lisp/ob-lua.el (org-babel-lua-read-string):
* lisp/ob-table.el (org-sbe):
* lisp/oc-basic.el (org-cite-basic--shorten-names):
* lisp/org-agenda.el (org-agenda-sorting-strategy):
(org-agenda--mark-blocked-entry):
(org-agenda-set-restriction-lock):
* lisp/org-fold-core.el (org-fold-core--specs):
(org-fold-core-remove-folding-spec):
(org-fold-core-get-folding-spec):
(org-fold-core--isearch-overlays):
* lisp/org-plot.el (org--plot/prime-factors):
* lisp/org-table.el (org-table-collapse-header):
* lisp/org.el (org-special-ctrl-o):
(org-latex-to-html-convert-command):
* lisp/ox-html.el (org-html--unlabel-latex-environment):
* lisp/ox-publish.el (org-publish-find-property):
Use \\=' when there's a need for a single left quote in a docstring.

The emacs-29 byte compiler complains about such usage.
---
 lisp/ob-core.el   | 2 +-
 lisp/ob-julia.el  | 8 
 lisp/ob-lua.el| 2 +-
 lisp/ob-table.el  | 2 +-
 lisp/oc-basic.el  | 2 +-
 lisp/org-agenda.el| 6 +++---
 lisp/org-fold-core.el | 8 
 lisp/org-plot.el  | 2 +-
 lisp/org-table.el | 2 +-
 lisp/org.el   | 4 ++--
 lisp/ox-html.el   | 2 +-
 lisp/ox-publish.el| 2 +-
 12 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 09d6adfe0..bfb263cfb 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -484,7 +484,7 @@ (defvar org-babel-default-header-args
 evaluates to a string.  The closure is evaluated when the source
 block is being evaluated (e.g. during execution or export), with
 point at the source block.  It is not possible to use an
-arbitrary function symbol (e.g. 'some-func), since org uses
+arbitrary function symbol (e.g. \\='some-func), since org uses
 lexical binding.  To achieve the same functionality, call the
 function within a closure (e.g. (lambda () (some-func))).
 
diff --git a/lisp/ob-julia.el b/lisp/ob-julia.el
index abddca361..be0110f48 100644
--- a/lisp/ob-julia.el
+++ b/lisp/ob-julia.el
@@ -250,8 +250,8 @@ (defun org-babel-julia-evaluate
 (defun org-babel-julia-evaluate-external-process
 (body result-type result-params column-names-p)
   "Evaluate BODY in external julia process.
-If RESULT-TYPE equals 'output then return standard output as a
-string.  If RESULT-TYPE equals 'value then return the value of the
+If RESULT-TYPE equals \\='output then return standard output as a
+string.  If RESULT-TYPE equals \\='value then return the value of the
 last statement in BODY, as elisp."
   (cl-case result-type
 (value
@@ -274,8 +274,8 @@ (defun org-babel-julia-evaluate-external-process
 (defun org-babel-julia-evaluate-session
 (session body result-type result-params column-names-p)
   "Evaluate BODY in SESSION.
-If RESULT-TYPE equals 'output then return standard output as a
-string.  If RESULT-TYPE equals 'value then return the value of the
+If RESULT-TYPE equals \\='output then return standard output as a
+string.  If RESULT-TYPE equals \\='value then return the value of the
 last statement in BODY, as elisp."
   (cl-case result-type
 (value
diff --git a/lisp/ob-lua.el b/lisp/ob-lua.el
index 48de0dbad..c8c28498e 100644
--- a/lisp/ob-lua.el
+++ b/lisp/ob-lua.el
@@ -395,7 +395,7 @@ (defun org-babel-lua-evaluate-session
 (org-babel-lua-table-or-string results)
 
 (defun org-babel-lua-read-string (string)
-  "Strip 's from around Lua string."
+  "Strip single quotes from around Lua string."
   (org-unbracket-string "'" "'" string))
 
 (provide 'ob-lua)
diff --git a/lisp/ob-table.el b/lisp/ob-table.el
index 2f092998d..0f6d41c5e 100644
--- a/lisp/ob-table.el
+++ b/lisp/ob-table.el
@@ -84,7 +84,7 @@ (defmacro org-sbe (source-block  variables)
  #+end_src
 
 NOTE: The quotation marks around the function name,
-'source-block', are optional.
+\\='source-block\\=', are optional.
 
 NOTE: By default, string variable names are interpreted as
 references to source-code blocks, to force interpretation of a
diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el
index 873986d07..a937f7513 100644
--- a/lisp/oc-basic.el
+++ b/lisp/oc-basic.el
@@ -329,7 +329,7 @@ (defun org-cite-basic--shorten-names (names)
   "Return a list of family names from a list of full NAMES.
 
 To better accomomodate corporate names, this will only shorten
-personal names of the form 'family, given'."
+personal names of the form \"family, given\"."
   (when (stringp names)
 (mapconcat
  (lambda (name)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 0479a0e1f..2a8c10d48 100644
--- a/lisp/org-agenda.el
+++ 

Re: [PATCH] Re: New source block results option for attaching file to node

2022-06-14 Thread Ryan Scott
I put together a clean setup in docker for running the tests and believe
I've gotten to the source of the problem.
However I've thought that a few times now.

This version of the patch has all tests passing.
The problem was in org-results-to-file and the attach dir detection. It
both had problems with an introduced assumption that the buffer-file-name
would be non-nil (causing several tests to fail) as well as being generally
overzealous in detecting file result paths as attachment links.


On Mon, Jun 13, 2022 at 10:55 PM Ryan Scott 
wrote:

> Strange. I'll figure out a better setup for running the tests and get to
> the bottom of that.
> Thanks for the help.
>
> On Tue, Jun 14, 2022, 00:10 Ihor Radchenko  wrote:
>
>> Ryan Scott  writes:
>>
>> > Ah sorry about that. I'm on a windows laptop and didn't have make, so
>> was
>> > testing interactively and they were passing.
>> > I cleaned that up and remove the f-* usage and verified under Ubuntu (on
>> > WSL) that the new tests are passing. I was getting some failures with
>> > unrelated tests, but also get those in master as well.
>>
>> I am still getting test failures using Emacs 28.
>> All the tests are passing on main.
>>
>> Example backtrace:
>>
>> file-name-directory(nil)
>>   org-babel-result-to-file("/tmp/test.txt" nil attachment)
>>   org-babel-insert-result("/tmp/test.txt" ("replace" "value" "file" "g
>>   org-babel-execute-src-block()
>>   (progn (org-mode) (let ((point (string-match "" inside-text))
>>   (unwind-protect (progn (org-mode) (let ((point (string-match ">   (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
>>   (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current
>>   (let ((inside-text (if (stringp "\n#+begin_src shell :results
>>   (let ((lexical-binding nil)) (let ((inside-text (if (stringp "\n>   (lambda nil (let ((lexical-binding nil)) (let ((inside-text (if (str
>>   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
>>   ert-run-test(#s(ert-test :name test-ob/result-graphics-link-type-hea
>>   ert-run-or-rerun-test(#s(ert--stats :selector "test-ob" :tests ... :
>>   ert-run-tests("test-ob" #f(compiled-function (event-type  event
>>   ert-run-tests-batch("test-ob")
>>   ert-run-tests-batch-and-exit("test-ob")
>>   (let ((org-id-track-globally t) (org-test-selector (if org-test-sele
>>   org-test-run-batch-tests("test-ob")
>>   command-line-1(("--eval" "(setq vc-handled-backends nil org-startup-
>>   command-line()
>>   normal-top-level()
>> Test test-ob/result-graphics-link-type-header-argument condition:
>> (wrong-type-argument stringp nil)
>>FAILED  129/140  test-ob/result-graphics-link-type-header-argument
>> (0.006189 sec)
>>
>> Best,
>> Ihor
>>
>


org-src-block-results-attach-dir.patch
Description: Binary data


Re: [BUG] org-capture autoload bug? [9.5.2 (9.5.2-gfbff08 @ /home/ignacio/.emacs.d/elpa/org-9.5.2/)]

2022-06-14 Thread Ignacio Casso

>> Subject: [PATCH] use `set-default-toplevel-value' in `defcustom' setters
>^Use
>
>> * lisp/ob-lilypond.el (org-babel-lilypond-commands): use
>^Use
>> `set-default-toplevel-value' instead of `set' or `set-default' in
>> `defcustom' :set argument.
>> * lisp/ob-shell.el (org-babel-shell-names): Ditto.

Done.

> Please don't use ditto. (what does it even mean?)

It means the same thing again. I saw it in the message of the Emacs
commit I referenced earlier in this thread, so I assumed it was standard
practice. I have replaced it with "The same". But if the problem is that
it makes it difficult to work later with the changelog, I can copy and
paste.


> It would be helpful to reference the relevant ML discussions.

Done. Is there a standard, concise way to do this for org-mode threads?
I know I can reference the Emacs discussion with just bug#54399, but I'm
using long lists.gnu.org/archive/... links for org-mode.


I attach the new patch (same diff, different commit message):

>From c38584ea4e396f56d34ca934582c43436372b102 Mon Sep 17 00:00:00 2001
From: Ignacio Casso 
Date: Sat, 11 Jun 2022 18:59:15 +0200
Subject: [PATCH] Use `set-default-toplevel-value' in `defcustom' setters

* lisp/ob-lilypond.el (org-babel-lilypond-commands): Use
`set-default-toplevel-value' instead of `set' or `set-default' in
`defcustom' :set argument.
* lisp/ob-shell.el (org-babel-shell-names): The same.
* lisp/org-capture.el (org-capture-templates): The same.
* lisp/org-clock.el (org-clock-ask-before-exiting): The same.
* lisp/org-duration.el (org-duration-units): The same.
* lisp/org-faces.el (org-set-tag-faces): The same.
* lisp/org-footnote.el (org-footnote-section): The same.
* lisp/org-list.el (org-plain-list-ordered-item-terminator): The same.
(org-list-allow-alphabetical): The same.
* lisp/org.el (org-babel-do-load-languages): The same.
(org-set-modules): The same.
(org-export-backends): The same.
(org-use-fast-todo-selection): The same.
(org-enforce-todo-dependencies): The same.
(org-enforce-todo-checkbox-dependencies): The same.
(org-display-custom-times): The same.
(org-set-packages-alist): The same.
(org-set-emph-re): The same.
* lisp/ox-odt.el (org-odt-schema-dir): The same.

This commit fixes a bug that occurred when using an autoload function
inside a let-binding for a custom variable when the feature defining
both the function and the custom variable had not been loaded yet.

See bug#54399 and
https://lists.gnu.org/archive/html/emacs-orgmode/2022-03/msg00085.html,
https://lists.gnu.org/archive/html/emacs-orgmode/2022-06/msg00226.html,
---
 lisp/ob-lilypond.el  |  2 +-
 lisp/ob-shell.el |  2 +-
 lisp/org-capture.el  |  2 +-
 lisp/org-clock.el|  2 +-
 lisp/org-duration.el |  2 +-
 lisp/org-faces.el|  2 +-
 lisp/org-footnote.el |  2 +-
 lisp/org-list.el |  4 ++--
 lisp/org.el  | 23 +++
 lisp/ox-odt.el   |  2 +-
 10 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el
index df128441a..dc33ebc17 100644
--- a/lisp/ob-lilypond.el
+++ b/lisp/ob-lilypond.el
@@ -107,7 +107,7 @@ you can leave the string empty on this case."
   :package-version '(Org . "8.2.7")
   :set
   (lambda (symbol value)
-(set symbol value)
+(set-default-toplevel-value symbol value)
 (setq
  org-babel-lilypond-ly-command   (nth 0 value)
  org-babel-lilypond-pdf-command  (nth 1 value)
diff --git a/lisp/ob-shell.el b/lisp/ob-shell.el
index c25941a44..4454e3b5d 100644
--- a/lisp/ob-shell.el
+++ b/lisp/ob-shell.el
@@ -68,7 +68,7 @@ outside the Customize interface."
   :group 'org-babel
   :type '(repeat (string :tag "Shell name: "))
   :set (lambda (symbol value)
-	 (set-default symbol value)
+	 (set-default-toplevel-value symbol value)
 	 (org-babel-shell-initialize)))
 
 (defcustom org-babel-shell-results-defaults-to-output t
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 773234967..948eb8bc6 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -376,7 +376,7 @@ When you need to insert a literal percent sign in the template,
 you can escape ambiguous cases with a backward slash, e.g., \\%i."
   :group 'org-capture
   :package-version '(Org . "9.5")
-  :set (lambda (s v) (set s (org-capture-upgrade-templates v)))
+  :set (lambda (s v) (set-default-toplevel-value s (org-capture-upgrade-templates v)))
   :type
   (let ((file-variants '(choice :tag "Filename   "
 (file :tag "Literal")
diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index e0c40ae23..b94c79baa 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -493,7 +493,7 @@ This variable only has effect if set with \\[customize]."
  (if value
  (add-hook 'kill-emacs-query-functions #'org-clock-kill-emacs-query)
(remove-hook 'kill-emacs-query-functions #'org-clock-kill-emacs-query))
- (set symbol value))
+ 

Re: [BUG] org-copy-subtree in a file with local variables marks buffer as modified [9.5.3 (release_9.5.3-6-gef41f3 @ /home/ignacio/repos/emacs/lisp/org/)]

2022-06-14 Thread Ignacio Casso

>> -  (delete-and-extract-region (point) (point-max)))
>> +   (undo-boundary)
>
>> +   (setq buffer-undo-list
>> + (seq-drop-while 'identity buffer-undo-list)))
>
> This looks fragile and can be disasterous when buffer-undo-list is
> large.

I agree that it is very fragile, but could you explain why is it also
problematic with a large `buffer-undo-list'? I guess you mean
efficiency-wise, but it would only iterate through the few items added
since the call to (undo-boundary). Is there something else I'm not seeing?

> Maybe just use with-silent-modifications or some ideas from there (for
> example, wrapping modifications inside let-bound (buffer-undo-list t))?
> We should not inhibit modification hooks though. Otherwise, it will mess
> up with caching code.

Done. I attach the new patch:

>From 54e05dc54fe7091f2d1c7e0c44e01cf5abeb4907 Mon Sep 17 00:00:00 2001
From: Ignacio Casso 
Date: Sun, 12 Jun 2022 10:38:53 +0200
Subject: [PATCH] Do not mark buffer as modified with
 org-preserve-local-variables

* lisp/org-macs.el (org-preserve-local-variables): Do not mark buffer
as modified or alter `buffer-undo-list' when body does not actually
modify the buffer.

This commit fixes a bug with `org-copy-subtree', which marked the
buffer as modified and added an entry to the undo list when the visited
file had local variables.
---
 lisp/org-macs.el | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 19e5f42e9..c34ff3ab7 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -166,13 +166,19 @@
 	 (and (re-search-backward "^[ \t]*# +Local Variables:"
   (max (- (point) 3000) 1)
   t)
-		  (delete-and-extract-region (point) (point-max)))
+   (let ((buffer-undo-list t))
+	 (delete-and-extract-region (point) (point-max)))
+ (tick-counter-before (buffer-modified-tick)))
  (unwind-protect (progn ,@body)
(when local-variables
 	 (org-with-wide-buffer
 	  (goto-char (point-max))
 	  (unless (bolp) (insert "\n"))
-	  (insert local-variables))
+  (let ((modified (< tick-counter-before (buffer-modified-tick)))
+(buffer-undo-list t))
+	(insert local-variables)
+(unless modified
+  (restore-buffer-modified-p nil
 
 (defmacro org-no-popups ( body)
   "Suppress popup windows and evaluate BODY."
-- 
2.25.1



Re: Org default is Left-to-right

2022-06-14 Thread Daniel Fleischer
Ihor Radchenko [2022-06-14 Tue 13:17] wrote:

> The Emacs devs reply was that 'right-to-left global setting is preferred
> for such users while nil being preferred setting for other users and it
> should not be something Org decides.
>
> Hence, I just applied a patch removing Org setting
> bidi-paragraph-direction to main (0cdbc63a0).

The right-to-left setting makes everything RTL, and more often than not
I have mixed-languages documents which looks better with nil direction
value.

Anyways, good judgment; it is up to a user who uses different languages
to decide how Emacs should align the text and it should carry naturally
into Org.

-- 

Daniel Fleischer



Re: [BUG] Info JS does not work [9.5.3 (release_9.5.3-467-g2bd34e @ /Users/salutis/src/org-mode/lisp/)]

2022-06-14 Thread Bastien
Hi Ihor,

Ihor Radchenko  writes:

> Great! Will it be linked at orgmode.org? 

Good idea, I just added a link to orgmode.org front page.

> Org contribute page is lacking
> links to all the repositories (which someone already complained about).
> Addition link at the frontpage might also make sense.

Yes, thanks for suggesting this, I also added an overview of Org
repositories on https://orgmode.org/worg/org-contribute.html

-- 
 Bastien



Re: [BUG] incorrect cached element under native-comp [9.5.4 (9.5.4-ga8b322 @ /Users/jabrahms/.emacs.d/straight/build/org/)]

2022-06-14 Thread Ihor Radchenko
"Justin Abrahms"  writes:

> All of that is correct, yes.

Which means that you are trying to use Org functions before Org is
loaded. A cursory look across your config yields:

(add-hook 'find-file-hook #'vulpea-project-update-tag)
wich is likely the cause.

Will the warning disappear when you comment the above line?

Best,
Ihor



Formatting in citation locator

2022-06-14 Thread Marvin Gülker
Dear list,

is it possible to apply formatting within the citation locator? It is
sometimes useful to me. For example, when I want to cite a dissenting
opinion contained in a judgment of the German Constitutonal Court, it is
helpful to highlight that the cited location is a dissenting opinion and
not the majority’s position. Take for example this bibliographic entry:

@Jurisdiction{bverfg2010vds,
author = {BVerfG},
type = {Urteil},
number = {1 BvR 256/08 u.a.},
date = {2010-03-02},
title = {Vorratsdatenspeicherung},
shortjournal = {BVerfGE},
journaltitle = {Entscheidungen des Bundesverfassungsgerichts},
pages = {260-385},
volume = {125},
jurisdiction = {de},
langid = {ngerman}
}

The decision contains two dissenting opinions at its end. Now I try to
cite the first one like this:

#+TITLE: Test
#+AUTHOR: Test
#+LANGUAGE: de
#+cite_export: csl /tmp/juristische-schulung.csl
#+bibliography: /tmp/test.bib

Abweichende Meinung. [cite:@bverfg2010vds p. 373 [Sondervotum 
/Schluckebier/],]

juristische-schulung.csl is this style: 
https://github.com/citation-style-language/styles/blob/e22b8a566bad9b4c7f52720f60dd875057a5d210/juristische-schulung.csl

Exporting this to HTML comes out as:

¹ BVerfGE 125, 260 (373 [Sondervotum /Schluckebier/])

I would have expected that the word “Schluckebier” – which is the
dissenting judge’s name – is italicised, but instead the raw markup is
exported. I want it italicised, because it is common to italicise names
in German judicial citation styles.

Is this expected behaviour?

Org mode version 9.5 (release_9.5-661-g5e0afb @ 
/home/quintus/.emacs.d/org-mode/lisp/)
citeproc.el at ba49516265fa24b138346c4918d39d19b4de8a62

  -quintus

--
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Re: Old user needs help

2022-06-14 Thread Ihor Radchenko
Peter Gragert  writes:

> For example I have a juni2022.org file and would like that that org-file is
> opened automatically on a click on the emacs desktop short-cut icon.
> (years ago something in init.el (load-file "..." )if  I remember correctly

You can put (find-file "...") near the end of your init.el

See
https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html
and
https://www.gnu.org/software/emacs/manual/html_node/emacs/Visiting.html

Alternatively, you can achieve a similar behavior using
desktop-save-mode. desktop-save-mode will make Emacs remember all the
open files just before closing and later restore them when you open
Emacs again.
See
https://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Emacs-Sessions.html

Hope if helps.

Best,
Ihor



Re: Indenting a blank definition list item leaves point at beginning of line

2022-06-14 Thread Ihor Radchenko
JD Smith  writes:

> Org 9.5.4 (point at `X’):
>
> - foo :: bar X [M-Ret]
> - X :: [M-right]
>
> leaves point at beginning of line:
>
> - foo :: bar
> X  - :: 
>
> If you add content first, point stays put.

Duplicate of https://orgmode.org/list/878rq6hstt.fsf@localhost



Re: [BUG] incorrect cached element under native-comp [9.5.4 (9.5.4-ga8b322 @ /Users/jabrahms/.emacs.d/straight/build/org/)]

2022-06-14 Thread Justin Abrahms
All of that is correct, yes.

On Mon, Jun 13, 2022, at 11:59 PM, Ihor Radchenko wrote:
> "Justin Abrahms"  writes:
> 
> > I saw this error when opening emacs.org via (counsel-find-file  
> > INITIAL-INPUT INITIAL-DIRECTORY)
> >
> > Slightly different error now (same style, different element), but I didn't 
> > get a backtrace.
> >
> > https://gist.github.com/justinabrahms/4bc97379cb8d8e317ca98a1f09524a5c
> 
> Do you mean that you did the following:
> 
> 1. (setq org-element--cache-self-verify 'backtrace)
> 2. (setq org-element--cache-self-verify-frequency 1.0)
> 3. Open emacs.org using counsel-find-file
> 4. Got the above backtrace?
> 
> Best,
> Ihor
> 


Re: [BUG] incorrect cached element under native-comp [9.5.4 (9.5.4-ga8b322 @ /Users/jabrahms/.emacs.d/straight/build/org/)]

2022-06-14 Thread Ihor Radchenko
"Justin Abrahms"  writes:

> I saw this error when opening emacs.org via (counsel-find-file  
> INITIAL-INPUT INITIAL-DIRECTORY)
>
> Slightly different error now (same style, different element), but I didn't 
> get a backtrace.
>
> https://gist.github.com/justinabrahms/4bc97379cb8d8e317ca98a1f09524a5c

Do you mean that you did the following:

1. (setq org-element--cache-self-verify 'backtrace)
2. (setq org-element--cache-self-verify-frequency 1.0)
3. Open emacs.org using counsel-find-file
4. Got the above backtrace?

Best,
Ihor



Re: [BUG] Mention #+PRINT_BIBLIOGRAPHY in the Org manual

2022-06-14 Thread Marvin Gülker


Am Montag, dem 13. Juni 2022 schrieb Rudolf Adamkovič:
> It all makes no sense without printing the bibliography, right?

In a footnote citation style, it can make sense, and it is common in
German judicial articles. We do not need separate bibliographies there,
because we instead do cross-referencing in footnotes. The first footnote
contains the full bibliographic information, the subsequent ones
abbreviate it and reference the first footnote.

But I do agree that the manual should of course mention it.

  -quintus

--
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Re: [BUG] incorrect cached element under native-comp [9.5.4 (9.5.4-ga8b322 @ /Users/jabrahms/.emacs.d/straight/build/org/)]

2022-06-14 Thread Justin Abrahms
I saw this error when opening emacs.org via (counsel-find-file  
INITIAL-INPUT INITIAL-DIRECTORY)

Slightly different error now (same style, different element), but I didn't get 
a backtrace.

https://gist.github.com/justinabrahms/4bc97379cb8d8e317ca98a1f09524a5c

On Mon, Jun 13, 2022, at 10:03 PM, Ihor Radchenko wrote:
> "Justin Abrahms"  writes:
> 
> > I've recently upgraded to emacs 29 w/ native-comp support. I'm
> > consistently getting this error when I load emacs.org and it stops
> > parsing my document, which is a bit painful. Hopefully this bug report
> > helps.
> >
> > My full emacs.org: 
> > https://gist.github.com/justinabrahms/7fc5bfcc292ca6fba7d10ec2958bae57
> >
> > Error I see in *Warnings*: 
> >
> > Warning (org-element-cache): org-element--cache: (ivy-alt-done) Cached 
> > element is incorrect in emacs.org. (Cache tic up to date: "yes") Resetting.
> 
> Thanks for reporting!
> 
> Do I understand correctly that you observe the error when you are trying
> to jump to a candidate from swiper buffer?
> 
> Could you please set org-element--cache-self-verify to 'backtrace,
> org-element--cache-self-verify-frequency to 1.0, try to trigger the
> error; and then post the full backtrace?
> 
> Best,
> Ihor
>