[BUG] rendering latex fragment in latex mode is not working [9.6 (9.6-??-e7ea951 @ /Users/roiholtzman/.emacs.d/.local/straight/build-27.2/org/)]

2022-03-25 Thread Roi Holtzman
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


This is the first time I am submitting a bug report here. I am not sure
this is the proper place. I just took the advice of the warning message
I got.

When I am in latex mode (writing a tex document) and I run
`org-toggle-latex-fragment` I get the error
```
Warning (org-element-cache): org-element--cache: Org parser error in
main.tex::38463. Resetting.
The error was: (error "rx ‘**’ range error")
Backtrace:
nil
Please report this to Org mode mailing list (M-x org-submit-bug-report).
```


Emacs  : GNU Emacs 27.2 (build 1, x86_64-apple-darwin19.6.0, NS
appkit-1894.60 Version 10.15.7 (Build 19H2))
of 2021-04-28
Package: Org mode version 9.6 (9.6-??-e7ea951 @
/Users/roiholtzman/.emacs.d/.local/straight/build-27.2/org/)


Re: [oc] provide style/citation preview?

2022-03-25 Thread Bruce D'Arcus
On Fri, Mar 25, 2022 at 8:55 AM John Kitchin 
wrote:

> I think this kind of preview is well-suited for external packages.

You may be right.

> There is a subtle point I ran into with this preview approach though,
> and that is what is the backend export you want to see? People expect
> one source (org) to export to different backends, and even use one
> source to make a PDF and HTML (and maybe others). Now it also possible
> to use different citation styles for different backends, and the
> backends may use different citation processors (e.g. bib(la)tex or CSL).
> I felt this was too complex to try to get right in one package. External
> packages could provide any subset of these they want, e.g. the way
> https://github.com/andras-simonyi/org-cite-csl-activate does. My opinion
> of course.

oc-csl-activate uses org-cite-csl--fallback-style-file for the preview
style, but also has a org-cite-csl-activate-use-document-style defcustom to
optionally override that. A LaTeX preview wouldn't need this.

Seems more generally a user would need to be able to specify what the
export target is.

But I guess per your point, one could do configuration by simply selecting
whatever preferred activate processor. So, for example, we could have one
for latex preview.

> I think the basic CSL styled citation tooltip that is independent of the
> final state is a good compromise. The point is to give enough context
> about the key to tell you what it is without visiting the source, and if
> you need more, you go visit the source (bibtex file, org file, etc.).

Indeed.

Bruce


Re: citations: org-cite vs org-ref 3.0

2022-03-25 Thread Max Nikulin

On 21/03/2022 18:51, John Kitchin wrote:


citenum and bibentry are the only two I am not sure have a CSL analog.


I read your messages once more and I should say that I feel some 
disagreement of this one (I removed most of it) and the earlier and 
longer one from Sun, 20 Mar 2022 20:31:29 -0400 
https://list.orgmode.org/m2sfrc149c@andrew.cmu.edu


I admit that org-ref is carefully tuned to your workflow. I hope, it is 
possible to left aside decomposition of org-cite into modules for some time.


Let's assume org-cite with natbib backend for citations and org-ref for 
cross-references. It seems, a couple of missed styles currently is not a 
problem due to the defcustom for the mapping.


Are there still any technical limitations that prevent getting in the 
exported LaTeX file the same citation commands as for org-ref?


In particular I am worrying concerning 
https://github.com/jkitchin/org-ref README (and the same phrase from the 
earlier message):


org-cite does not meet my citation and technical document publishing 
needs, and it was not possible to integrate it into org-ref without 
compromising those.
Does it refer to exported result or to convenience of working with 
citations? Would it help if it were possible to choose style by its 
natbib command?


I see that you do not like org-cite styles, but I can not figure out 
what are the real blockers that prevent producing documents having the 
same quality.





Re: citations: org-cite vs org-ref 3.0

2022-03-25 Thread Max Nikulin

On 24/03/2022 06:04, Nicolas Goaziou wrote:

Max Nikulin writes:


Nicolas, concerning a new thread, I have an impression that you are
busy with over activities since you are participating in discussions
not so frequently. So I am unsure at which moment it is appropriate to
raise such question that otherwise may just be buried in the list
archive.


I don't see how my presence (or not) on the list relates to this. If
there's an idea worth a discussion, it should not be buried within
a thread.


It was you who implemented org-cite and org-element parser. John chose a 
direct and practical way. He defined multiple link types and got the 
working solution. A more elegant approach would require some extension 
of syntax, so your opinion is really important. For cross-references it 
might be "[ref/style...]" in additional to "[cite/style...]" or 
attributes specific to links.



Outside of Org, citations are links.


But we're on an Org mailing list so…


In respect to citations and cross-references Org is a tool to prepare 
documents for "outside of Org".



I think link attributes were discussed a couple of times on this ML
already. Nothing was implemented tho.


