Re: filling more narrowly --- or unfilling -- for export to email, upon ascii export

2024-05-22 Thread Fraga, Eric
Hi Samuel,

On Wednesday, 22 May 2024 at 00:53, Samuel Wales wrote:
> unfilled paragraphs seems to be the norm in email these days for
> nontechnical folk.  but org has plain lists and things, which need
> org-style unfilling.

Given the profusion of potential devices for reading email and their
differing sizes, I have found that unfilled paragraphs are best in
general although I do fill for posts to mailing lists like this one and
newsgroups as that is the convention (arguably).

However, if there is formatting that you wish to preserve (lists,
equations [which often is the case for my emails to my research group,
say]), the only real option (as much as I dislike it) is to use HTML.  I
write my email using org syntax and then invoke

  M-x org-mime-htmlize RET

just before sending.

-- 
: Eric S Fraga, with org release_9.6.23-1320-g1be2f9 in Emacs 30.0.50


Re: org-table-row face

2024-05-14 Thread Fraga, Eric
On Monday, 13 May 2024 at 21:16, Colin Baxter wrote:
> Thanks, so presumably I just use set-face-attribute.

For many/most face aspects, I find the customize interface the easiest
to use.  Simply

M-x customize-face RET org-table-row RET

(and then probably click on "Show all attributes").

You can see that the inherit option is selected if the face has not
previously been customised.

-- 
: Eric S Fraga, with org release_9.6.23-1320-g1be2f9 in Emacs 30.0.50


Re: MathML and ODT export: inline possible?

2024-04-22 Thread Fraga, Eric
On Friday, 19 Apr 2024 at 23:19, Max Nikulin wrote:
> MathJax may be your friend. LaTeXML and katex do not add  as well.

MathJax works well but for websites; my context is that I need to
prepare a Word document to share with others.
 
> Actually I asked to confirm that your troubles are not with proper
> escaping of input to a converter.

I don't think so but cannot be sure.

Anyway, with the explicit .mml file, everything is good.  Thanks for
your help.

eric

-- 
: Eric S Fraga, with org release_9.6.19-1230-g407a55 in Emacs 30.0.50


Re: strange export problem with a file: link

2024-04-22 Thread Fraga, Eric
On Saturday, 20 Apr 2024 at 12:25, Ihor Radchenko wrote:
> Fixed, on main.

Thank you!

-- 
: Eric S Fraga, with org release_9.6.23-1320-g1be2f9 in Emacs 30.0.50


Re: MathML and ODT export: inline possible?

2024-04-18 Thread Fraga, Eric
On Thursday, 18 Apr 2024 at 15:38, Leo Butler wrote:
> Eric,
> I think there is a bug in the way the exporter handles odt fragments.
>
> Explanation: Maxima can print output in mathml. 

Oh, this is actually excellent news!  I use maxima all the time...

> But when I export to odt, something weird happens: contents.xml
> contains the fragment of mathml, but it is not displayed in
> libreoffice. 

Yes, I found this.  I had to wrap the  block within the following
ODT to get anything to display:

--8<---cut here---start->8---




MathML goes here




--8<---cut here---end--->8---

although the styling is weird currently.  I've not yet played with the
style name etc. but I needed all three aspects: paragraph, frame, and
object to get the equation to appear.

> On the other hand, the snippet in the third sub-section, that is saved
> to file,

Yes, the exporter seems to wrap the MML with the types of lines I've
shown above.

I will play with maxima (tomorrow, I think).

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.23-1320-g1be2f9 in Emacs 30.0.50


Re: strange export problem with a file: link

2024-04-18 Thread Fraga, Eric
On Thursday, 18 Apr 2024 at 21:46, Max Nikulin wrote:
> Sorry that I was not clear enough. Org code should be fixed. For a
> while you may revert that commit in your local repository.

Ah, okay!  Thank you.  I'll leave my documents as they are then. :-)

-- 
: Eric S Fraga, with org release_9.6.23-1320-g1be2f9 in Emacs 30.0.50


Re: MathML and ODT export: inline possible?

2024-04-18 Thread Fraga, Eric
Hi Max,

On Thursday, 18 Apr 2024 at 22:05, Max Nikulin wrote:
> I am still curious if pandoc can handle your math expressions.

The short answer: not quite but definitely much better than latexmlmath.

The longer answer: my equation has a number of terms with subscripts
where the subscripts themselves have subscripts.  In LaTeX, something
like $a_{b_c}$.  Pandoc generates

 a  b c 

(where the a, b, and c are ...) whereas, by hand, I use

 a  b c 

which has a more "LaTeX" protected feel.

The latter works but the former (pandoc) does show properly for most of
the terms but not all of them (showing a red upside down question mark
instead of the subscripted subscript).  Yet all these terms have the
same structure in MML.

Pandoc also wraps the inner contents of the ... block in
.  I do not know what that does as I've only just started
learning mathml.

Thanks again for all the help today.  I may actually meet my deadline...

eric

PS. my remaining task, were I to use EXPORT ODT blocks, is figuring out
how to style (typeface, size, etc.) the equation properly, something
which the link approach does magically (well, seems like magic to me at
the moment ;-)).  But that can wait for after my deadline!

-- 
: Eric S Fraga, with org release_9.6.23-1320-g1be2f9 in Emacs 30.0.50


Re: MathML and ODT export: inline possible?

2024-04-18 Thread Fraga, Eric
Hi Max,

On Thursday, 18 Apr 2024 at 21:44, Max Nikulin wrote:
> #+begin_export odt
> ...
> #+end_export

I thought I had tried that but must have done something different/wrong.

This works beautifully, once I figured out I had to wrap the
... within a .

Many thanks,
eric

PS - also thanks for details on latexmlmath.

-- 
: Eric S Fraga, with org release_9.6.23-1320-g1be2f9 in Emacs 30.0.50


Re: strange export problem with a file: link

2024-04-18 Thread Fraga, Eric
On Thursday, 18 Apr 2024 at 19:08, Max Nikulin wrote:
> It is a side effect of
>
> 72b0e9ff0 2024-02-05 16:39:05 +0100 Ihor Radchenko: org-export: Do not
> strip link type by default during export

Thank you Max.

I have now checked the ORG-NEWS file, which I probably should have
looked at before posting (sorry!).  The implication is that I should use
org-link-set-parameters to define the :export field for the file link.
I'll explore in due course.  It might be nice if the news entry gave a
simple example to get back to the previous behaviour.  At this point,
I've moved to using MathML instead for what I need doing right now so
the problem is no longer an issue for me (at the moment).

However, although I'm sure there was a good reason for the change, it
has broken quite a few of my documents!  Not complaining; just noting.
Living at the edge does carry a price...

Thanks again,
eric

-- 
: Eric S Fraga, with org release_9.6.23-1320-g1be2f9 in Emacs 30.0.50


MathML and ODT export: inline possible?

2024-04-18 Thread Fraga, Eric
Hello all,

I am having (for my sins) to write some Word documents.  I don't even
have Word on my system but that's by the by.  The documents have some
mathematical expressions.  In the past, I have used LaTeX to create
images of these expressions (and hence my earlier post today).  But I'm
told this is no longer good enough.  Sigh.

So I've started playing with MathML and ODT export.  This is actually
working quite nicely although writing equations in MathML is ponderous
[1].

The question I have is: can I replace the link to a Math ML file (which
does work, as noted in the org info manual) with the actual Math ML code
inline within the org file?  If so, how?  I would rather not have
separate files lying around.

Thank you,
eric

Footnotes:
[1] exporting LaTeX fragments directly, via latexmlmath, does not
 actually work very well at all.  The text passed by org is wrong
 basically.  And latexmlmath gets easily confused, it seems.  I'd
 rather work with the MathML directly in the end. 


-- 
: Eric S Fraga, with org release_9.6.23-1320-g1be2f9 in Emacs 30.0.50


strange export problem with a file: link

2024-04-18 Thread Fraga, Eric
Hello all,

I have a file that consists of these three lines:

--8<---cut here---start->8---
#+begin_src latex :results file raw :exports results :file function.png
\[ y = f(x) \]
#+end_src
--8<---cut here---end--->8---

With "emacs -Q" and loading in org from the git repository as of maybe
an hour or so ago, I get this error:

org-odt-export-to-odt: OpenDocument export failed: Opening input file: No such 
file or directory, /tmp/file:function.png

when I try to export the file to ODT.  Exporting to LaTeX (PDF) works
just fine.  For the ODT export, the "file:" link specification is not
being removed.

I don't think I'm doing anything wrong; is this a bug in the exporter?

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.23-1320-g1be2f9 in Emacs 30.0.50


Re: none