I do not remember such thread during last couple of years. I will try to 
search deeper and maybe will start another thread.



I'm not convinced Org should generalize this to any inline object,
either, mainly because it sounds messy. Of course, if you have an
idea on the subject, please share it.

In any case, this is another topic, neither related to citations nor to
cross-references.


"pageref", "nameref", "eqref", "autoref" (see 
https://github.com/jkitchin/org-ref/blob/master/org-ref.org) may be 
values of the style attribute of a "[[name]]" link instead of link type 
as it is done in org-ref.



For citations some values may be passed to specific citation backend
overriding default value derived from style.


In that situation, you can define a new style specific to the citation
back-end.


Sometimes an ad-hoc adjustment at the particular place is more 
convenient than even file-local property.





Re: citations: org-cite vs org-ref 3.0

2022-03-25 Thread Max Nikulin

On 21/03/2022 18:51, John Kitchin wrote:

Vikas Rawal writes:


 From the perspective of a user, this was only meant to express a
sentiment that one finds oneself in a situation of having to choose
between two good things, and that we have not been able to find a way
to make both compatible with each other. It was in not meant as a
disrespect in any way.


I don't think you have to choose. You can use org-cite for
citations, and org-ref for cross-references. The citation syntax is
orthogonal, you just should not mix them. You can even wire org-ref to
use org-cite-insert like this:

(setq org-ref-insert-cite-function (lambda () (org-cite-insert nil)))


I am glad to read this. John, could you, please, update the README file 
for https://github.com/jkitchin/org-ref to clarify that both packages 
may be used within the same document while org-ref is used solely for 
cross-references (I may create a github issue if your prefer)? From my 
point of view the following phrase may be considered as prohibitive in 
respect to combining the packages for any purpose:


You can use both org-cite and org-ref (although you should not do 
that in the same document as they are independent citation tools).

I feel some ambiguity in the starting message in this thread:

Vikas Rawal, Sun, 20 Mar 2022 17:38:30 +0530. 
https://list.orgmode.org/caltzab2bhuldoxaamuzfqh2h453ekb6k7bkohbu-dhpn98a...@mail.gmail.com



This obviously creates many problems including that two people using
different citation systems cannot share org files.
Accordingly to the org-ref README installed org-ref package does not 
break org-cite, so people are free to share documents. They just should 
have both packages configured and should adhere to a chosen package in 
each document (for *citations*).





Re: citations: org-cite vs org-ref 3.0

2022-03-25 Thread Max Nikulin

On 22/03/2022 00:00, John Kitchin wrote:

"Bruce D'Arcus" writes:


Indeed, the question of how to better support cross-references in org
is an important one.

I don't really use them much, and so am still unsure if this could be
addressed with incremental improvements in existing org link support,
or if it would require more significant enhancements.


No incremental improvement is required IMO, regular links are
sufficient. org-ref has handled these with regular links from the
beginning. It even has an org-ref-refproc now for non-LaTeX exports that
has some support for things like sorting, grouping and cleveref. You can
find an example org file at
https://github.com/jkitchin/org-ref/blob/master/examples/refproc.org,


Interesting package. At first I thought you use keywords around links as 
implicit markup, but later I realized that this file is example of 
export, not the original source file (with different link types).



and see it in action at https://www.youtube.com/watch?v=rRR-5NSpKyE the
video has some rough spots, but you can get the idea.

You can support all kinds of things in these links (for example, I now
support pre/post note text in the cite link paths), really anything you
want to parse out of the path.





[BUG] org-agenda-remove-restriction-lock does not remove file lock [9.5.2 (release_9.5.2-17-gea6b74 @ /nix/store/iqqk7iqfwmfc6r78xg2knyq7hww2mhs4-emacs-git-20220225.0/share/emacs/29.0.50/lisp/org/)]

2022-03-25 Thread Visuwesh


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


C-u C-c C-x < followed by C-c C-x > does not remove the file restriction
lock.  

`org-agenda-remove-restriction-lock' checks for non-nil value of
`org-agenda-restriction' but `org-agenda-set-restriction-lock' explicitly
sets it to nil when TYPE is 'file.  Setting `org-agenda-restriction' to
a dummy value like 'dummy gets the job done.

Emacs  : GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo 
version 1.16.0, Xaw scroll bars)
Package: Org mode version 9.5.2 (release_9.5.2-17-gea6b74 @ 
/nix/store/iqqk7iqfwmfc6r78xg2knyq7hww2mhs4-emacs-git-20220225.0/share/emacs/29.0.50/lisp/org/)



Re: [oc] provide style/citation preview?

2022-03-25 Thread John Kitchin
I think this kind of preview is well-suited for external packages.