2024-04-11 Thread Fraga, Eric
On Thursday, 11 Apr 2024 at 16:43, Sébastien Gendre wrote:
> When I try to execute a block of PlantUML in an Org document, I get an
> error message:
> [...]
> (setq plantuml-default-exec-mode 'executable)
> (setq org-plantuml-exec-mode 'plantuml)

I don't have either of these setq lines but I do have:

(setq org-plantuml-jar-path (expand-file-name 
"/usr/share/plantuml/plantuml.jar"))

I'm not sure what those settings you have defined are meant to do.

-- 
: Eric S Fraga, with org release_9.6.23-1314-g945046 in Emacs 30.0.50

Re: When src block result is an image, how to define caption, html and latex attributes ?

2024-04-10 Thread Fraga, Eric
On Tuesday,  9 Apr 2024 at 18:58, Sébastien Gendre wrote:
> If I name the source block, it work.

Excellent.

> Is it because:
>
> * When a source block is named, it's result is also named
>
> * When a result is named, Org-mode can locate it and replace its value
>
> * But when a result is not named, Org-mode insert a #+RESULTS: just
>   after the block and create a new one if it cannot found the previous
>   one right after the block

Yes, pretty much my understanding.  I tend to name every src block
anyway as it makes navigation easier (using
org-babel-goto-named-src-block).

-- 
: Eric S Fraga, with org release_9.6.23-1314-g945046 in Emacs 30.0.50

Re: When src block result is an image, how to define caption, html and latex attributes ?

2024-04-09 Thread Fraga, Eric
On Tuesday,  9 Apr 2024 at 16:11, Sébastien Gendre wrote:
> If I add them manually after the result generation, and generate again
> the result, the #+CAPTION, #+LATEX_ATTR and #+HTML_ATTR are moved after
> the result.

Does this happen if your src block is NAMEd?

-- 
: Eric S Fraga, with org release_9.6.23-1314-g945046 in Emacs 30.0.50

Re: Support for whitespace prefix for :noweb-prefix

2024-04-03 Thread Fraga, Eric
Ah, okay.  Thank you.
-- 
: Eric S Fraga, with org release_9.6.23-1314-g945046 in Emacs 30.0.50


Re: [PATCH] Add support for tables in Calc src block :var

2024-04-03 Thread Fraga, Eric
On Saturday, 30 Mar 2024 at 18:34, Visuwesh wrote:
>> Specifically, I would love to make reference to calc variables,
>> especially those defined using embedded calc, in org tables.
>
> Can you please provide a minimal example for me to play around with?  I
> realise I would like something like this too [*] but I don't know
> concretely what this would/should look like.

So, embedded calc processes expressions in any buffer, including org
mode, which might look like this:

x := 3

y := 5

z := 3 x - y => 4

where, in this case, the value of z has been determined by calc and the
answer given after the => in the line.  The beauty of embedded calc is
you can change the value of x and the subsequent expressions will be
updated automatically (well, with C-x * u).

I would then love to be able to have a table that would allow me to
include the value of any variable, e.g. z above, something like

| var | value |
|-+---|
| x   | 3 |
| z   | 4 |

where the values in the second column are obtained by querying Calc.

-- 
: Eric S Fraga, with org release_9.6.23-1314-g945046 in Emacs 30.0.50


Re: Support for whitespace prefix for :noweb-prefix

2024-04-03 Thread Fraga, Eric
On Friday, 29 Mar 2024 at 09:43, Ihor Radchenko wrote:
> Doerthous  writes:
>> #+begin_src elisp
>> (let ((a 0)
>> (let ((b 1))
>>`(,a ,b))
>> #+end_src
>>
>> ~(let (~ is the prefix of <>.
>>
>> I thought we can replace just the prefix in current code[1]  with
>> ~(setq prefix (replace-regexp-in-string "[^ \t]" " " prefix))~ ?
>
> I see.
> So, you want a custom prefix before the expanded noweb reference lines.

Not only that; at the moment, the prefix is defined by the text that
comes before the noweb reference and hence why the "(let (" is repeated
on the second line in the code block above.

So it's a combination of no prefix in such a case and the indentation
according to major mode.  For me, the latter is not an issue but the
former is.

(but not really an issue for me as I make sure I only have noweb
references on lines where such a replacement will not cause any
problems...)

-- 
: Eric S Fraga, with org release_9.6.23-1314-g945046 in Emacs 30.0.50


Re: [PATCH] Add support for tables in Calc src block :var

2024-03-18 Thread Fraga, Eric
On Monday, 18 Mar 2024 at 20:59, Visuwesh wrote:
> You give me far too credit: I merely placed an edebug trigger for
> calc-push-list and used a simple-minded ' [1,2,3;4,5,6] RET to figure
> out the vector format (then later I found the commentary).

Cute!

> If I get the time, I will try to look into your request.  Unfortunately,
> I cannot promise anything since I am near the end of my semester making
> me annoyingly busy.

That's perfectly fine!  I'm in no rush; it's just an itch that needs
scratching. :-)

Thank you,
eric

-- 
Eric S Fraga, https://profiles.ucl.ac.uk/5958-eric-fraga


Re: [PATCH] Add support for tables in Calc src block :var

2024-03-18 Thread Fraga, Eric
Thank you for this.  Potentially very useful.

As you have managed to understand calc internals (to a much greater
degrees than I have ever managed), do you know if there is any way to go
the other way?  Specifically, I would love to make reference to calc
variables, especially those defined using embedded calc, in org tables.

Thanks again,
eric

-- 
Eric S Fraga, https://profiles.ucl.ac.uk/5958-eric-fraga


Re: Table column formula with remote reference

2024-03-18 Thread Fraga, Eric
On Sunday, 17 Mar 2024 at 10:29, Wu Ming wrote:
> Haven’t tried Org export options yet. What is your organization system
> with tables?

I don't have a system!  Often, tables in my documents are the output of
some other code and the tables are the results that need further
processing (or visualising).  Most of my tables are standalone.  As I
think I mentioned earlier, I have seldom (but not never) made use of
remote references.

I do however often have multiple tables as inputs to the post-processing
or visualisation codes.

-- 
: Eric S Fraga, with org release_9.6.19-1215-g67d937 in Emacs 30.0.50

Re: Table column formula with remote reference

2024-03-14 Thread Fraga, Eric
On Thursday, 14 Mar 2024 at 09:16, Wu Ming wrote:
> Unrelated, but appeared on the same trial, noticed a cell was
> mis-calculated. [...] This made me worry about reliability of simple
> biz calculations I am trying on Org spreadsheet for the first
> time. Please advise.

I've not seen any problems with spreadsheet/table calculations in org and use 
it extensively.  I don't use remote access generally however.

In any case, one very nice feature of org tables is you can see exactly how and 
what it calculates when you ask it to.  Turn on debugging by "C-c {" 
(org-table-toggle-formula-debugger) and you can see all the information you 
should need to identify what, if anything, is going wrong.

Turn off debugging with the same key sequence.

-- 
: Eric S Fraga, with org release_9.6.19-1215-g67d937 in Emacs 30.0.50


Re: Emacs slow-down

2024-03-08 Thread Fraga, Eric
On Friday,  8 Mar 2024 at 07:54, Pedro Andres Aranda Gutierrez wrote:
> In this case, one of the root causes for my insufferable
> slowdown was not org-mode but jinx (the spell checker). 

I turned jinx off as well.  The other culprit, for me, was wc-mode.  I
now count words explicitly when needed and use flyspell-buffer also
manually.

But I still see some lagging every now and again and keep
investigating...

-- 
: Eric S Fraga, with org release_9.6.19-1215-g67d937 in Emacs 30.0.50


Re: The orgframe construct in the Beamer exporter as a default needs a rethink

2024-03-01 Thread Fraga, Eric
On Friday,  1 Mar 2024 at 12:33, Pedro Andres Aranda Gutierrez wrote:
> I needed to go back to stock org-mode (as included in Emacs) because
> the ‘orgframe’ as defined right now kills my slide decks.
> I have been using the construct
>
> ** Title
>:PROPERTIES:
>:BEAMER_act: 
>:END:

I do similar and hadn't realised that there had been any breaking
changes as, I guess, I haven't had to create a new slides since the
orgframe change came through.  This is a rather serious breaking change
and would affect hundreds of slides for me (two modules I teach not to
mention research talks).

> I don’t know how often the orgframe is needed (I haven’t needed it in
> the last years of making my presentations with org-mode), but wouldn’t
> it be more sensible to write
>
> ** Title
>:PROPERTIES:
>:BEAMER_env: orgframe
>:END:

This sounds reasonable (to me).  I didn't follow the orgframe discussion
closely so cannot say whether this would achieve what motivated the
changes.

-- 
: Eric S Fraga, with org release_9.6.19-1215-g67d937 in Emacs 30.0.50

Re: [DISCUSSION] What should we do with undocumented x^(superscript inside /round/ braces) syntax?

2024-02-19 Thread Fraga, Eric
On Saturday, 17 Feb 2024 at 14:06, Ihor Radchenko wrote:
> Inconsistent with LaTeX syntax, Org mode not only allows
> x^{superscript}, but also x^(superscript) with round braces used for
> grouping.

Inconsistent with LaTeX is not a sufficient reason for removing this, in
my opinion.  Org has /dwim/ elements which make it easier to write some
expressions than in LaTeX.  Another example is ~x^-1~ which works as I
want but would make no sense in LaTeX (where only the "-" would be
superscripted, not the 1).

-- 
: Eric S Fraga, with org release_9.6.18-1158-g8e2ed4 in Emacs 30.0.50


Re: detangling with babel :var header entries

2024-02-19 Thread Fraga, Eric
On Saturday, 17 Feb 2024 at 16:18, Ihor Radchenko wrote:
> I also have no idea. I'm afraid that detangling can only be used in
> simple cases as it is implemented now.

I had the feeling this would be the case.  No worries.  Thank you.

-- 
: Eric S Fraga, with org release_9.6.18-1158-g8e2ed4 in Emacs 30.0.50


detangling with babel :var header entries

2024-02-16 Thread Fraga, Eric
Hello all,

I'm looking for some advice.  I do most (if not all) of my coding within
org, using src blocks which are tangled to create the actual code to
run.  Although I usually edit the code from within the org file, using
org-edit-special, I sometimes, when debugging, edit the tangled code
file directly.  If I do this, it's very convenient to detangle that
source file to get the original src blocks updated.  Very nice indeed.

However, if I have, as an example, a code block like this which has a
:var variable to be incorporated into the tangled code:

--8<---cut here---start->8---
#+name: init
#+begin_src julia :var version=(org-sbe tomlversion)
  lastchange = "[2024-02-16 12:54+]"
  function __init__()
  println("# My Package v$version, last change $lastchange")
  end
#+end_src
--8<---cut here---end--->8---

this gets tangled to something like this:

--8<---cut here---start->8---
# [[file:../code.org::init][init]]
version = "0.2024.211"
lastchange = "[2024-02-16 12:54+]"
function __init__()
println("# My Package v$version, last change $lastchange")
end
# init ends here
--8<---cut here---end--->8---

When I detangle, the original src block now has that version line in the
src block.  So next time I tangle, I get another version line added, ad
infinitum if I keep on tangling and detangling.

Can anybody suggest a workaround that allows me to incorporate a :var
data field in a src block but still allow to tangling/detangling to work
as it should?  I cannot think of any way and can obviously live with it
(I just have to remember to delete the spurious version lines
periodically...).

If there is no way, a feature request might be to have some way to
indicate blocks that should not be detangled?  Alternatively, a hash of
some sort on the tangled file blocks that allow detangling to easily
identify those blocks that have changed and need updating in the
original src block?  The latter might (? maybe not) make detangling a
lot faster as well... but both options are beyond my elisp-foo so cannot
implement these myself unfortunately.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.13-1003-g872c1b in Emacs 30.0.50


Re: error during appt/agenda initialization

2024-02-09 Thread Fraga, Eric
Hi Ihor,

On Friday,  9 Feb 2024 at 20:35, Ihor Radchenko wrote:
> Try the latest main.

Thank you but, unfortunately, initialization is still failing, although
the backtrace is subtly different:

--8<---cut here---start->8---
Debugger entered--Lisp error: (quit)
  #f(compiled-function (node) "Get `:end' property of NODE." #)((table-row (:standard-properties [4219 4219 4220 4300 4301 
0 nil table-row element t nil nil nil nil # nil nil (table 
(:standard-properties [3780 3807 3807 5380 5381 1 nil nil element t nil nil nil 
nil # nil nil (section ...)] :type org :tblfm nil :value nil 
:attr_latex (":align |rll|")))] :type standard)))
  org-element--parse-to(4291)
  org-element-at-point(4291)
  org-element-cache-map(#f(compiled-function (el) #) :next-re "\\]+[0-9]\\{1,2\\}:[0-9]\\{2\\}[0-9+:..." :fail-re "\\]+[0-9]\\{1,2\\}:[0-9]\\{2\\}[0-9+:..." :narrow t)
  org-agenda-get-deadlines(t)
  org-agenda-get-day-entries("/home/ucecesf/s/notes/diary.org" (2 9 2024) 
:deadline* :scheduled* :timestamp)
  apply(org-agenda-get-day-entries "/home/ucecesf/s/notes/diary.org" (2 9 2024) 
(:deadline* :scheduled* :timestamp))
  org-agenda-to-appt()
--8<---cut here---end--->8---

Thanks again,
eric

-- 
: Eric S Fraga, with org release_9.6.13-1003-g872c1b in Emacs 30.0.50


error during appt/agenda initialization

2024-02-09 Thread Fraga, Eric
Hello all,

I upgraded (on a different system) org-mode from git and I now find that
my emacs start-up hangs.  If I C-g out of it, I get the following
backtrace:

--8<---cut here---start->8---
Debugger entered--Lisp error: (quit)
  #f(compiled-function (node) "Get `:begin' property of NODE." #)((keyword (:standard-properties [272 272 nil nil 342 0 nil 
nil element t nil nil nil nil # nil nil (section 
(:standard-properties [104 104 104 2935 2935 0 nil section element t nil 104 
2935 nil # nil nil (headline ...)]))] :key "OPTIONS" :value 
"H:2 num:t toc:nil \\n:nil @:t ::t |:t ^:t -:t f:t *...")))
  org-element--cache-find(76 nil)
  org-element--parse-to(76)
  org-element-cache-map(#f(compiled-function (el) #) :next-re "\\]+[0-9]\\{1,2\\}:[0-9]\\{2\\}[0-9+:..." :fail-re "\\]+[0-9]\\{1,2\\}:[0-9]\\{2\\}[0-9+:..." :narrow t)
  org-agenda-get-deadlines(t)
  org-agenda-get-day-entries("/home/ucecesf/s/notes/diary.org" (2 9 2024) 
:deadline* :scheduled* :timestamp)
  apply(org-agenda-get-day-entries "/home/ucecesf/s/notes/diary.org" (2 9 2024) 
(:deadline* :scheduled* :timestamp))
  org-agenda-to-appt()
  load-with-code-conversion("/home/ucecesf/s/emacs/esf-org.el" 
"/home/ucecesf/s/emacs/esf-org.el" nil nil)
  load("esf-org")
--8<---cut here---end--->8---

If I comment out the (org-agenda-to-appt) line in my configuration,
Emacs starts up just fine.

Any suggestions?  Other systems, with the same configuration (but older
versions of org mode), start up just fine, as I have just verified by
starting emacs on the desktop I'm using to compose this email.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.13-1003-g872c1b in Emacs 30.0.50


Re: [BUG] No result exporting combined org-agenda files to icalendar [9.6.15 (release_9.6.15 @ z:/emacs-i686/share/emacs/29.2/lisp/org/)]. It was: org-icalendar export problems

2024-02-03 Thread Fraga, Eric
On Saturday,  3 Feb 2024 at 13:13, Ypo wrote:
> I think I will keep waiting till somebody shares an easy and robust
> way to get an .ics calendar from org files.

Not sure what you are expecting but I can show you my (elided) shell
script that generates a single ics file from multiple org files:

--8<---cut here---start->8---
DIARY=${HOME}/s/notes/diary
OUTLOOK=${HOME}/s/notes/outlook
emacs -Q --batch --debug-init \
--load=esf-org.el \
--visit=${DIARY}.org --eval='(org-icalendar-export-to-ics)' \
--visit=${OUTLOOK}.org --eval='(org-icalendar-export-to-ics)'
cat ${DIARY}.ics \
${OUTLOOK}.ics \
> /tmp/combined.ics
--8<---cut here---end--->8---

where esf-org.el has some org customizations and the resulting combined
ics file is in /tmp/combined.ics.

HTH,
eric

-- 
Eric S Fraga, https://profiles.ucl.ac.uk/5958-eric-fraga


Re: org-->latex and beamer, avoid blocks

2024-01-21 Thread Fraga, Eric
On Friday, 19 Jan 2024 at 08:01, Uwe Brauer via "General discussions about 
Org-mode." wrote:
> Well, right. I just realized that for example 
> when I export the document to LatReX article, then cosntructs like
>
>
> *** Code
>  :PROPERTIES:
>  :BEAMER_env: ignoreheading
>  :END:
>
> Get converted in the sense that the properties are not simply ignored
> but transformed to text, which is not what I want.

Strange.  Properties do not get exported for me.  The tags do get
exported if you haven't set the tags:nil option, however.  The heading
itself does get exported which, of course, may not be what you want.

-- 
: Eric S Fraga, with org release_9.6.13-1003-g872c1b in Emacs 30.0.50


Re: org-->latex and beamer, avoid blocks

2024-01-18 Thread Fraga, Eric
On Thursday, 18 Jan 2024 at 16:40, Uwe Brauer via "General discussions about 
Org-mode." wrote:
> Any suggestion how to tell the converter not convert
>
> *** First step
>
> To a block?

Add the :B_ignoreheading: tag and the following property to the headline:

:PROPERTIES:
:BEAMER_env: ignoreheading
:END:

which you can do easily if you have

#+startup: beamer

in your org file which allows you to then use "C-c C-b i" to add that
information.

Although the idea of a single document that exports to both beamer and
LaTeX is attractive, I've always found it to be more effort than it's
worth.  Just my 2¢.

-- 
: Eric S Fraga, with org release_9.6.13-1003-g872c1b in Emacs 30.0.50

Re: Developing Moodle resources/sites with Org Mode

2024-01-17 Thread Fraga, Eric
This sounds very good!  I am particularly impressed with being able to
use maxima to create questions that have a random element.  I wish I'd
had what you have done back at the start of the pandemic when I had to
create quizzes for my moduless.

In answer to your actual question: no, I do not believe you are off the
mark.  I no longer have a need for what you are doing but I'm sure
others would benefit greatly if they have to interact with moodle and
its xml formats etc.
-- 
: Eric S Fraga, with org release_9.6.13-1003-g872c1b in Emacs 30.0.50


Re: Basic citations: should default citation style have a name and style code?

2024-01-10 Thread Fraga, Eric
Hi Bill,

On Thursday, 11 Jan 2024 at 05:25, William Denton wrote:
> The basic citation processor is a proof of concept and shouldn't be
> used for real work, so this is probably never going to result in a
> real problem.  

Proof of concept or not, the fact that it exists means people (e.g. me)
are going to use it so it would be good to have it be somewhat complete.

> Sadly my Lisp isn't good enough for me to offer a working solution,
> but if the default citation style had, for example, the name "default"
> and one-letter code "d" then I think the problem would go away.

I think this is a nice suggestion.  My Lisp is also not up to it so I
hope somebody does do this.

> With thanks to everyone who did all the great citation work
> originally,

+1 -- it's been a very useful extension to org.

And also, while I'm here, thank you Bill for your blog posts on the
citation capabilities of org.  Well written, very clear, and very
helpful.  Looking forward to part 3!

eric
-- 
: Eric S Fraga, with org release_9.6.6-418-g294a4d in Emacs 30.0.50


Re: strange error exporting to ascii

2023-12-27 Thread Fraga, Eric
On Sunday, 24 Dec 2023 at 11:20, Ihor Radchenko wrote:
> Should work now. I reverted the problematic commit.

Confirmed.  Thank you!

-- 
: Eric S Fraga, with org release_9.6.13-1003-g872c1b in Emacs 30.0.50


Re: strange error exporting to ascii

2023-12-23 Thread Fraga, Eric
On Saturday, 23 Dec 2023 at 09:52, Ihor Radchenko wrote:
> ... me adding one innocent require to ox.el

Complex systems... :-)

Fantastic video, by the way.

-- 
: Eric S Fraga, with org release_9.6.13-1003-g872c1b in Emacs 30.0.50


Re: strange error exporting to ascii

2023-12-22 Thread Fraga, Eric
On Friday, 22 Dec 2023 at 16:36, Ihor Radchenko wrote:
>
> This is most likely a bug with internal dependencies.
> I need some time to figure out how to approach it.

Okay, thank you.

For the record, I've re-built Emacs from git and the problem persists so
it's not (necessarily) Emacs itself.

And no rush, by the way: I have a working solution which is what
matters!

Thanks again,
eric

-- 
: Eric S Fraga, with org release_9.6.13-1003-g872c1b in Emacs 30.0.50


Re: strange error exporting to ascii

2023-12-22 Thread Fraga, Eric
Another data point: if I do a

make cleanall

and then start emacs without org compiled, exporting (to both targets)
works, although there are complaints initially about the autoload file
not being present etc.

Slow, mind you. ;-) But I can live with this in the short term so I can
get my work done!