There is a subtle point I ran into with this preview approach though,
and that is what is the backend export you want to see? People expect
one source (org) to export to different backends, and even use one
source to make a PDF and HTML (and maybe others). Now it also possible
to use different citation styles for different backends, and the
backends may use different citation processors (e.g. bib(la)tex or CSL).
I felt this was too complex to try to get right in one package. External
packages could provide any subset of these they want, e.g. the way
https://github.com/andras-simonyi/org-cite-csl-activate does. My opinion
of course.

I think the basic CSL styled citation tooltip that is independent of the
final state is a good compromise. The point is to give enough context
about the key to tell you what it is without visiting the source, and if
you need more, you go visit the source (bibtex file, org file, etc.).




"Bruce D'Arcus"  writes:

> On Thu, Mar 24, 2022 at 12:33 PM Vikas Rawal  wrote:
>
>>> So I'm just wondering how best to dynamically generate those previews,
>>> perhaps even just using a pre-selected reference*, and if maybe oc
>>> could make that easier?
>>>
>>
>> Some kind of overlay that shows citations as they would (at least as close 
>> as possible) look in the export?
>
> Something like this?
>
> https://github.com/andras-simonyi/org-cite-csl-activate
>
> I think he was hoping to incorporate that into the oc-csl processor at
> some point, and that would indeed be another approach to in-buffer
> previewing.
>
> The issue I have is more just generating the preview content for
> incorporation into the completion annotations.
>
> Bruce


-- 
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
Pronouns: he/him/his



No mathematics in Texinfo exports

2022-03-25 Thread Rudolf Adamkovič
Hello everyone!

Today, I tried to export my notes from Org to Texinfo (and then HTML)
and the result blew my mind.  It produced a beautifully inter-linked
website, similar to the glorious Emacs manual.  Org also exported the
citations in the correct format.  I must say that I like the HTML output
from Texinfo better than what the standard Org HTML exporter produces!

But then, I found that the Texinfo exporter skips all mathematics,
despite the fact that Texinfo uses the same language to encode it,
namely (La)TeX and even MathJax for the HTML output (like Org does).

Does anyone work on this, or do I have to tackle the problem myself?  I
would appreciate any tips.

Rudy
-- 
"Thinking is a momentary dismissal of irrelevancies."
-- Richard Buckminster Fuller, 1969

Rudolf Adamkovic  [he/him]
Studenohorska 25
84103 Bratislava
Slovakia



Re: [PATCH] Re: [BUG] Hard-coded begin/end in org-insert-structure-template [9.5.2 (release_9.5.2-24-g668205 @ /Users/salutis/src/emacs/nextstep/Emacs.app/Contents/Resources/lisp/org/)]

2022-03-25 Thread Rudolf Adamkovič
Ihor Radchenko  writes:

I patched a local checkout of the main branch, and I can confirm that
your works well here.  I also added [1] to my configuration file to
upcase all the structure templates automatically.  I hope we will have
this bundled with Org proper.  Fantastic work!

[1] Code that upcases the structure templates:

(setq org-structure-template-alist
  (mapcar
   (lambda (pair)
 (cons (car pair)
   (upcase (cdr pair
   org-structure-template-alist))

Rudy
-- 
"Strange as it may sound, the power of mathematics rests on its evasion
of all unnecessary thought and on its wonderful saving of mental
operations."
-- Ernst Mach, 1838-1916

Rudolf Adamkovic  [he/him]
Studenohorska 25
84103 Bratislava
Slovakia



org-depend: bug fix

2022-03-25 Thread Damien Couroussé
Please find attached a small patch for org-depend, which fixes a bug 
(function 'remove-if' is unknown).


Thank you all for your work around emacs and org-mode!

best regards,
Damien Couroussé

--
Damien Couroussé
Research Engineer
Commissariat à l’énergie atomique et aux énergies alternatives
Institut List | Minatec Campus
17 avenue des Martyrs | 38054 Grenoble Cedex | France

Tel : +33 (0)4 38 78 04 66
Web :http://www-list.cea.fr
From 685dc764fab6bba1008da001eb295a301db16bfd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Damien=20Courouss=C3=A9?= 
Date: Thu, 24 Mar 2022 15:43:25 +0100
Subject: [PATCH] org-depend.el: function remove-if is renamed org-remove-if

* org-depend.el: Fix bug, due to function 'remove-if' being not found.
  The org API has changed and the function was renamed 'org-remove-if'.

TINYCHANGE
---
 lisp/org-depend.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-depend.el b/lisp/org-depend.el
index 8306184..7dab651 100644
--- a/lisp/org-depend.el
+++ b/lisp/org-depend.el
@@ -287,7 +287,7 @@ This does two different kinds of triggers:
  (if no-wrap items-after
    (append items-after items-before
 			  (t (nreverse items
-		  (setq items (remove-if
+		  (setq items (org-remove-if
 			   (lambda (item)
  (or (equal (first item) this-item)
  (and (not todo-and-done-only)
-- 
2.30.2