So there seems to be some compilation bug maybe?  I will build Emacs
from git as the version I'm using was built in September (I don't update
during term time as I depend on Emacs and org for my teaching).  I'll
report back after doing so.

Thank you for helping me out.

-- 
: Eric S Fraga, with org release_9.6.7-13-g99cc96 in Emacs 30.0.50


Re: strange error exporting to ascii

2023-12-22 Thread Fraga, Eric
On Friday, 22 Dec 2023 at 15:58, Ihor Radchenko wrote:
> This is a problem with Org mode compilation. Try to reinstall.

Problem persists.  I've done

make update

restart emacs: fails to export.  Then

make cleanall
make

and restart emacs but also fails to export, both times with same error
message:

 Debugger entered--Lisp error: (invalid-function org-element-with-buffer-copy)
  org-element-with-buffer-copy([...])
  org-cite-parse-elements("Alba, E.; Tomassini, M. 
[[https://doi.org/10.1109/...;)
  org-cite-csl-render-bibliography([...])
  org-cite-export-bibliography([...])


Extra data point: using older version of org (on a different computer),
having removed ox-bibtex requirement, is able to export to both ascii
and odt.

-- 
: Eric S Fraga, with org release_9.6.13-1003-g872c1b in Emacs 30.0.50


Re: strange error exporting to ascii

2023-12-22 Thread Fraga, Eric
On Friday, 22 Dec 2023 at 15:14, Ihor Radchenko wrote:

[...]

> This is also something from ox-bibtex.el. I suspect that you do not need
> ox-bibtex.el. It is an old library predating Org's native citation support.
>
> Also, merely loading ox-bibtex.el changes Org export behaviour. Be careful.

Ah!  Interesting.  I had forgotten about requiring ox-bibtex in my
configuration files.  I've now removed it but now get a new error
(elided):

Debugger entered--Lisp error: (invalid-function org-element-with-buffer-copy)
  org-element-with-buffer-copy(:to-buffer # :drop-contents 
t :drop-visibility t :drop-narrowing t :drop-locals t nil nil [...])
  org-cite-parse-elements("Alba, E.; Tomassini, M. 
[[https://doi.org/10.1109/...;)
  org-cite-csl-render-bibliography([...])

for both exports to ascii and odt, although slightly different text in
the org-cite-parse-elements function.

Export to LaTeX continues to work.

-- 
: Eric S Fraga, with org release_9.6.8-771-gdf0539 in Emacs 30.0.50


Re: strange error exporting to ascii

2023-12-22 Thread Fraga, Eric
Hi Ihor,

thank you for the response.

On Friday, 22 Dec 2023 at 13:53, Ihor Radchenko wrote:
> Looks like your #+bibliography does not follow
>
> #+BIBLIOGRAPHY: /home/user/Literature/foo.bib plain option:-d
>
> format.

It does not but the documentation does not say anything about a format
at all like this.  What are the two items following the bib file?

I do have
#+cite_export: csl "/somepath/style.csl"
as well as a BIBLIOGRAPHY entry with just a file name.

In any case, I modified the bibliography line and it then complained
about no bibtex2html (which didn't seem to be needed before?).  I
installed that package and now the export complains about that command
failing.  I seem to be going down a rabbit hole.

Thanks again,
eric

-- 
: Eric S Fraga, with org release_9.6.8-771-gdf0539 in Emacs 30.0.50


strange error exporting to ascii

2023-12-21 Thread Fraga, Eric
Hello,

I am working on a paper which includes citations.  Exporting to LaTeX
and to ODT worked just fine.  For my sins, I now have to incorporate
changes made to the ODT version back into the org and I thought the best
way was to compare text versions (I did try using pandoc on the ODT
version to get an org version but too many differences).

So, long story short, I try to export the original document to ascii and
I get an error related to citations.  Having seen some updates to
exporting citations on the list over the past few weeks, I figured I
should upgrade org to the latest version.  Now exporting to LaTeX still
works just fine but exporting to ascii still does not work (with the
same error: see backtrace-ascii.txt attached) *and* exporting to ODT now
no longer works (see backtrace-odt.txt).

Any suggestions?  I have not tried emacs -Q because that is non-trivial
due to my configuration but will do so if nothing obvious jumps out to
anybody.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.8-771-gdf0539 in Emacs 30.0.50
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  file-name-extension(nil)
  (equal (file-name-extension file) "bib")
  (if (equal (file-name-extension file) "bib") (file-name-sans-extension file) 
file)
  (setq file (if (equal (file-name-extension file) "bib") 
(file-name-sans-extension file) file))
  (let ((arguments (org-bibtex-get-arguments keyword)) (file 
(org-bibtex-get-file keyword)) temp-file out-file) (setq file (if (equal 
(file-name-extension file) "bib") (file-name-sans-extension file) file)) (setq 
out-file (file-name-sans-extension (file-name-nondirectory file))) (if 
(plist-get arguments :limit) (progn (let ((citations (org-element-map tree '... 
#'...))) (let ((temp-file (setq temp-file ...)) (temp-buffer 
(generate-new-buffer " *temp file*" t))) (unwind-protect (prog1 
(save-current-buffer ... ...) (save-current-buffer ... ...)) (and (buffer-name 
temp-buffer) (kill-buffer temp-buffer (setq arguments (plist-put arguments 
:options (append (plist-get arguments :options) (list "-citefile" 
temp-file))) (if (eq 0 (apply 'call-process (append '("bibtex2html" nil nil 
nil) '("-a" "-nodoc" "-noheader" "-nofooter") (let ((style ...)) (and style 
(list "--style" style))) (plist-get arguments :options) (list (concat file 
".bib") nil (error "Executing bibtex2html failed")) (and temp-file 
(delete-file temp-file)) (let ((temp-buffer (generate-new-buffer " *temp*" t))) 
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn 
(insert-file-contents (concat out-file ".html")) (goto-char (point-min)) (while 
(re-search-forward "a name=\"\\([-_a-zA-Z0-9:]+\\)\">\\([^<]+\\)" nil t) (setq 
org-bibtex-html-entries-alist (cons ... org-bibtex-html-entries-alist (and 
(buffer-name temp-buffer) (kill-buffer temp-buffer) (let ((temp-buffer 
(generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer 
temp-buffer) (unwind-protect (progn (cond ((org-export-derived-backend-p 
backend ...) (insert ...) (insert-file-contents ...) (goto-char ...) (insert 
"\n")) ((org-export-derived-backend-p backend ...) (if ... nil ...) 
(insert ...) (insert-file-contents ...) (goto-char ...) (while ... ...) 
(goto-char ...) (while ... ...) (goto-char ...) (while ... ...))) (setq 
org-bibtex-html-keywords-alist (cons (cons keyword ...) 
org-bibtex-html-keywords-alist))) (and (buffer-name temp-buffer) (kill-buffer 
temp-buffer))
  (progn (let ((arguments (org-bibtex-get-arguments keyword)) (file 
(org-bibtex-get-file keyword)) temp-file out-file) (setq file (if (equal 
(file-name-extension file) "bib") (file-name-sans-extension file) file)) (setq 
out-file (file-name-sans-extension (file-name-nondirectory file))) (if 
(plist-get arguments :limit) (progn (let ((citations (org-element-map tree ... 
...))) (let ((temp-file ...) (temp-buffer ...)) (unwind-protect (prog1 ... ...) 
(and ... ...))) (setq arguments (plist-put arguments :options (append ... 
...)) (if (eq 0 (apply 'call-process (append '("bibtex2html" nil nil nil) 
'("-a" "-nodoc" "-noheader" "-nofooter") (let (...) (and style ...)) (plist-get 
arguments :options) (list (concat file ".bib") nil (error "Executing 
bibtex2html failed")) (and temp-file (delete-file temp-file)) (let 
((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer 
(set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents (concat 
out-file ".html")) (goto-char (point-min)) (while (re-search-forward "a 
name=\"\\([-_a-zA-Z0-9:]+\\)\">\\([^<]+\\)" nil t) (setq 
org-bibtex-html-entries-alist ...))) (and (buffer-name temp-buffer) 
(kill-buffer temp-buffer) (let ((temp-buffer (generate-new-buffer " *temp*" 
t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (cond 
(... ... ... ... ...) (... ... ... ... ... ... ... ... ... ...)) (setq 
org-bibtex-html-keywords-alist (cons ... org-bibtex-html-keywords-alist))) (and 
(buffer-name temp-buffer) (kill-buffer 

Re: Strange behaviour detected today

2023-12-13 Thread Fraga, Eric
On Wednesday, 13 Dec 2023 at 13:07, Ihor Radchenko wrote:
> The documentation explicitly states that :line-width 1 is the same as
> :line-width (1 . 1). I see no reason to change anything on Org side.

I was not suggesting a change in Org for the moment, just suggesting the
OP tried to see if that helped (and would identify a bug in master).

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: Strange behaviour detected today

2023-12-13 Thread Fraga, Eric
On Wednesday, 13 Dec 2023 at 11:15, Ihor Radchenko wrote:
> (defface org-beamer-tag '((t (:box (:line-width 1 :color "grey40"
>   "The special face for beamer tags."
>   :group 'org-export-beamer)
>
> in the code.
>
> This :box spec is correct, according to the manual.
> So, something is broken on Emacs master :shrug:.

Just a potential suggestion for the OP: maybe change the line-width
attribute to e.g. "(1 . 1)" instead of 1 as all of the faces I have
customised (using customize-face) that have :box attributes use a
similar construct for the line width argument.  Just to see if maybe the
documentation does not reflect reality in the code?

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: What is the status of ob-maxima.el? Is this a bug?

2023-12-06 Thread Fraga, Eric
Hi Leo,

On Tuesday,  5 Dec 2023 at 20:18, Leo Butler wrote:
> I think it should be easy to provide this for a few data types (matrix,
> string, maybe list), but I think the conversion from a Lisp sexp to an
> ELisp sexp will need a lot of assumptions. E.g. how to convert the
> Maxima list:
>
> [[a,b],[c,d,[e,f]]]
>
> Or maybe such cases are not important?

Good question.  I am not sure what the best approach would be.  My own
use case often does involve results which are vectors of vectors of
values or expressions (solutions to system of equations).  I typically
simply output directly using either print or grind, as in

#+begin_src maxima :results output 
  for i: 1 thru length(solution[1])
  do grind(solution[1][i])$
#+end_src

where "solution" is the result of the computation in my (elided) example
and I only care about the first solution.  I haven't really thought
about how the final "value" should be output.  I'm happy to explore
alternatives.

> Also, what would we do with an arbitrary mathematical expression? Return
> a printed representation?

This might actually be the easiest, of course.

> Developing a working session for maxima would make it more feasible to
> use it directly in text, as you are using Calc.

It would indeed be more feasible but not necessarily a benefit (to me),
as such.

I use Calc for pedagogical aspects, showing step by step calculations,
and it has some benefits over Maxima for this, especially for
engineering topics because it "understands" units (e.g. kg, J, m^2).
Further, I have total control of the formatting by having defined my own
embedded Calc format, lines that start with #+calc: which I can
interpret during the export process in org.

I use maxima to solve more detailed problems so that students can see
the outcome of the algebra to compare with their own work.

And there's the psychological/philosophical benefit of doing everything
I can in Emacs itself! :-)

But, having said that, consistency in the tools used is beneficial so
doing step by step calculations with maxima instead of Calc could be a
good thing for the students.  It would be nice to have that option.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: What is the status of ob-maxima.el? Is this a bug?

2023-12-05 Thread Fraga, Eric
On Tuesday,  5 Dec 2023 at 16:59, Leo Butler wrote:
> You mentioned returning a value from a maxima code block. 

By this, I mean the value of the last sexp as some other src blocks do
(elisp? octave? Not sure which...).  It's what I would expect to see if
I were to specify ":results value".

And your improvements definitely look good!  Thanks.  I use maxima a lot
for teaching so will need to reconsider the material on some of my
slides (next year... :-)).

I also use embedded Calc as it's easier to incorporate directly in text,
especially in org, but Calc is not quite as capable as maxima as a
computer algebra system.

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: What is the status of ob-maxima.el? Is this a bug?

2023-12-05 Thread Fraga, Eric
On Tuesday,  5 Dec 2023 at 16:42, Leo Butler wrote:
> With recent versions of ob-maxima.el, you can set header arguments to
> get the behaviour Eduardo expected:

Thank you.  This is great news.

I'm going to have to upgrade as the version I'm currently using (from
1-2 months ago, I think) doesn't seem to pay attention to :cmdline
--quiet and/or :results raw.

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: What is the status of ob-maxima.el? Is this a bug?

2023-12-05 Thread Fraga, Eric
On Tuesday,  5 Dec 2023 at 08:34, Eduardo Ochs wrote:
> Ouch! I'm so used to using Maxima from its REPL that I forgot to test
> that... thanks and sorry! =/

No apology required.  It would be good if ob-maxima had implemented the
concept of returning the last value, as some other language
implementations do, but my elisp-fu (and maxima-fu) was not up to the
challenge when I wrote the initial version of ob-maximal.el (much
improved later by Eric Shulte).

And having it output everything that maxima actually outputs in the REPL
I considered to be too overwhelming.  Hence the "--very-quiet" option
passed to maxima on execution.

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: ODT export failing

2023-12-05 Thread Fraga, Eric
On Tuesday,  5 Dec 2023 at 12:54, Ihor Radchenko wrote:
> Still fine on my side...

Okay, thank you.  Strange but one of those mysteries, I guess.  If I run
into this again, I'll explore more fully.

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: ODT export failing

2023-12-05 Thread Fraga, Eric
On Tuesday,  5 Dec 2023 at 12:11, Ihor Radchenko wrote:

Ummm, okay.  Maybe with a .pdf extension?

(I was under deadline pressure so once I got it working, I didn't explore any 
further!)


-- 
Eric S Fraga, https://profiles.ucl.ac.uk/5958-eric-fraga

PhD studentship in optimization and molecular dynamics:
https://ucl-epsrc-dtp.github.io/2024-25-project-catalogue/projects/2228cd1281.html
Apply through
https://www.ucl.ac.uk/epsrc-doctoral-training/prospective-students/apply-ucl-epsrc-dtp-studentship


Re: What is the status of ob-maxima.el? Is this a bug?

2023-12-05 Thread Fraga, Eric
I think ob-maxima will only output the actual explicit "output" of the
script, so something like

#+begin_src maxima
print(2+3);
#+end_src

should work.

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: Getting email from MS outlook into emacs

2023-11-30 Thread Fraga, Eric
On Wednesday, 29 Nov 2023 at 14:08, Presnell,Brett Douglas wrote:
> I had to deal with this last spring.  I finally got things working again
> with mbsync, msmtp, mu/mu4e, and for the oauth stuff, pizauth.  This
> combination has worked well for me ever since.  Most of the details can
> be found at

Thank you for this.  Very useful.  I have davmail working for me for
authentication so I'm going to stick to what's working.  However, it's
nice to know that there is another route possible should davmail stop
working.  But sad that we have to through these contortions just to
access our email.

-- 
: Eric S Fraga, with org release_9.6.6-418-g294a4d in Emacs 30.0.50


Re: Getting email from MS outlook into emacs

2023-11-28 Thread Fraga, Eric
Hi Martin,

On Tuesday, 28 Nov 2023 at 09:40, Martin Steffen wrote:
> that leaves people like me out in the rain, someone who just wants a
> reliable, stable plain old email server which is widely compatible
> (even if only backward compatible) and the leaves the choice of
> mailreader(s)q to the user.  [...]  My current goal is not to get
> access to the server enabled properly again, but to get the emails
> (automatically) off the server, like 20+ years ago, when internet and
> access to servers was unrealiable over "modem" dial-ups. So back to
> the future, so to say.

I share your pain. :-( Hard to believe that the 80s or 90s were the
pinnacle of computing when it comes to email (not to mention newsgroups
although there is promise in ActivityPub related approaches).

Luckily, for me, davmail (currently) works.  And I use POP to make sure
I have copies of all of my emails.  Links from org to my emails will
always continue to work and I do not depend on the server once
downloaded.

eric

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: Getting email from MS outlook into emacs

2023-11-28 Thread Fraga, Eric
On Tuesday, 28 Nov 2023 at 08:34, Ihor Radchenko wrote:
> ... except when institution also prohibits anything but MS Outlook to
> access the MS Exchange protocol. 

Indeed but my experience has often been that such restrictive practices
are the result of blind clicking on the part of the IT department and
can be rescinded through discussion with them.  Over the years I have
been in my current institution, I have had these kinds of discussions
several times (using Linux, not Windows; using other MUAs, not Outlook;
etc.) and have managed to get the access I needed almost always.

But some places are probably a lost cause in this regard unfortunately.
Tail wagging the dog comes to mind...

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: Getting email from MS outlook into emacs

2023-11-28 Thread Fraga, Eric
Hi Marvin,

On Tuesday, 28 Nov 2023 at 03:09, Doyley, Marvin M. wrote:
> I have been trying to configure mbsync to download email from MS
> Outlook.  Unfortunately, the new oauth2 authentication makes things
> difficult, especially since my institution has disabled the Azure App
> permission.
>
> Does anybody have a workaround?  I just want the email message to be
> linked to my todos, which is almost impossible.  

My institution is the same.

I solved this problem by using davmail [1] as an intermediary.  This
works well interacting with MS Exchange servers with multi-factor
authentication.  I then use gnus to read my emails.

HTH,
eric

Footnotes:
[1]  https://davmail.sourceforge.net/

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: ODT export failing

2023-11-27 Thread Fraga, Eric
Hi Ihor,

On Monday, 27 Nov 2023 at 19:49, Ihor Radchenko wrote:
> AFAIU, that message is for fuzzy and id links that do not point to
> heading or target - such links are not supported.

I've had this before when the target (i.e. the label within the org
file) did not exist.  I have never seen this with a missing file, as in
pointing to ~theimage~ where

#+name: theimage
[[file:thisimagedoesnotexist]]

To solve the problem, I just had to create the file
"thisimagedoesnotexist".  I guess it is sort of the same issue as
missing link target so maybe it makes sense even though it is not an id
link or fuzzy?

> "FIXME" indicates that such feature would be welcome, but alas - not
> yet.

Understood!

thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: ODT export failing

2023-11-27 Thread Fraga, Eric
Ignore please.  I was trying to export an image which was in PDF; I
thought I had changed to reference to a PNG but missed one.  Mind you,
the error message could be a little more informative?

Sorry for the noise.

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


ODT export failing

2023-11-27 Thread Fraga, Eric
Hello all,

can anybody suggest what may be causing an error of the form:

org-odt-export-to-odt: OpenDocument export failed: FIXME: Unable to resolve 
[...]

The very long error message gives no actual detail as to what actually
failed to resolve.

I will try with emacs -Q etc. but challenging due to the large number of
customizations I have.

thank you,
eric

PS - I hate having to prepare Word formatted documents. 
-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50

Re: certain files should not be folded

2023-11-25 Thread Fraga, Eric
I'll let others chime in because I definitely get the file with
everything opened.  Maybe tell us what version of org and emacs you are
using and also what happens if you start emacs with -Q to not include
your customizations?

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: certain files should not be folded

2023-11-24 Thread Fraga, Eric
On Friday, 24 Nov 2023 at 18:47, Uwe Brauer wrote:
> Since I am not sure what are precisely these VISIBILITY properties, 

By VISIBILITY properties, I meant literally that: any properties
labelled as VISIBILITY.  But obviously you don't have any!

> here is one example file

which works just fine for me.  What do you actually get?

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: certain files should not be folded

2023-11-24 Thread Fraga, Eric
The default is to show everything.  Do you have an VISIBILITY properties
in the file?

-- 
: Eric S Fraga, with org release_9.6.6-418-g294a4d in Emacs 30.0.50


Re: [FR] STARTUP: hidechecked

2023-11-08 Thread Fraga, Eric
Although org doesn't have the feature you are asking for, I have the
following in my configuration that you may find useful:

#+begin_src emacs-lisp
  (font-lock-add-keywords
   'org-mode
   `(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ 
\t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ 
\t]*\\)?\\[\\(?:X\\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)" 1 'org-headline-done 
prepend))
   'append)
#+end_src

-- 
: Eric S Fraga, with org release_9.6.6-418-g294a4d in Emacs 30.0.50


Re: Regression in latex export of tables?

2023-11-02 Thread Fraga, Eric
On Wednesday,  1 Nov 2023 at 19:04, Vikas Rawal wrote:
> I am sorry, but I do not understand what are you pointing at. This is
> what I get:
>
> 
> \begin{center}
> \begin{tabular}{ll}
> (a,b) & open interval\\[0pt]
> [0,1] & closed interval\\[0pt]
> \end{tabular}
> \end{center}
> \end{document}
> 

I think the point is that without the [0pt], the following line's [0,1]
gets interpreted as a length parameter for the line break, \\.

-- 
: Eric S Fraga, with org release_9.6.6-418-g294a4d in Emacs 30.0.50


Re: Preferred posting style

2023-10-30 Thread Fraga, Eric
On Monday, 30 Oct 2023 at 21:25, yaxp wrote:
> Which posting style is preferable in this list?
>
> Top or Bottom.

Bottom, definitely.
(at least, from my point of view)
Thank you.
-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: org-beamer: Insert \framebreak between blocks

2023-10-25 Thread Fraga, Eric
On Wednesday, 25 Oct 2023 at 21:32, yaxp wrote:
> However, I would prefer to have a better solution than this because this
> "breaks" the flow of the file. 

It does break the flow but only because *you* are imposing the break.  I
don't know of any other (more elegant) way to achieve what you want.
Maybe others do.

> I'd like to publish the .org file too, and I hope to make it just as
> convenient to read as the produced PDF.  

It's difficult to have the marked text (which has both semantic and
specific typographical directives) be as "clean" as the resulting PDF.
org is good at minimising noise in the file but you cannot remove it
completely.  Sometimes macros can help but probably not in this case
without being fragile.

> Also, is there any reasoning behind why the current behavior is the way
> it is? 

Yes, very simply: there is no way to indicate the end of a "block".  The
start is defined by the heading but only ends when another heading at
the same or higher level is started.  This is related to a longstanding
desire by many to have the ability to explicitly end a subheading.  The
grammar does not allow for this and there have been many discussions on
the mailing list over the years about this.  The situtation is unlikely
to change.

eric
-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: org-beamer: Insert \framebreak between blocks

2023-10-25 Thread Fraga, Eric


On Wednesday, 25 Oct 2023 at 00:24, yaxp wrote:
> Adding  a framebreak between blocks does not work.

[...]

> Exporting this to PDF and examining the resulting file reveals that the
> \framebreak is inserted before the \end{block}.

Put the \framebreak in a block with heading ignored:

--8<---cut here---start->8---
** break block:B_ignoreheading:
:PROPERTIES:
:BEAMER_env: ignoreheading
:END:

\framebreak
--8<---cut here---end--->8---

This causes the previous block to be terminated.

Side note: you don't need the #+latex: if the LaTeX command is simple
(for varying definitions of simple.. ;-)).

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: Org-beamer: Have text overflows continue onto another frame

2023-10-25 Thread Fraga, Eric
On Tuesday, 24 Oct 2023 at 20:37, yaxp wrote:
> That does everything I needed.

Excellent.

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: Org-beamer: Have text overflows continue onto another frame

2023-10-24 Thread Fraga, Eric
and there is some customization possible for continuation frames:

https://tex.stackexchange.com/questions/295854/how-to-edit-behaviour-of-frame-titles-during-frame-break-in-beamer

(and maybe more: still searching)

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: Org-beamer: Have text overflows continue onto another frame

2023-10-24 Thread Fraga, Eric
On Tuesday, 24 Oct 2023 at 17:56, yaxp wrote:
> How do I have overflowing text continue on a new frame? Ideally, in a
> way that lets me also customize the title of this new frame

You can easily do the former by adding

:BEAMER_opt: allowframebreaks

to the PROPERTIES for any frame that needs to overflow unto subsequent
frames.  By default, the new frames have I, II, III, ... appended to
their title.  I am not sure if that behaviour can be customised,
however.

-- 
: Eric S Fraga, with org release_9.6.6-418-g294a4d in Emacs 30.0.50


Re: org beamer strange behaviour

2023-10-10 Thread Fraga, Eric
I had a look at your file and it displays just fine on my system.
-- 
: Eric S Fraga, with org release_9.6.6-418-g294a4d in Emacs 30.0.50


Re: org beamer strange behaviour

2023-10-09 Thread Fraga, Eric
I haven't looked at your file but do consider running org-lint on the
file to see if it picks up anything.

-- 
: Eric S Fraga, with org release_9.6.6-418-g294a4d in Emacs 30.0.50


Re: Bug with "BEAMER_OPT: shrink" and links

2023-09-22 Thread Fraga, Eric
Hi Guillaume,

On Thursday, 21 Sep 2023 at 19:41, Guillaume MULLER wrote:
> Here is a small test.org file that uses shrink to reduce the size of the 
> slides:

[...]

> If you run 'org-beamer-export-to-pdf' on this file, you'll get a PDF
> where the clickable area for the link is most of the time way out of
> the text for the link...

Confirmed: same issue for me.

However, having looked at the LaTeX generated, I do not believe this is
a bug in org; rather, it is likely an issue with beamer so you may need
to bring this up on one of the LaTeX lists/groups.

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: error tangling: how to debug please?

2023-09-15 Thread Fraga, Eric
On Friday, 15 Sep 2023 at 21:41, Max Nikulin wrote:
> Should be caught by `org-lint'

True!  Should have run the document through org-lint.  Ooops.  

In my defence, I did do so recently but I should get in the habit of
including linting as part of my normal debug process when things go
awry...

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.6-412-g2f7b35 in Emacs 30.0.50


Re: error tangling: how to debug please?

2023-09-15 Thread Fraga, Eric
Hi Ihor,

> I recommend setting org-element--cache-self-verify to 'backtrace and
> org-element--cache-self-verify-frequency to 1.0. Then, Org will
> self-check the cache consistency and generate a backtrace when a
> problem is detected.

I have set these and will let you know how I get on.  I have cleared the
whole cache to start from scratch...

Thank you for your help on this.
-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: error tangling: how to debug please?

2023-09-14 Thread Fraga, Eric
Hi Ihor again,

> The source block in question is at point, so, in the debugger, you can
> just do "e (point) " and then jump to that point manually.

this did the trick.  However, interestingly, the error was a src block
that ended with

+end_src

(somehow the "#" got deleted).  What's interesting is that org continued
to see this as a src block.  I was having some unreproducible problems
with the element cache which may have had something to do with this.

Thanks again,
eric

PS - is there a way to clear the cache completely prior to starting
Emacs?
-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: error tangling: how to debug please?

2023-09-14 Thread Fraga, Eric
Hi Ihor,

On Thursday, 14 Sep 2023 at 12:59, Ihor Radchenko wrote:
> For the patch, it will be something like adding (when ... (debug)) and
> evaluating the defun.
>
> The source block in question is at point, so, in the debugger, you can
> just do "e (point) " and then jump to that point manually.

Excellent.  That makes sense.  Thank you.

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


Re: error tangling: how to debug please?

2023-09-14 Thread Fraga, Eric
Ihor,

On Thursday, 14 Sep 2023 at 12:40, Ihor Radchenko wrote:
> To debug, you can try to patch `org-babel-tangle-single-block', catching
> when `org-src-coderef-regexp' is called with nil argument (it must be a
> string). Then, examine which source block you are at when that happens.

Thank you.  Happy to patch but how do I actually determine the source
block in question?

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


error tangling: how to debug please?

2023-09-14 Thread Fraga, Eric
Hello all,

I have a rather large & complex file which has many src blocks, all of
which tangle to a single file, defined by a header-args property.

When I try to tangle, I get the following (not very informative
unfortunately) backtrace:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  org-src-coderef-regexp(nil)
  org-babel-tangle-single-block(1)
  org-babel-tangle-collect-blocks(nil nil)
  org-babel-tangle(nil)
  funcall-interactively(org-babel-tangle nil)
  command-execute(org-babel-tangle)

This is with both Emacs and org up to date with respect to the
repositories as of a minute or two ago.

I haven't tried emacs -Q or similar as there are too many things to set
up for this complex file.  I am just looking for any hints or
suggestions that could help me debug this.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.7-661-g34ee6f in Emacs 30.0.50


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: [POLL] Should we accept breaking changes to get rid of Org libraries that perform side effects when loading?

2023-08-27 Thread Fraga, Eric
On Saturday, 26 Aug 2023 at 12:30, Ihor Radchenko wrote:
> That will indeed work. But then the todo will not appear in agenda.

Indeed.  Luckily, for me, I don't tend to want the actions within my
long documents to be listed in my agenda. Essentially, I have global
todo items (which appear in my agenda) and document (aka project)
specific ones which I only care about when working on that document
(project).  But...

> I think that a combination of drawers/special blocks + ability to
> assign todos/tags to paragraphs/tables/drawers/etc may give people
> what they usually need when using inlinetasks.

Yes, this capability would give the flexibility people want or need.

-- 
: Eric S Fraga, with org release_9.6.6-412-g2f7b35 in Emacs 30.0.50


Re: [POLL] Should we accept breaking changes to get rid of Org libraries that perform side effects when loading?

2023-08-26 Thread Fraga, Eric
On Wednesday, 23 Aug 2023 at 09:33, Ihor Radchenko wrote:
>> "Fraga, Eric"  writes:
>>
>>> I'll chime in regarding inlinetasks: I used to use these *a lot*
>>> but I
>>> found that drawers do what I needed in almost all cases very
>>> effectively (for my use cases).
>
> My personal use case is when using Org for authoring long texts.
> I often leave inline tasks around the specific paragraph I need to
> revise in future:

For completeness, I will add that I do the same but using drawers at the
point where I want to note a task, where the drawer is ~:todo:~.  I then
have some special formatting for LaTeX export that converts such drawers
into footnotes with a note in the margin.

-- 
: Eric S Fraga, with org release_9.6.6-412-g2f7b35 in Emacs 30.0.50


Re: [POLL] Should we accept breaking changes to get rid of Org libraries that perform side effects when loading?

2023-08-14 Thread Fraga, Eric
I'll chime in regarding inlinetasks: I used to use these *a lot* but I
found that drawers do what I needed in almost all cases very
effectively (for my use cases).

I have no strong feelings therefore with respect to either of the
aspects being discussed.
-- 
: Eric S Fraga, with org release_9.6.7-635-gf9e083 in Emacs 30.0.50


Re: [ANM] org-timeblock: Schedule your day visually, using timeblocking technique inside Emacs

2023-08-10 Thread Fraga, Eric
On Thursday, 10 Aug 2023 at 21:17, Ilya Chernyshov wrote:
> You are not the first person getting this type of error on Emacs 30. 

Ah, okay, that's reassuring!

> Currently, I'm not planning to maintain the package for master branch.

Okay, that's fine.  Thank you.

-- 
: Eric S Fraga, with org release_9.6.7-603-g28b6a2 in Emacs 30.0.50


Re: [ANM] org-timeblock: Schedule your day visually, using timeblocking technique inside Emacs

2023-08-10 Thread Fraga, Eric
On Thursday, 10 Aug 2023 at 19:50, Ilya Chernyshov wrote:
> You got this error because in the Package-Requires header of the package
> there were packages without explicitly set versions. Maybe it's a bug, I
> don't know. As far as I know, it's acceptable to not define specific
> version of a dependency. Anyway, I've fixed that issue in the last
> commit. Please, try again.

I have tried again and now it installs.  Thank you.  I do get many
errors when trying to navigate to different dates and/or scroll up/down
in the current date being viewed.

For instance, I get the following in trying org-timeblock a second time
in the current Emacs:

Debugger entered--Lisp error: (wrong-type-argument stringp org-timeblock-order<)
  org-timeblock-redraw-buffers()
  org-timeblock()
  funcall-interactively(org-timeblock)
  command-execute(org-timeblock record)
  execute-extended-command(nil "org-timeblock" nil)
  funcall-interactively(execute-extended-command nil "org-timeblock" nil)
  command-execute(execute-extended-command)

-- 
: Eric S Fraga, with org release_9.6.7-603-g28b6a2 in Emacs 30.0.50


Re: [ANM] org-timeblock: Schedule your day visually, using timeblocking technique inside Emacs

2023-08-10 Thread Fraga, Eric
Hi,

I'm late to this and I don't have the full thread on my system so
apologies if this has been asked before.

When I try

M-x package-vc-install RET https://github.com/ichernyshovvv/org-timeblock/

according to the instructions given at the gitlab repository, I get an
error:

--8<---cut here---start->8---
Debugger entered--Lisp error: (error "Version must be a string")
  error("Version must be a string")
  version-to-list((0))
  package-vc--unpack-1(#s(package-desc :name org-timeblock :version nil 
:summary "No description available." :reqs nil :kind vc :archive nil :dir 
"/home/ucecesf/.emacs.d/elpa,v30/org-timeblock/" :extras nil :signed nil) 
"/home/ucecesf/.emacs.d/elpa,v30/org-timeblock/")
  package-vc--unpack(#s(package-desc :name org-timeblock :version nil :summary 
"No description available." :reqs nil :kind vc :archive nil :dir 
"/home/ucecesf/.emacs.d/elpa,v30/org-timeblock/" :extras nil :signed nil) 
(:vc-backend Git :url "https://github.com/ichernyshovvv/org-timeblock/;) nil)
  package-vc-install("https://github.com/ichernyshovvv/org-timeblock/; nil nil 
org-timeblock)
  funcall-interactively(package-vc-install 
"https://github.com/ichernyshovvv/org-timeblock/; nil nil org-timeblock)
  command-execute(package-vc-install record)
  execute-extended-command(nil "package-vc-install" nil)
  funcall-interactively(execute-extended-command nil "package-vc-install" nil)
  command-execute(execute-extended-command)
--8<---cut here---end--->8---

This may be an issue with Emacs itself or my configuration, as opposed
to org-timeblock, of course.

Any suggestions welcome.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.7-603-g28b6a2 in Emacs 30.0.50


Re: is LOCATION not a valid property? org-lint complains!

2023-08-02 Thread Fraga, Eric
Hi Ihor,

On Wednesday,  2 Aug 2023 at 06:34, Ihor Radchenko wrote:
> I now updated the linter to mention the backend name.
> Also, I made it ignore `org-default-properties' known by Org.

[...]

> I changed the message to include the original timestamp and used "parsed
> as"

Thank you for both of these changes.  They help a lot!

-- 
: Eric S Fraga, with org release_9.6.7-594-gf03b83 in Emacs 30.0.50


Re: is LOCATION not a valid property? org-lint complains!

2023-08-01 Thread Fraga, Eric
On Tuesday,  1 Aug 2023 at 16:22, Ihor Radchenko wrote:
> ox-koma-letter, which you likely use, understands EXPORT_LOCATION
> property, but not LOCATION.

Ah, interesting.  Yes, I do use (infrequently) ox-koma-letter.  Whereas
all my other org related tools understand LOCATION and not
EXPORT_LOCATION.  I will ignore these (false positive) lines.

>> : 60 low   Potentially malformed timestamp.  Recognized: <2021-01-29 Fri 
>> 16:00-17:00>
>
> May you give an example of a timestamp at "60"?

  <2021-01-29 16:00-17:00>

and I now immediately see the subtle (or not so subtle) difference:
there is no day of the week specified.

I misunderstood the message from org-lint: it is telling me what it
thinks the timestamp was intended to be, not what I had actually
specified!  Maybe the output from org-lint should say "Interpreted as"
instead of "recognized"?  Or even "recognized as" would be better.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.7-594-gf03b83 in Emacs 30.0.50


is LOCATION not a valid property? org-lint complains!

2023-08-01 Thread Fraga, Eric
Hello all,

I don't use org-lint very often but it is indeed an excellent tool when
an org file somehow gets corrupted in some way.  I recently had problems
adding a new entry into my "diary" file, the file that has all of my
meetings & appointments [1].

I don't know if this is something new or I simply have never used
org-lint on a file that has entries similar to those in my diary file
but, when I do, I get output like this:

: 52 low   Potentially misspelled option "LOCATION".  Consider 
"EXPORT_LOCATION".

Should I be using EXPORT_LOCATION?  If so, why?  That is, why does org
mode care what property I define?  Seems rather strange, to me, somehow.

I also get quite a few lines like this one:

: 60 low   Potentially malformed timestamp.  Recognized: <2021-01-29 Fri 
16:00-17:00>

I have no idea what is malformed about that timestamp.  Am I missing
something obvious or very subtle?

Thank you,
eric

Footnotes:
[1] which seemed to be something going wrong in the cache but I never
 really figured out what.  I ended up cleaning my diary file
 (archiving quite old entries) and the problem disappeared.

-- 
: Eric S Fraga, with org release_9.6.7-594-gf03b83 in Emacs 30.0.50


Re: BUG: org-cycle does not unfold some subtrees

2023-05-10 Thread Fraga, Eric
On Wednesday, 10 May 2023 at 08:19, Ihor Radchenko wrote:
> "Fraga, Eric"  writes:
>
>> And if it helps further, I have had this problem for some time now.  The
>> solution, for me, is to search for some text I know is present in the
>> folded section and it unfolds!  But the situation is sporadic and I
>> cannot reproduce it at will.
>
> Does it also help if you run M-: (org-fold-core--clear-isearch-overlays)?

I'll try to remember to try that next time the non-unfolding occurs.  I
should have added that I typically use evil-mode for org files, noting
that others have talked about spacemacs.

-- 
: Eric S Fraga, with org release_9.6.5-353-ge58bbd in Emacs 30.0.50


Re: BUG: org-cycle does not unfold some subtrees

2023-05-10 Thread Fraga, Eric
On Saturday,  6 May 2023 at 07:46, Thomas S. Dye wrote:
> If it helps, I get this bug using the Spacemacs Org mode layer and
> Emacs 27.

And if it helps further, I have had this problem for some time now.  The
solution, for me, is to search for some text I know is present in the
folded section and it unfolds!  But the situation is sporadic and I
cannot reproduce it at will.

-- 
: Eric S Fraga, with org release_9.6.5-353-ge58bbd in Emacs 30.0.50


Re: Suggestion to increase usefulness of TAB key / 'org-cycle' function

2023-04-28 Thread Fraga, Eric
Hi Philipp,

On Friday, 28 Apr 2023 at 10:49, Philipp Kiefer wrote:
> Well, it could simplify things a good deal further if, on issuing the
> command when point is *not* on a parent heading, (non-global)
> org-cycle would instead fold the subtree that point is in, i. e. do
> 'outline-up-heading' and 'hide-subtree' on the parent heading. 

You could always bind TAB to your own command that does this.  As an
illustration, I have TAB bound to my own function that invokes
completion instead unless I'm on an org heading!

--8<---cut here---start->8---
(defun esf/complete-or-indent ()
  (interactive)
  (cond
   ;; ((eq 'message-mode major-mode)
   ;;  (message-tab))
   ((and (eq 'message-mode major-mode)
 (message-point-in-header-p)
 (looking-back "^\\(To\\|B?[Cc]c\\): *.*" (line-beginning-position))) 
(if (looking-back " ")
(progn
  (message "try inserting alias abbrev")
  (insert (symbol-value (intern-soft (completing-read "Expand alias: " 
mail-abbrevs nil t) mail-abbrevs
  (progn
(message "try eudc")
(eudc-expand-try-all
   ((eq 'message-mode major-mode)
(completion-at-point))
   ((org-table-p)
(org-cycle))
   ((looking-back "[ \t\n]")
(if (eq 'org-mode major-mode)
(if (looking-back "^\\(\\*+ \\| *|\\)[^\\n]*") ;a heading or table 
line
(org-cycle)
  (indent-for-tab-command)
  )
  (indent-for-tab-command))
)
   (t
;;(consult-company)
(completion-at-point)
)))
--8<---cut here---end--->8---

You could use a similar (and much simpler) approach to get what you
want.

HTH,
eric

-- 
: Eric S Fraga, with org release_9.6.4-335-ge065b5 in Emacs 30.0.50


Re: problem interaction between jinx-mode and org mode

2023-04-06 Thread Fraga, Eric
Hello Ihor,

On Thursday,  6 Apr 2023 at 12:04, Ihor Radchenko wrote:
> This is one long paragraph containing ~..., which is matching a possible
> ~code~ markup. org-element-code-parser tries to search the matching the
> closing "~", running regexp search until the end of the paragraph.

Thank you for confirming my guess.  Knowing this, I can work around this
in a number of ways but it did catch me by surprise!

Thanks for getting back quickly.

eric

-- 
: Eric S Fraga, with org release_9.6.1-341-g614b96 in Emacs 30.0.50


problem interaction between jinx-mode and org mode

2023-04-06 Thread Fraga, Eric
Hello all,

I have just posted an issue on the jinx spell checking package's github
site:

https://github.com/minad/jinx/issues/35

There seems to be a strange interaction between jinx and orgmode when
the buffer has lines of the form:

--8<---cut here---start->8---
┌ Debug: Placing hot node
│   node = n29
└ @ HeatExchangerNetworkDesign 
~/s/research/julia/HeatExchangerNetworkDesign/src/HeatExchangerNetworkDesign.jl:1102
┌ Debug: Layout for node
│   node = n18
│   y = 6
└ @ HeatExchangerNetworkDesign 
--8<---cut here---end--->8---

lines which are the output of Julia's @debug macro, whose output uses
non-ASCII Unicode characters at the start of each line.  Emacs
essentially freezes for some seconds (10-20) every time I scroll (which
makes sense because jinx only spell-checks the visible part of the
buffer).

The profiler output for CPU:

--8<---cut here---start->8---
   47871  96%- jinx--check-pending
   47869  96% - jinx--check-region
   47861  96%  - jinx--flyspell-ignored-p
   47861  96%   - org-mode-flyspell-verify
   47837  96%- org--flyspell-object-check-p
   47837  96% - org-element-context
   46973  94%  - org-element--object-lex
   46022  92%   - org-element-code-parser
 340   0%- org-element--parse-generic-emphasis
 328   0% + rx-to-string
 859   1%   + org-element-italic-parser
--8<---cut here---end--->8---

and MEM:

--8<---cut here---start->8---
326,775,960  96% - timer-event-handler
326,674,976  96%  - apply
325,996,129  96%   - jinx--timer-handler
325,678,345  95%- jinx--check-pending
325,657,281  95% - jinx--check-region
325,636,601  95%  - jinx--flyspell-ignored-p
325,636,601  95%   - org-mode-flyspell-verify
325,072,246  95%- org--flyspell-object-check-p
325,072,246  95% - org-element-context
325,026,076  95%  - org-element--object-lex
215,616,248  63%   - org-element-italic-parser
211,670,968  62%- org-element--parse-generic-emphasis
211,670,968  62% - rx-to-string
186,054,064  54%  - rx--translate
186,054,064  54%   - rx--translate-form
181,758,312  53%- rx--translate-seq
155,393,544  45% - rx--translate
155,393,544  45%  - rx--translate-form
107,261,576  31%   - rx--translate-or
100,408,048  29%- mapcan
 99,194,744  29% + #
  2,524,984   0%  rx--translate
 45,311,856  13%   + rx--translate-not
  8,427,544   2% + rx--sequence
 10,559,024   3%  + rx--atomic-regexp
 83,089,056  24%   + org-element-code-parser
  4,458,332   1%   + org-element-verbatim-parser
342,616   0%+ org-log-into-drawer
--8<---cut here---end--->8---

Turning off jinx-mode in the org buffer restores normal behaviour.

I've not yet tried with emacs -Q, however, so it could be something in
my configuration... However, I do wonder whether it is the file name use
of "~" that may be causing problems with the rx?

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6.1-341-g614b96 in Emacs 30.0.50

Re: Friendly exchange of thoughts: citations and LaTeX

2023-03-27 Thread Fraga, Eric
Hi Pedro,

On Monday, 27 Mar 2023 at 11:02, Pedro Andres Aranda Gutierrez wrote:
> \jobname is the shorthand for ‘the file that you are compiling with

Ah, okay; thank you.  

> Re the use of absolute vs relative path when exporting to LaTeX, I
> might want to export to LaTeX and transfer to overleaf.com and
> relative paths would make more sense there, wouldn’t they?

Yes, this is a very valid point.  And often a source of real issues (I
have this problem sharing with my group where most use Windows... issues
with paths and upper/lower case names).

-- 
: Eric S Fraga, with org release_9.6.1-307-gcd2355 in Emacs 30.0.50

Re: Friendly exchange of thoughts: citations and LaTeX

2023-03-23 Thread Fraga, Eric
Pedro,

maybe start by showing an example of where \jobname does not work with
org while working with LaTeX directly?  I have never used this LaTeX
command and know nothing about it.

Secondly, what is the problem with bibliography file names being
expanded?

eric
-- 
: Eric S Fraga, with org release_9.6.1-224-g8ae8a8 in Emacs 30.0.50


Re: How to exclude colum titles from calculations

2023-03-09 Thread Fraga, Eric
I make extensive use of the advanced features of the spreadsheet in org
tables, specifically having a first column that indicates which rows
should be calculated or not.  Check out the org info manual

(org) Advanced features

and the token you want in the first column would be '#' for those rows
that should be calculated.

this will allow you to exclude the second row from any updates.

-- 
: Eric S Fraga, with org release_9.6.1-278-ge52c53 in Emacs 30.0.50


Re: how can I fill a column (of any size) with zeros?

2023-03-07 Thread Fraga, Eric
Maybe just column formula $2=0.0?

-- 
: Eric S Fraga, with org release_9.6.1-278-ge52c53 in Emacs 30.0.50


Re: how to add special glyphs

2023-03-07 Thread Fraga, Eric
Hi Rob,

On Monday,  6 Mar 2023 at 16:24, Rob Sargent wrote:
> I think I have to decide on one format and stick with it.  I get bitten
> by ODT/DOC transformations, not sure I like the default look of
> LaTeX/pdf, HTML is pretty reliable but not best for handing out. Maybe
> I'll go back to "text" and call it good.

For documents which I intend to export to multiple targets, PDF and HTML
specifically, I use lualatex instead of pdflatex for the PDF target.  I
insert the specific unicode characters directly in my text.  I then
include the following in my org file to ensure that the LaTeX handles
the unicode characters correctly:

#+latex_header: \usepackage{newunicodechar}
#+latex_header: \newunicodechar{α}{\ensuremath{\alpha}}
#+latex_header: \newunicodechar{δ}{\ensuremath{\delta}}
#+latex_header: \newunicodechar{Δ}{\ensuremath{\Delta}}
#+latex_header: \newunicodechar{∈}{\ensuremath{\in}}
#+latex_header: \newunicodechar{ν}{\ensuremath{\nu}}
#+latex_header: \newunicodechar{ϕ}{\ensuremath{\phi}}
#+latex_header: \newunicodechar{ï}{\"i}%"}
#+latex_header: \newunicodechar{±}{\ensuremath{\pm}}
#+latex_header: \newunicodechar{ρ}{\ensuremath{\rho}}
#+latex_header: \newunicodechar{√}{\ensuremath{\sqrt}}
#+latex_header: \newunicodechar{≻}{\ensuremath{\succ}}

This allows the characters to go straight through when exporting to HTML
but get converted to specific LaTeX when exporting to PDF.

I used this, for instance, for my recent book: https://tiny.cc/nl5yuz
This book, written in org with babel, had a lot of Julia code and one of
the nice things about Julia is you can use unicode characters for
variable and function names.  But exporting then becomes more
challenging!

For program listings, I had to also do the following:

#+latex_header: \usepackage{textgreek}
#+latex_header: \lstset{literate=
#+latex_header: {Δ}{{\textDelta}}1
#+latex_header: {δ}{{\textdelta}}1
#+latex_header: {∈}{{$\in$}}1
#+latex_header: {ï}{{\"i}}1%"}}
#+latex_header: {α}{{\textalpha}}1
#+latex_header: {β}{{\textbeta}}1
#+latex_header: {γ}{{\textgamma}}1
#+latex_header: {μ}{{\textmu}}1
#+latex_header: {π}{{\textpi}}1
#+latex_header: {ν}{{\textnu}}1
#+latex_header: {ω}{{\textomega}}1
#+latex_header: {ρ}{{\textrho}}1
#+latex_header: {ϕ}{{\textphi}}1
#+latex_header: {₁}{{$_1$}}1
#+latex_header: {₂}{{$_2$}}1
#+latex_header: {≥}{{$\ge$}}1
#+latex_header: {≤}{{$\le$}}1
#+latex_header: {≠}{{$\ne$}}1
#+latex_header: {±}{{$\pm$}}1
#+latex_header: {≻}{{$\succ$}}1
#+latex_header: }

HTH,
eric

-- 
: Eric S Fraga, with org release_9.6.1-278-ge52c53 in Emacs 30.0.50

Re: tex export overshoots right margin with mixed fonts

2023-02-24 Thread Fraga, Eric
On Friday, 24 Feb 2023 at 11:42, alain.coch...@unistra.fr wrote:
> Now, is there a way to tell Org to export _=MappingInstruction=_ as
> \ul{\texttt{MappingInstruction}}?

Well, I found I never used strike-through but definitely wanted to be
able to highlight text.  So, I redefined the +...+ markup to generate
\hl{} with the following in my custom variables:

'(org-latex-text-markup-alist
   '((bold . "\\textbf{%s}")
 (code . protectedtexttt)
 (italic . "\\emph{%s}")
 (strike-through . "\\hl{%s}")
 (underline . "\\uline{%s}")
 (verbatim . protectedtexttt)))

(and equivalent for HTML export).  You could do similar for _..._?

I also changed the face used so that +...+ was highlighted by
customising:

'(org-emphasis-alist
   '(("*" bold)
 ("/" italic)
 ("_" underline)
 ("=" org-verbatim verbatim)
 ("~" org-code verbatim)
 ("+" highlight)))
 
I did these changes years ago and have never found the lack of
strike-through an issue but do use highlighting all the time, especially
when sharing work-in-progress documents (PDF) with others.

HTH,
eric

-- 
: Eric S Fraga, with org release_9.6.1-250-ge6353d in Emacs 30.0.50


Re: tex export overshoots right margin with mixed fonts

2023-02-24 Thread Fraga, Eric
On Thursday, 23 Feb 2023 at 16:25, Rob Sargent wrote:
> Looks to me like this only happens if the last word of the line is
> "emphasized" and larger font.

This is not an org problem; it's LaTeX.  It's happening because LaTeX
has a problem breaking up the line at the previous word.  You can help
LaTeX by adding the line

\sloppy

just before the paragraph in question.

-- 
: Eric S Fraga, with org release_9.6.1-250-ge6353d in Emacs 30.0.50


Re: org-roam: how to have links un-opened

2023-02-22 Thread Fraga, Eric
And, for the record, this does the job for me:

#+begin_src emacs-lisp
  (add-hook 'org-roam-mode-hook #'magit-section-show-level-2)
#+end_src 

Thanks again,
eric

-- 
: Eric S Fraga, with org release_9.6-204-g2f7052 in Emacs 30.0.50


  1   2   3   4   5   >