Re: Request To Contribute To 'Worg' Project

2022-01-09 Thread Thomas S. Dye

Aloha Samuel,

Samuel Banya  writes:

I read this page, and noted that you have to request access for 
this repo:

https://git.sr.ht/~bzg/worg

After the approval process is completed, can anyone point me to 
"How" exactly contributions are made?


Are they done through 'patch' based emails sent through to the 
mailing list itself?


Or are they done directly through git pushes?


You contribute with git pushes.

Thanks for our interest in Worg.

All the best,
Tom 


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



Re: oc-biblatex and biblatex substyles

2022-01-06 Thread Thomas S. Dye

Aloha Rasmus,

Rasmus  writes:


I guess you (and Tom) is right that it would be better to make a 
derived style.


Tom, did you already make a derived style?  From the later 
emails it
sounded like it, but I don’t see oc-biblatex-chicago.el in the 
main repo.


Otherwise, I can have try to have a go at it over the coming 
weeks.


No, I haven't worked on a derived style.  


All the best,
Tom

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



Re: A simple Lua filter for Pandoc

2022-01-04 Thread Thomas S. Dye



Juan Manuel Macías  writes:


Hi,

Very often I need to convert docx documents to Org. There are a 
series
of characters that I prefer to be passed to Org as Org entities 
and not
literally, so I have written this little filter in Lua for 
Pandoc. I
share it here in case it could be useful to someone. Of course, 
the

associative table can be expanded with more replacement cases:

#+begin_src lua :tangle entities.lua
  local chars = {["/"] = "\\slash{}", ["*"] = "\\lowast{}", 
  ["<"] = "\\lt{}",
	  [">"] = "\\gt{}", ["†"] = "\\dagger{}", [utf8.char(0x00A0)] 
= "\\nbsp{}"}


  function Str (elem)
 x = elem.text:match 'http[^%s]'
 if not x then
for i in pairs(chars) do
   elem = pandoc.Str(elem.text:gsub (i, chars[i]))
end
return elem
 end
  end
#+end_src


Neat!  Converting Word documents is no fun at all.

BTW, Babel support for Lua isn't very good AFAICT.  I poked around 
ob-lua.el recently and concluded that one problem is that the Lua 
interpreter prints pointers for some data types instead of a 
human-readable form that might be parsed.


All the best,
Tom

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



Haskell code blocks

2022-01-02 Thread Thomas S. Dye

Aloha all,

Happy New Year!

I'm struggling to write a minimal ob-doc-haskell.org for Worg.

I installed Haskell via Spacemacs (development branch) and the 
Haskell installation appears to be functioning correctly.


The obligatory Hello World! example yields bad results.

#+name: haskell-hello-world
#+begin_src haskell 
main :: IO () 
main = putStrLn  "Hello, World!"

main
#+end_src

#+RESULTS: haskell-hello-world
: Prelude> Hello, World!

I'm guessing the "Prelude>" part of the output is the prompt from 
the interpreter.


I found this in ob-haskell.el:

 (setq-local comint-prompt-regexp
 (concat haskell-prompt-regexp "\\|^λ?> 
 "
 
But I couldn't find a way to modify haskell-prompt-regexp without 
changing the source.


Advice welcome.

All the best,
Tom

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



Re: [PATCH] ob-shell-test, test-ob-shell and introduction

2022-01-02 Thread Thomas S. Dye
 make each of the different 
functionalities provided by ob-shell.el have a similar 
implementation.  The expectation is that this would benefit 
maintenance.


* Footnotes

[fn:1] 
https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-shell.html#orgfa6b7c5


[fn:2] M-up is bound to =org-metaup-hook= and
=ob-core:org-babel-load-in-session= by default.

[fn:3] It's not clear to me if there's a technical definition 
for an

Emacs package.

[fn:4] I may extend my personal notes into a document detailing 
the

Org API. http://excalamus.com/2021-11-03-org_babel.html



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



Re: [PATCH] ob-shell-test, test-ob-shell and introduction

2021-12-31 Thread Thomas S. Dye

Aloha Matt,

Matt  writes:


 > Wow.  Nice work!

Thanks. I pushed things to Worg, if you haven't seen already 
(https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-shell.html). 
If you read it and find anything missing or unclear, please let 
me know. I'm still waiting on work to sign the FSF disclaimer in 
order to work on ob-shell.el. I might just implement something 
on the side and use that to inform any future contributions.


I was looking at the Worg page when I wrote "Wow" :)

Many thanks for this contribution.

All the best,
Tom

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



Re: [PATCH] ob-shell-test, test-ob-shell and introduction

2021-12-31 Thread Thomas S. Dye

Aloha Matt,

Wow.  Nice work!

All the best,
Tom

Matt  writes:

 > Contributions to Worg aren't similarly restricted.  Feel free 
 > to 
 > push material there in the meantime.


Looks like the email finally got sent to the right person at my 
company. Who knows how long it will take for them to get the FSF 
disclaimer back to me...


Now that I'm on holiday, I've got a little more time to 
contribute to Worg. Here's a few patches showing what I've come 
up with. I'll finish it up in the next few days, hopefully.  Not 
sure if the patches are formed correctly,  sorry about that if 
not. It's late here and I wanted to show progress. I'll worry 
about those kinds of details later. :)



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



Re: [PATCH] ob-shell-test, test-ob-shell and introduction

2021-12-18 Thread Thomas S. Dye

Aloha Matt,

Matt  writes:

 > Contributions to Worg aren't similarly restricted.  Feel free 
 > to 
 > push material there in the meantime.


Looks like the email finally got sent to the right person at my 
company. Who knows how long it will take for them to get the FSF 
disclaimer back to me...


Now that I'm on holiday, I've got a little more time to 
contribute to Worg. Here's a few patches showing what I've come 
up with. I'll finish it up in the next few days, hopefully.  Not 
sure if the patches are formed correctly,  sorry about that if 
not. It's late here and I wanted to show progress. I'll worry 
about those kinds of details later. :)


Good news.

FYI, you don't need to format patches for Worg.  IIRC, you've 
registered at sr.ht and sent your user name to Bastien, so you 
should be able to push directly to Worg when you're ready.


Thanks for your help with ob-doc-shell.org.

All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Thomas S. Dye

Aloha Nicolas,

Nicolas Goaziou  writes:


"Thomas S. Dye"  writes:


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


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

be ignored?


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


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


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


All the best,
Tom

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



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Thomas S. Dye

Aloha Nicolas,

Nicolas Goaziou  writes:


"Thomas S. Dye"  writes:


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

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


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

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


Got it.  Thanks.

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


All the best,
Tom

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



Re: oc-biblatex and biblatex substyles

2021-12-12 Thread Thomas S. Dye

Aloha Nicolas,

Nicolas Goaziou  writes:


Hello,

"Thomas S. Dye"  writes:


Nicolas Goaziou  writes:

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

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

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


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

commands when using this package.

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


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

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


All the best,
Tom

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



Re: oc-biblatex and biblatex substyles

2021-12-10 Thread Thomas S. Dye



Nicolas Goaziou  writes:

Another possibility it to write, e.g., "oc-biblatex-chicago.el" 
and

define a new ‘biblatex-chicago’ export processor, re-using most
functions from "oc-biblatex.el". It would probably only be 
necessary to

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


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

Here is the relevant section 4.51 of the biblatex-chicago manual:

 With the addition of the author-date styles to the package, I 
 have provided three keys for choosing which style to load, 
 notes, authordate, and authordate-trad , one of which you put in 
 the options to the \usepackage command. The default way of 
 loading the notes + bibliography style has therefore slightly 
 changed. With early versions of biblatex-chicago-notes , the 
 standard way of loading the package was via a call to biblatex , 
 e.g.:


 \usepackage[style=chicago-notes,strict,backend=bibtex8,%
 babel=other,bibencoding=inputenc]{biblatex}

 Now, the default way to load the style, and one that will in the 
 vast majority of standard cases produce the same results as the 
 old invocation, will look like this:


 \usepackage[notes,strict,backend=biber,autolang=other,%
 bibencoding=inputenc]{biblatex-chicago}

 (In point of fact, the previous biblatex-chicago loading method 
 without the notes option will still work, but only because I’ve 
 made the notes & bibliography style the default if no style is 
 explicitly requested.) If you read through biblatex-chicago.sty, 
 you’ll see that it sets a number of biblatex options aimed at 
 following the Chicago specification, as well as setting a few 
 formatting variables intended as reasonable defaults (see 
 section 4.4.1, above). Some parts of this specification, 
 however, are plainly more “suggested” than “required,” and 
 indeed many publishers, while adopting the main skeleton of the 
 Chicago style in citations, nonetheless maintain their own house 
 styles to which the defaults I have provided do not conform.


 If you only need to change one or two parameters, this can 
 easily be done by putting different options in the call to 
 biblatex-chicago or redefining other formatting variables in the 
 preamble, thereby overriding the package defaults. If, however, 
 you wish more substantially to alter the output of the package, 
 perhaps to use it as a base for constructing another style 
 altogether, then you may want to revert to the old style of 
 invocation above. You’ll lose all the definitions in 
 biblatex-chicago.sty, including those to which I’ve already 
 alluded and also the code that sets the note number in-line 
 rather than superscript in endnotes or footnotes. Also in this 
 file is the code that calls cmsamerican.lbx , which means that 
 you’ll lose all the Chicago-specific bibstrings I’ve defined 
 unless you provide, in your preamble, a \DeclareLanguageMapping 
 command adapted for your setup, on which see section 7 below and 
 also §§ 4.9.1 and 4.11.8 in biblatex.pdf .


 What you will not lose is the ability to call the package 
 options annotation, strict, short, and noibid (section 4.4.3, 
 above), in case these continue to be useful to you when 
 constructing your own modifications. There’s very little code, 
 therefore, actually in biblatex-chicago.sty , but I hope that 
 even this minimal separation will make the package somewhat more 
 adaptable. Any suggestions on this score are, of course, 
 welcome.


All the best,
Tom

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



Re: Making a dictionary in Org

2021-12-08 Thread Thomas S. Dye



Juan Manuel Macías  writes:


Hi,

How to create a 'dictionary style' PDF document from Org, with 
two
columns and with dynamic page headers[1]: here I share 
(attached) an Org
file, in case it is useful to someone, with the (simplified) 
LaTeX code
I used to define the styles of the entries and the dynamic page 
headers
in the typesetting of the /Hispanic Dictionary of Classical 
Tradition/.


I produced this dictionary (828 pp.) using Org and Org-Publish, 
with

output to LuaLaTeX. Some images:
https://maciaschain.gitlab.io/lunotipia/images/muestras-dhtc5.png
https://maciaschain.gitlab.io/lunotipia/images/muestras-dhtc3.png
https://maciaschain.gitlab.io/lunotipia/images/muestras-dhtc4.png

[1] If a page contains multiple entries, the first and the last 
entries
are collected, both separated by an en dash; if the page 
contains a
single entry, or a continuation of the previous page/entry, it 
is

collected that entry only.



Nice work!

All the best,
Tom

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



Re: [PATCH] ob-shell-test, test-ob-shell and introduction

2021-12-05 Thread Thomas S. Dye

Aloha Matt,

Matt  writes:

 > > I just verified with my employer that my contract grants an 
 > > exception for this
 > > project. Just emailed the request to ass...@gnu.org. 

Not surprisingly the FSF hasn't resources to verify my 
contract's exception and needs a written disclaimer from my 
employer. I'm waiting on this now.


 > Feel free to develop and
 > share patches before the assignment is complete, we’ll just 
 > wait till it’s gone
 > through before merging 
 
Given the contract exception, I'll start moving forward again 
with the assumption that I'll eventually get that written 
disclaimer.


 > Hope that helps.
 
It does, thank you. It's nice to know that my words aren't going 
into the void. :)


Good news.

Contributions to Worg aren't similarly restricted.  Feel free to 
push material there in the meantime.


All the best,
Tom

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




Re: Worg's library-of-babel.org (was: Dodgy Worg publishing?)

2021-12-05 Thread Thomas S. Dye

Aloha all,

Timothy  writes:


"Thomas S. Dye"  writes:

I checked this morning and I still get a 404 error when I 
follow the Worg link

in section 16.12 of the Org mode manual at orgmode.org.


(sigh) I already fixed a 2nd issue, it looks like there's at 
least a

3rd...


I still get the 404 error.

After some thought, it occurs to me that it is likely a bad idea 
to make changes to library-of-babel.org, which just contains 
source code blocks that might prove useful to Babel users.


Perhaps there is some way to indicate that this file just needs to 
be copied "as is" when Worg is published?  Or, if not, then 
perhaps the patch with the ungainly, working URL might be applied 
to the manual?


All the best,
Tom

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



Re: Re-installing org-mode packages due to annoying message

2021-11-29 Thread Thomas S. Dye

Aloha Alan,

Alan E. Davis  writes:


It is interesting that an old timer like yourself would reach 
for
Spacemacs.  I haven't, mostly because I don't think I need the 
modal model
of Vi.  The keybindings of Emacs or so convenient and 
intelligent I find
them to be enough.  Here's where I might have spent more time in 
the early
days learning the basics better.  One of the things I like about 
Emacs is
that I can dance around a page of text, in a manner that the 
commercially
produced text editors and word processors I know have not dared 
to
implement.  We are locked in to a dumbed down interface in all 
the software
we encounter.  I cannot think of one example just now, but maybe 
the way
one can move back and forth over characters and words.  I never 
learned Vi,

except to be able to edit a simple config file if need be.

I know I am over my head, and I have been so for the 30-ish 
years I have
been using Emacs and for the time I have used Org-mode.  It is 
more than I
can do to keep up with the newer complexities that are cropping 
up.  Yet,

just like the plain text files, and the LaTeX source for my one
publication, a lexicon of animal names, they live on while 
documents using
the high priced tools are not longer readable or editable.  And 
through all
the changes, my little utilities for editing things that only I 
could
probably care about, and I would not expect anyone to care to 
learn---they

still work today.  I love it!


FYI, from another old-timer in over his head, Spacemacs has a simple option to 
enable Emacs key bindings.  You don't need to use the modal bindings.

hth,
Tom

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



Re: [PATCH] ob-doc-shell.org (was [PATCH] ob-shell-test, test-ob-shell and introduction)

2021-11-22 Thread Thomas S. Dye

Aloha Matt,
Matt  writes:

 > Unfortunately, there is no ob-doc-shell.org at 
 > worg/org-contrib/babel/languages/.
 > 
 > There is an ob-doc-template.org in case you'd like to 
 > contribute 
 > ob-doc-shell.org :)


I created one, along with a sourcehut account. However, it looks 
like I need to be granted some permissions to write to the worg 
website. Is Bastien the contact for that? I've attached a patch 
in the mean time.


That's a good start.  Thanks!

Yes, contact Bastien directly off list with your sourcehut user 
name and he'll set you up to push directly to Worg.


Let me know if you have questions.

All the best,
Tom

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



Re: [PATCH] ob-shell-test, test-ob-shell and introduction

2021-11-22 Thread Thomas S. Dye

Aloha Matt,

Matt  writes:


Hi,

I'm interested in getting async into ob-shell.el. Since I've 
never contributed before, I figure it'd be good to start with a 
few easy tasks.


It looks to me like the stdin and cmdline header args aren't 
documented anywhere (at least I couldn't find anything). To make 
sure I'm using them correctly before making a patch for the 
manual, here are some tests.


Please let me know if things look okay. It wasn't clear to me 
how to send along a message with git send-email, so I formatted 
these patches and included them as an attachment. Is that fine?


Thanks,
Matt


Unfortunately, there is no ob-doc-shell.org at 
worg/org-contrib/babel/languages/.


There is an ob-doc-template.org in case you'd like to contribute 
ob-doc-shell.org :)


All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: Worg's library-of-babel.org (was: Dodgy Worg publishing?)

2021-11-22 Thread Thomas S. Dye



Timothy  writes:


"Thomas S. Dye"  writes:

I checked this morning and I still get a 404 error when I 
follow the Worg link

in section 16.12 of the Org mode manual at orgmode.org.


(sigh) I already fixed a 2nd issue, it looks like there's at 
least a

3rd...


FYI, the long link in my patch was taken from 
worg/org-contrib/babel/index.org.  Whoever put it there (my git 
foo isn't up to finding out who) might have suspected your 
experience.


Thanks for your work on this.

All the best,
Tom

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



Re: Dodgy Worg publishing?

2021-11-22 Thread Thomas S. Dye

Aloha all,

Timothy  writes:


Hi Bastien,


You can check the output of Worg publishing process here:

<https://builds.sr.ht/~bzg/worg>


Ah cool, thanks for pointing that out.

The latest build contains a line showing that 
library-of-babel.org

does not export:

<https://builds.sr.ht/~bzg/job/627192#task-install-784>

  “Reference `fibs’ not found in this buffer”

Can someone have a look at this and fix the ref?


I’ve just pushed b837a85 which just defines fibs using the 
content of the
example block. This may not be the best fix long-term, but 
should make it work.


All the best,
Timothy


Thanks for looking into this and identifying a problem.

I checked this morning and I still get a 404 error when I follow 
the Worg link in section 16.12 of the Org mode manual at 
orgmode.org.


Also, is there a reason to keep 
worg/org-contrib/babel/library-of-babel.org in addition to 
worg/library-of-babel.org?


All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: execute src block during export (Re: Worg HTML export problem?)

2021-11-12 Thread Thomas S. Dye

Aloha Max,

Max Nikulin  writes:


On 12/11/2021 00:24, Thomas S. Dye wrote:
The original problem is likely due to the default header 
arguments in 
ob-org.el, which are unusual.


It is great that the problem is solved. I do not think however 
that something
inside ob-org.el may affect processing of a file before this 
package is loaded.



If I export both, then all is well.
#+begin_src emacs-lisp :results value none :exports both
  (org-babel-do-load-languages
   'org-babel-load-languages
   '((org . t)))
#+end_src


I feel that I have missed something. I do not see the purpose to 
include this
source block in user docs. I expect that for accidental usage it 
is more
convenient to type (require 'ob-org), while as a permanent 
settings it is
possible to do customize-variable org-babel-load-languages or to 
use

`add-to-list'.


The source block is included to show the user how to modify their 
.emacs.


I was surprised that changing its :results header argument had an 
effect on export.


Do you have an explanation why the header argument makes this 
difference on Worg?


All the best,
Tom

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



Re: execute src block during export (Re: Worg HTML export problem?)

2021-11-11 Thread Thomas S. Dye

Aloha Max,

Max Nikulin  writes:


On 11/11/2021 04:24, Thomas S. Dye wrote:

Max Nikulin writes:

On 08/11/2021 05:46, Thomas S. Dye wrote:
to fail, but AFAICT ob-doc-org.org doesn't have this 
affliction--it exports

locally.


Have you tried to export it from "emacs -Q -L 
/path/to/org-mode/lisp"?
I think, you just have "org" in customized 
"org-babel-load-languages".


I've likely made some other error, but I don't have clue what 
it might be.

I don't know how to debug this.  Can someone help, please?


https://builds.sr.ht/~bzg/job/623225

[exporting] org-contrib/babel/languages/ob-doc-org.org
No org-babel-execute function for org!

However I do not see explicit load/require for particular 
language in sibling

files. I expected something like

#+begin_src emacs-lisp :exports none
  (require 'ob-org)
#+end_src

Thanks for looking into this.
Is the problem something I can fix in ob-doc-org.org?  Or, does 
it have 
to do with the configuration at sr.ht?


All settings are in .build.yaml and publish.sh (lisp) file.

Sorry, I have missed the following code in your file

#+begin_src emacs-lisp
  (org-babel-do-load-languages
   'org-babel-load-languages
   '((org . t)))
#+end_src

I am unsure whether it should work in this form or it worked 
earlier, but on
main branch it is not executed during export. If I change first 
line to the

following, the block is executed during export:

#+begin_src emacs-lisp :results value none :exports results

My minimal example:

Test

#+begin_src emacs-lisp :results value none :exports results
   (org-babel-do-load-languages
'org-babel-load-languages
'((org . t)))
#+end_src

#+name: org-hello
#+begin_src org :var hello="World"
  Hello, $hello!
#+end_src

#+begin_src elisp :var x=org-hello[](hello="Org") :exports both
  (print x)
#+end_src


Thanks!

The original problem is likely due to the default header arguments 
in ob-org.el, which are unusual.


If I export both, then all is well.

#+begin_src emacs-lisp :results value none :exports both
 (org-babel-do-load-languages
  'org-babel-load-languages
  '((org . t)))
#+end_src

All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: Worg HTML export problem?

2021-11-10 Thread Thomas S. Dye

Aloha Max,

Max Nikulin  writes:


On 08/11/2021 05:46, Thomas S. Dye wrote:
I pushed a new file, ob-doc-org.org, to Worg earlier today, but 
the link 
in 
https://orgmode.org/worg/org-contrib/babel/languages/index.html 
gives a 404
error.  I usually see this when the Org file has a bad link 
that causes export
to fail, but AFAICT ob-doc-org.org doesn't have this 
affliction--it exports

locally.
I've likely made some other error, but I don't have clue what 
it might be.

I don't know how to debug this.  Can someone help, please?


https://builds.sr.ht/~bzg/job/623225

[exporting] org-contrib/babel/languages/ob-doc-org.org
No org-babel-execute function for org!

However I do not see explicit load/require for particular 
language in sibling

files. I expected something like

#+begin_src emacs-lisp :exports none
  (require 'ob-org)
#+end_src


Thanks for looking into this.

Is the problem something I can fix in ob-doc-org.org?  Or, does it 
have to do with the configuration at sr.ht?


All the best,
Tom

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



Worg HTML export problem?

2021-11-07 Thread Thomas S. Dye

Aloha all,

I pushed a new file, ob-doc-org.org, to Worg earlier today, but 
the link in 
https://orgmode.org/worg/org-contrib/babel/languages/index.html 
gives a 404 error.  I usually see this when the Org file has a bad 
link that causes export to fail, but AFAICT ob-doc-org.org doesn't 
have this affliction--it exports locally.


I've likely made some other error, but I don't have clue what it 
might be.


I don't know how to debug this.  Can someone help, please?

All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: Storing database credentials outside an org file

2021-11-06 Thread Thomas S. Dye

Aloha Mike,

Mike Gauland  writes:


On 1/11/21 4:33 pm, Tim Cross wrote:

Mike Gauland  writes:

I often use an org file to record database queries, using sql 
source blocks.
I've been putting the database credentials in the file using 
header-args:sql
properties, but I'd prefer to have the credentials saved in a 
separate file for

security reasons.

Any ideas on how I could make this work?
It probably wouldn't be too hard to use the authinfo.gpg 
facility via
the auth-source library which is included in Emacs. In fact, I 
think

sql-mode might already have support for this built in.

Thanks for the suggestion. I didn't see it on worg, but in 
ob-sql.el I found
support for ":dbconnection". I can set up an entry in 
sql-connection-alist, and
give the name of the entry to the sql block via :dbconnection. 
Now, my password
is safely out of the .org file. As a bonus, it is easier to 
maintain across

different org files.


The Worg entry should be fixed now.  Thanks for the report.

All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: [BUG] Source code of type 'conf' disappears in LaTeX export [N/A (N/A @ /usr/share/emacs/site-lisp/org-mode/)]

2021-10-29 Thread Thomas S. Dye

Aloha,

Marc van der Sluys  writes:

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.

Thank you for the incredible orgmode software!

I ran into this issue.  When I have a block of 'code' from a 
configuration file, e.g.


#+begin_src conf
  Host server
   HostName servername.domainname.org
   User username
#+end_src

it shows up nicely in emacs.  However, when exporting to LaTeX 
and pdf using the Minted package, the code blocks go missing 
completely.  The code is converted in LaTeX to


\begin{minted}[]{conf}
Host server
 HostName servername.domainname.org
 User username
\end{minted}

which disappears upon compilation because 'conf' is not one of 
the lexers recognised by Minted.


Replacing 'conf' with 'aconf' (for Apache config) has the 
opposite result: no syntax highlighting in emacs orgmode, but 
acceptable output in LaTeX, because it is supported by Minted.


A 'quick fix' could therefore be to either:
  1) rename conf -> aconf when exporting orgmode to LaTeX,
or
  2) adding the syntax highlighting that is used for conf to 
  source blocks of type aconf.



Expected behaviour:
+ conf code block shows up in LaTeX/pdf with syntax highlighting 
after converting from orgmode to LaTeX/PDF.


Actual behaviour:
+ conf code block completely disappears in PDF after converting 
from orgmode to LaTeX/PDF.



Sincerely,

Marc van der Sluys.


Does org-latex-minted-langs help?

All the best,
Tom

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



Re: A quick LaTeX reference guide in Org

2021-10-24 Thread Thomas S. Dye

Aloha Juan Manuel,

Juan Manuel Macías  writes:


Hi,

The TeXstudio editor includes a comprehensive LaTeX reference 
guide in

HTML
(https://github.com/texstudio-org/texstudio/blob/master/utilities/latexhelp.html).
I have converted it to Org with Pandoc (and then cleaned it up 
and fixed

some broken links). It can be downloaded here:
https://cloud.disroot.org/s/krGSf7TmFZRiyZL

I think it may be useful for a quick LaTeX query. You could even 
use

org-ql and define a function like this:

(require 'org-ql)
(defun my-latex-apropos ()
  (interactive)
  (let ((regexp (if (not (current-word t t))
(read-from-minibuffer "Find (regexp): ")
  (read-from-minibuffer "Find: " (current-word t t)
(org-ql-search
  "/path-to/latexreference.org"
  `(regexp ,regexp

Best regards,

Juan Manuel 


Such a handy utility!  Thanks for sharing.

All the best,
Tom

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



Re: Evaluate or execute?

2021-10-24 Thread Thomas S. Dye

Aloha Rudolf, Joost, and Tim,

Thanks very much.  This helps a lot.

All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Evaluate or execute?

2021-10-24 Thread Thomas S. Dye

Aloha all,

The org manual and various documents on Worg appear to use the 
subject terms as synonyms for running a bit of source code and 
gathering its result.  Is there a useful distinction that this 
non-software engineer is missing?  Or, are the terms simply 
synonymous?


All the best,
Tom

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



[patch] Fix link to Library of Babel

2021-10-24 Thread Thomas S. Dye

Aloha all,

The attached patch changes a 404 link to the working link used on 
Worg.


All the best,
Tom

>From 31f340d80fdd01833e770d12806f0df165b88365 Mon Sep 17 00:00:00 2001
From: "Thomas S. Dye" 
Date: Sun, 24 Oct 2021 07:09:49 -1000
Subject: [PATCH] doc/org-manual.org: Fix link to Library of Babel

---
 doc/org-manual.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 6273ec90e..060fc0a44 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -18603,7 +18603,7 @@ can preview the results with the following command:
 
 The "Library of Babel" is a collection of code blocks.  Like
 a function library, these code blocks can be called from other Org
-files.  A collection of useful code blocks is available on [[https://orgmode.org/worg/library-of-babel.html][Worg]].  For
+files.  A collection of useful code blocks is available on [[https://git.sr.ht/~bzg/worg/tree/master/item/library-of-babel.org][Worg]].  For
 remote code block evaluation syntax, see [[*Evaluating Code Blocks]].
 
 #+kindex: C-c C-v i
-- 
2.25.1



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


Re: Fwd: errors when using org-agenda

2021-10-23 Thread Thomas S. Dye



Tim Cross  writes:


Greg Minshall  writes:

(and, after fifteen years of vi, and now 25 of emacs, i guess 
i'll skip

the spacemacs experience.  :)



Similar past for me as well. I used vi from early/mid 80x until 
mid 90s
and then switched to Emacs and used standard Emacs bindings 
until a

couple of years ago, then decided to give spacemacs a go.

I realised when I did I had very much missed the vi modal 
editing
approach. I know it isn't for everyone, but I find using it 
pushes my
productivity through the roof. I always tried to use keyboard 
navigation
and avoid the mouse. Being able to use simple keys rather than 
complex
bindings involving ctl, alt, shift, is just so much faster and 
easier on
my aging and stiffining fingers, I think I'm now a devout member 
of the

evil-mode cult.


Same here, though Spacemacs introduced me to modal editing.

Spacemacs also helped eliminate many of my rookie errors 
configuring Emacs.


All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: 9.5: coping with loss of ditaa.jar

2021-10-10 Thread Thomas S. Dye

Aloha,

Jarmo Hurri  writes:


Greetings.

2. Use the program "ditaa" (not ditaa.jar) that comes with your
   operating system. This _may_ work, but I have not been able 
   to misuse
   the settings in ob-ditaa widely enough yet to create a 
   working

   solution.


This worked for me on Ubuntu 20.04, if it is helpful.

sudo apt-get install ditaa

Then set org-ditaa-jar-path to "/usr/bin/ditaa".

All the best,
Tom

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



Re: Some broken links in pages under https://orgmode.org/worg/org-contrib/babel

2021-10-05 Thread Thomas S. Dye



Daniel Fleischer  writes:

- "org-contrib/babel/library-of-babel" not sure why it doesn't 
appear on

  the server because the file compiles locally to HTML.


A bad link blocked HTML compilation on the server.  Fixed now, 
thanks.


All the best,
Tom

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



Org mode web site

2021-10-03 Thread Thomas S. Dye

Aloha all,

I'm seeing what looks like a spurious headline:   Elaboration + 
demo image   ignore


All the best,
Tom

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



Re: Cannot clone org-mode's git repository

2021-10-03 Thread Thomas S. Dye

Aloha,

Amin Bandali  writes:


Hello,

Colin Baxter writes:


Hello,

I get a strange error when I try to clone org-mode:

redknight@jetstar:~/git$ git clone 
https://git.savannah.gnu.org/git/emacs/org-mode.git

Cloning into 'org-mode'...
fatal: unable to access 
'https://git.savannah.gnu.org/git/emacs/org-mode.git/': server 
certificate verification failed. CAfile: 
/etc/ssl/certs/ca-certificates.crt CRLfile: none


This looks like part of the fallout of the recent expiry of one 
of

Let's Encrypt's root certificates.  See:
https://savannah.nongnu.org/support/?110546
https://letsencrypt.org/2021/10/01/cert-chaining-help.html

What GNU/Linux distro are you using?  Try updating your packages 
--

particularly ca-certificates and packages like openssl, gnutls,
libssl, etc. -- and see if it helps.  If not, you can read more 
on
the topic in recent articles around the web, and apply one of 
the

suggested workarounds.


Updating ca-certificates worked for me on Ubuntu.

All the best,
Tom

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



Re: Worg footnotes

2021-10-03 Thread Thomas S. Dye
Bastien  writes:

> Hi Thomas,
>
> "Thomas S. Dye"  writes:
>
>> Worg footnotes are oddly formatted for me.
>
> This should be fixed now.
>
> See https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html
>
> Thanks!

Nice.  Thanks!

All the best,
Tom

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



Worg footnotes

2021-10-02 Thread Thomas S. Dye

Aloha all,

Worg footnotes are oddly formatted for me.  I see the footnote 
number on one line, then the footnote on the next line, like so:


1
Gnuplot manual downloads: 
http://www.gnuplot.info/documentation.html


Do others see this, as well?  Is there a fix?

All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: Release 9.5

2021-10-02 Thread Thomas S. Dye



Max Nikulin  writes:


On 01/10/2021 10:53, Jarmo Hurri wrote:

Bastien writes:

I just ran 'git pull' and got a warning and an error:

warning: redirecting to 
https://git.savannah.gnu.org/git/emacs/org-mode.git/
Your configuration specifies to merge with the ref 
'refs/heads/maint'

from the remote, but no such ref was fetched.


Maybe you are trying to pull while you are on master branch from 
old orgmode.org

repository. You should either remove or rename old remote

git remote rm origin


I found these instructions (including the ones in the rest of the 
message) very helpful.  Thanks!


All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: [Worg] Proposing a few CSS changes

2021-10-02 Thread Thomas S. Dye



Eric S Fraga  writes:


Looks good (on both large monitor and on my phone).  Thank you!


+1

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



Re: [Worg] Proposing a few CSS changes

2021-09-27 Thread Thomas S. Dye



Eric S Fraga  writes:


On Saturday, 25 Sep 2021 at 19:37, Adam Porter wrote:
This is why I prefer to remove font specifications for 
documentation

pages: let the user decide.


+1 on this (and on size specifications).  Please keep the 
settings as
generic as possible and let me, the viewer, decide actual font 
and

sizes.

Thank you,
eric


+1

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



[PATCH] org-manual.org: Augment TODO keywords example

2021-09-23 Thread Thomas S. Dye

Aloha all,

The attached patch makes the example for setting up keywords in an
individual file match the example where it appears earlier.  It
also provides an example of how fast TODO selection should look
when it is implemented on a per-file basis.

Sorry for the earlier truncated messages!  Clumsy fingers today!

All the best,
Tom
>From 47b9eb04e55530ecc7b13411c01cd6fb97b17d14 Mon Sep 17 00:00:00 2001
From: "Thomas S. Dye" 
Date: Thu, 23 Sep 2021 13:55:19 -1000
Subject: [PATCH] org-manual.org: Augment TODO keywords example

---
 doc/org-manual.org | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 87f2147f2..c27a2c07c 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -3991,9 +3991,9 @@ interpretation, but it means the same as =#+TODO=, or
 A setup for using several sets in parallel would be:
 
 #+begin_example
-,#+TODO: TODO | DONE
-,#+TODO: REPORT BUG KNOWNCAUSE | FIXED
-,#+TODO: | CANCELED
+,#+TODO: TODO(t) | DONE(d)
+,#+TODO: REPORT(r) BUG(b) KNOWNCAUSE(k) | FIXED(f)
+,#+TODO: | CANCELED(c)
 #+end_example
 
 #+cindex: completion, of option keywords
-- 
2.25.1



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


[PATCH] org-manual.org: Augment TODO keywords example

2021-09-23 Thread Thomas S. Dye

Aloha all,

The attached patch
--
Thomas S. Dye
https://tsdye.online/tsdye



[PATCH] org-manual.org: Augment TODO keywords example

2021-09-23 Thread Thomas S. Dye

Aloha all,

The attached patch makes the example for setting up keywords in an 
individual file match the example where it appears earlier.  It 
also provides an example of how fast TODO selection should look 
when it is implemented on a per-file basis.


Sorry for the earlier truncated message.

All the best,
Tom


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



Re: Org-cite follow function for ebib

2021-08-09 Thread Thomas S. Dye
Aloha John,

Thanks!

All the best,
Tom

John Kitchin  writes:

> If every thing is working right, you can get the file that a key is in like
> this:
>
> #+BEGIN_SRC emacs-lisp
> (cl-loop for (file . entries) in (org-cite-basic--parse-bibliography)
> when (gethash  "some-key" entries)
>  return file)
> #+END_SRC
>
> This returns the first file that matches.
>
> John
>
> ---
> Professor John Kitchin (he/him/his)
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
>
>
> On Mon, Aug 9, 2021 at 6:45 AM Joost Kremers 
> wrote:
>
>> Hi Thomas & others,
>>
>> On Sat, Aug 07 2021, Thomas S. Dye wrote:
>> > Aloha Joost,
>> >
>> > Following some pointers from Eric and Bruce I have this in my
>> > configuration and it seems to work fine, though I haven't had a chance
>> > to use it very much.
>>
>> Thanks for figuring that out. :-) Once I get to implementing support, I'll
>> use
>> it as a starting point. There should also be a way to open the correct file
>> automatically, without the user having to select it.
>>
>>
>>
>> --
>> Joost Kremers
>> Life has its moments
>>
>>


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



Re: Org-cite follow function for ebib

2021-08-07 Thread Thomas S. Dye
Aloha Joost,

Following some pointers from Eric and Bruce I have this in my
configuration and it seems to work fine, though I haven't had a chance
to use it very much.

  ;; Citations
  (defun tsd/choose-file (candidates)
(interactive)
(org-completing-read "Choose file: " candidates))

  (defun tsd/ebib-follow (datum _)
"Follow citation or citation reference DATUM. When DATUM is a
citation reference, open ebib to the entry referencing the
citation key."
(let* ((key
(if (eq 'citation-reference (org-element-type datum))
(org-element-property :key datum)
  (user-error "Not a citation reference")))
   (files (org-cite-list-bibliography-files))
   (file (if (> (length files) 1)
 (tsd/choose-file files)
   (nth 0 files
  (ebib file key)))
  (require 'oc-biblatex)
  (require 'oc-csl)
  (org-cite-register-processor 'ebib
  :follow #'tsd/ebib-follow)
  (setq org-cite-follow-processor 'ebib)

Also, it was easy to configure ebib to insert citations with the
org-cite syntax.

All the best,
Tom

Joost Kremers  writes:

> On Fri, Aug 06 2021, Thomas S. Dye wrote:
>> Yes, I have set the basic follow processor and org-open-at-point takes
>> me to the .bib file at the entry for the key at point.
>
> Unfortunately, I haven't had the time yet to update Ebib for the new
> functionality. Ebib needs to implement a follow processor so that
> `org-open-at-point` takes you to the entry in Ebib.
>
>> Surprisingly (to me), M-x ebib sometimes displays the entry for the key
>> at point, too.
>
> That's because when you start Ebib with `M-x ebib` (or a key bound to that
> function, of course), it checks to see if point is at something that looks 
> like
> a key and tries to find a corresponding entry in the current database. That
> functionality is not customisable and not very well implemented, so it doesn't
> always work. (Also, if point is at the `cite` prefix, it doesn't work.)


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



Re: Org-cite follow function for ebib

2021-08-06 Thread Thomas S. Dye
Yes, I have set the basic follow processor and org-open-at-point takes
me to the .bib file at the entry for the key at point.

Surprisingly (to me), M-x ebib sometimes displays the entry for the key
at point, too.

All the best,
Tom

Bruce D'Arcus  writes:

> On Fri, Aug 6, 2021 at 12:47 PM Thomas S. Dye  wrote:
>>
>> Aloha Bruce,
>>
>> So, I tried calling ebib() with point on a key and it works in some
>> instances but not in others.
>
> Just to make sure I'm being clear, I mean this in your config:
>
> (setq org-cite-follow-processor 'basic)
>
> ... and then, when point is on citation and/or key:
>
> M-x org-open-at-point
>
> ... which is what calls the follow processor.
>
> If that doesn't work, you can probably look at the oc-basic code and
> see how to adapt it for ebib.
>
> Bruce


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



Re: Org-cite follow function for ebib

2021-08-06 Thread Thomas S. Dye
Aloha Bruce,

So, I tried calling ebib() with point on a key and it works in some
instances but not in others.

So far, it works sometimes on plain cite: keys, but never on styles or
variants, like cite/a/f:

It would be magical if something this simple would do the trick.

All the best,
Tom

Bruce D'Arcus  writes:

> On Fri, Aug 6, 2021 at 11:50 AM Thomas S. Dye  wrote:
>>
>> Aloha Eric,
>>
>> That function opens a window on the ebib database and displays the
>> record with the key at point.
>
> So does the oc-basic follow function not provide this?
>
> I guess I'm unclear if one can configure ebib to open bib files by
> default. If yes, I would think oc-basic would be sufficient.
>
> If not, FWIW, org-ref-cite-follow is extensible via hydra+ (as is
> bibtex-actions-follow via a custom embark keymap).
>
> Depends if you want just a single function to run, or you want a menu
> of choices.
>
> Bruce


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



Re: Org-cite follow function for ebib

2021-08-06 Thread Thomas S. Dye
Aloha Eric,

That function opens a window on the ebib database and displays the
record with the key at point.

At this point, I'm just checking to see if someone has a similar
function working for the new org-cite framework.

I do appreciate the pointers to functions that do something similar
outside ebib.  They'll be useful if I try to write a function myself.

All the best,
Tom

Eric S Fraga  writes:

> On Thursday,  5 Aug 2021 at 10:12, Thomas S. Dye wrote:
>> I want to open the bib entry, something similar to org-ebib-open,
>> which works on Org mode links.
>
> Tom,
>
> maybe clarify what org-ebib-open does?
>
> For me, org-open-at-point, bound to C-c C-o, on a [cite:@key] entry,
> will open the bibliography file and place me at the correct entry.  What
> is it you want to do beyond this?
>
> (I have not used ebib in years and have forgotten what it is it might
> do.)


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



Re: Org-cite follow function for ebib

2021-08-05 Thread Thomas S. Dye
I want to open the bib entry, something similar to org-ebib-open, 
which works on Org mode links.


All the best,
Tom

Bruce D'Arcus  writes:

What kind of functionality do you want associated with your 
citations

(when you run `org-open-at-point` on them)?

Is some or all of it specific to ebib?

Or is it more generic; opening the bib entry, notes, PDFs, etc?

Because the modular nature of org-cite makes it easy to 
mix-and-match

pieces from different projects.

For example, bibtex-actions offers an embark-based follow 
processor,
that uses bibtex-completion behind-the-scenes, and org-ref-cite 
does

similar for a hydra.

On Thu, Aug 5, 2021 at 2:38 PM Thomas S. Dye  
wrote:


Aloha all,

My googling came up empty.  Does anyone have such a function?

All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye




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



Org-cite follow function for ebib

2021-08-05 Thread Thomas S. Dye

Aloha all,

My googling came up empty.  Does anyone have such a function?

All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: should a BIBLIOGRAPHY keyword supercede org-cite-global-bibliography?

2021-07-19 Thread Thomas S. Dye
I used to have a global bibliography that my employees all used. 
Every project also had a local bibliography for citations that 
didn't appear in the global bibliography.  At the end of a 
project, after the editor had cleaned up the local bibliography, 
I'd merge it with the global bibliography using a utility called 
bibtool.


hth,
Tom

Vikas Rawal  writes:

It seems like that should not be the case, i.e. if you define 
BIBLIOGRAPHY

keywords it means you do not want to use the ones
in org-cite-global-bibliography. Is there a scenario where the 
union of those

makes sense?


I second this. The local bibliographies should supercede the 
global.


Vikas



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



Re: [wip-cite-new] Merging tomorrow?

2021-07-07 Thread Thomas S. Dye

Aloha Nicolas,

Good news! I'm looking forward to using this facility.

Thanks to all the contributors.

All the best,
Tom

Nicolas Goaziou  writes:


Hello,

I think the "wip-cite-new" branch is in good shape now. As
a consequence, I'd like to merge it tomorrow.

It is documented, but the documentation is scattered across the 
various
"oc" libraries, and some threads in the mailing list. I'll do a 
summary

here, from a user point of view.

--8<---cut 
here---start->8---
Basically, in order to use it, you need to first set-up a 
bibliography,
using one or more "bibliography" keywords.  on such a 
keyword
visits the related file. Out of the box, Org supports JSON-CSL 
and

BibTeX (or biblatex) bibliographies.

Then, citations can be inserted with the following syntax:

  [cite/style:common prefix ;prefix @key suffix; ... ; common 
  suffix]


Spaces are meaningful except those after the initial colon and 
before

the closing bracket.

Every part of the syntax is optional, except the brackets, 
"cite" and
the colon. Also the citation must contain at least a key. So its 
minimal

form is:

  [cite:@key]

The "style" part is detailed below, in the part related to 
export.


Org can insert or edit citations with  (and delete 
them with
), follow them with , fontify them, and 
export
them. These four actions (insert, follow, activate, and export) 
are
called capabilities.  Libraries responsible for these 
capabilities are

called citation processors.

You can select one citation processor for each capability, 
independently

on the others, through the following variables:

- org-cite-activate-processor
- org-cite-export-processors
- org-cite-follow-processor
- org-cite-insert-processor

Out of the box, Org provides the "basic" (in "oc-basic.el") 
processor
for all of these tasks. It also boasts processors dedicated for 
export:

"csl", "natbib" and "biblatex".

During export, output for citations is controlled by their 
style, which
is an Org label that the export processor may recognize and 
associate to
a specific display, or fall-back to a default style (called 
"nil"). For

example, most processors support "noauthor" and "text" styles.

Some styles can accept a variant, with the syntax 
"style/variant".
Again, it's up to the processor to associate it to a specific 
display.
Common variants include "bare", "caps" or "full".  They also 
accept

short-hands, like "b", "c" and "f".  Please refer to the export
processors' libraries ("oc-basic.el", "oc-csl.el", …) for more 
information.


It is possible to define a default style for a whole document 
(with
"cite_export"), or for all documents (with 
`org-cite-export-processors').


References are displayed with the "print_bibliography" keyword. 
It is
possible to add parameters to its value, as some export 
processors could

make use of them.
--8<---cut 
here---end--->8---


Please let me know if there are any objections to the merge.

Regards,



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



Re: Org mode manual export

2021-05-22 Thread Thomas S. Dye

Done.  Thanks!

All the best,
Tom

Kyle Meyer  writes:


Thomas S. Dye writes:


Aloha all,

The Org mode FAQ on Worg correctly reports that the Org mode
manual is written in Org mode, but it implies that it is 
exported

to texinfo using pandoc--"You can export .org files to texinfo
using Pandoc".

I thought the manual was exported to texinfo with ox-texinfo, 
but

I don't know for certain.

Can someone confirm how the Org mode manual is exported to
texinfo, please?


Yes, you're right that ox-texinfo is used.

In doc/Makefile there's

  org.texi orgguide.texi:   org-manual.org org-guide.org
$(BATCH)  \
  --eval '(add-to-list `load-path "../lisp")' \
  --eval '(load "../mk/org-fixup.el")'  \
  --eval '(org-make-manuals)'

where org-make-manuals is defined in mk/org-fixup.el as

  (defun org-make-manuals ()
"Generate the Texinfo files out of Org manuals."
(require 'ox-texinfo)
(dolist (manual '("../doc/org-manual.org" 
"../doc/org-guide.org"))

  (find-file manual)
  (org-texinfo-export-to-texinfo)))



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



Org mode manual export

2021-05-22 Thread Thomas S. Dye

Aloha all,

The Org mode FAQ on Worg correctly reports that the Org mode 
manual is written in Org mode, but it implies that it is exported 
to texinfo using pandoc--"You can export .org files to texinfo 
using Pandoc".


I thought the manual was exported to texinfo with ox-texinfo, but 
I don't know for certain.


Can someone confirm how the Org mode manual is exported to 
texinfo, please?


I'll update the FAQ if necessary.

All the best,
Tom

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



Re: [wip-cite-new] Initial implementation of `biblatex' citation processor

2021-05-20 Thread Thomas S. Dye

Bummer!

This non-minimal example (modified from a document that originally 
called biblatex-chicago directly) works for me:
  \usepackage[style=chicago-authordate, giveninits=true, 
  uniquename=mininit, noibid, sortcites=true, backend=biber, 
  bibencoding=utf8]{biblatex}


All the best,
Tom

Bruce D'Arcus  writes:

On Thu, May 20, 2021 at 6:37 PM Thomas S. Dye  
wrote:


Interested lurker here.  From the biblatex-chicago manual:

"You can load the package via the usual \usepackage{biblatex},
adding either style=chicago-notes or style=chicago-authordate"


Alas, I get errors when I use that invocation.

Only when I add this does it work correctly.

\usepackage[notes,backend=biber]{biblatex-chicago}

Bruce



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



Re: [wip-cite-new] Initial implementation of `biblatex' citation processor

2021-05-20 Thread Thomas S. Dye

Interested lurker here.  From the biblatex-chicago manual:

"You can load the package via the usual \usepackage{biblatex}, 
adding either style=chicago-notes or style=chicago-authordate"


All the best,
Tom

Denis Maier  writes:


Hi,

Am 20.05.2021 um 19:06 schrieb Nicolas Goaziou:

Hello,

"Bruce D'Arcus"  writes:

On Thu, May 20, 2021 at 9:57 AM Denis Maier 
 wrote:


I'm not really sure we need bare substyles at all. At least 
in biblatex

it's the basis for the other commands.


Though see my followup message on autocite config.

Does that change this discussion?


Why?


I put it in the form of a question, because I'm not sure, but 
...


1. I wasn't sure Nicolas was aware of this config option, nor 
how one
would configure it currently (but it seems necessary in 
general)


There is `org-cite-biblatex-options' defcustom. Currently, it 
defaults
to nil, but you can set it to, e.g., "key=value,key2=value" if 
needed.

We can also change the default.


Is there a way to use styles that aren't loaded via biblatex 
package options,

but as distinct package. E.g., biblatex-chicago is loaded as
\usepackage{biblatex-chicago}. Internally, the package will then 
load biblatex

on its own.

Denis



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



Re: [PATCH] LaTeX export: arbitrary float environments

2021-05-01 Thread Thomas S. Dye

Aloha Timothy,

Thanks for your kind response.

Sorry for the clumsy patch, which I guess would also benefit from 
an addition to the manual, as well?


Larger question: do we really want to tinker with ob-latex in this 
way?  Or, should changes like this patch follow a path indicated 
by Tim Cross and into their own package, say ob-latex-ex, which 
might someday replace ob-latex if it proved useful and stable?


All the best,
Tom

Timothy  writes:


Hi Thomas,

On the surface, this looks reasonable to me :)

Just commenting on some technicalities with the patch itself:
- In ORG-NEWS it would be good to wrap the content over multiple 
lines

  instead of having a single 270 char line :)
- You seem to have an anomalous change to the ob-python :return 
entry
- I don't think your patch subject follows the convention for 
Org, it

  should be:
  "main file/feature: overall change summary"
  so, something like
  "ox-latex: allow for arbitrary float environments"
  rather than
  "LaTeX export: arbitrary float environments"

Thanks for the patch :)

Timothy



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



Re: List of ob-* maintainers

2021-04-21 Thread Thomas S. Dye

Aloha Kyle,

Done.  Thanks.

There are quite a few unmaintained languages in core.

All the best,
Tom

Kyle Meyer  writes:


Thomas S. Dye writes:


Aloha Kyle,

Thanks for this.  I think the Worg list might be useful to
indicate which languages don't have maintainers. Or, is the
information in the source files sufficient?


I don't know, but adding the information to the Worg table 
sounds fine

to me.

Thanks.



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



Re: List of ob-* maintainers

2021-04-19 Thread Thomas S. Dye

Aloha Kyle,

Thanks for this.  I think the Worg list might be useful to 
indicate which languages don't have maintainers. Or, is the 
information in the source files sufficient?  I'm happy not to work 
on the Worg table in that case.


All the best,
Tom

Kyle Meyer  writes:


Thomas S. Dye writes:


Aloha all,

Is there a list of current ob-* maintainers?


Bastien updated the "Maintainer" field of the source files:

  $ git grep -i maintainer lisp/ob-* | cut -d'<' -f1
  lisp/ob-C.el:;; Maintainer: Thierry Banel
  lisp/ob-J.el:;; Maintainer: Joseph Novakovich
  lisp/ob-R.el:;; Maintainer: Jeremie Juste
  lisp/ob-abc.el:;; Maintainer: William Waites
  lisp/ob-clojure.el:;; Maintainer: Bastien Guerry
  lisp/ob-dot.el:;; Maintainer: Justin Abrahms
  lisp/ob-eshell.el:;; Maintainer: stardiviner
  lisp/ob-groovy.el:;; Maintainer: Palak Mathur
  lisp/ob-haskell.el:;; Maintainer: Lawrence Bottorff
  lisp/ob-java.el:;; Maintainer: Ian Martins
  lisp/ob-mscgen.el:;; Maintainer: Justin Abrahms
  lisp/ob-perl.el:;; Maintainer: Corwin Brust
  lisp/ob-python.el:;; Maintainer: Jack Kamm
  lisp/ob-screen.el:;; Maintainer: Ken Mankoff

  $ git describe
  release_9.4.5-317-g3d5284326

The oldest addition is from September 2020, so that should be a 
fairly

current list.

Perhaps it would be useful to add and populate a Maintainer 
column to
the language table on Worg 
(org-contrib/babel/languages/index.html)?


Hmm, I suppose it's nice to have just one spot to avoid 
information
becoming out of sync, but that's a minor issue, so no objections 
from me
if you or others think it'd be helpful to have the information 
on Worg.



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



List of ob-* maintainers

2021-04-18 Thread Thomas S. Dye

Aloha all,

Is there a list of current ob-* maintainers?  Perhaps it would be 
useful to add and populate a Maintainer column to the language 
table on Worg (org-contrib/babel/languages/index.html)?


All the best,
Tom

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



Re: Concerns about community contributor support

2021-04-18 Thread Thomas S. Dye



Timothy  writes:


Thomas S. Dye  writes:


Hmmm, what constitutes noise?

Good question.  I suppose like most words the meaning changes 
over time.  Early
on, posts along the lines of "Wouldn't it be cool if Org mode 
would do this?"
were given more space than they seem to be today.  Tim Cross 
points out a
project trajectory that appears to be common and would explain 
why.  At a more

concrete level, I can offer several of my posts to the list :)


Follow up: What should be the response to "noise", because I 
don't think

it should be a cold shoulder.

Agreed.  I'm trying to put myself in the maintainers' shoes.  They 
volunteer lots of highly skilled time, which I admire greatly.  I 
can imagine a situation where a patch falls outside a maintainer's 
interest and they have difficulty finding the time to understand 
it and offer a meaningful critique.


Historical note: when Carsten took his leave and announced Bastien 
would maintain Org mode, I jumped in noisily to suggest that a 
committee approach might be better.  I couldn't imagine a world 
with two Carstens!  It appears there is a committee of sorts now, 
though I'm in the dark how it is organized.  Assuming there is a 
committee, perhaps addition of an Initial Patch Reviewer might be 
a good idea?


All the best,
Tom

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



Re: Concerns about community contributor support

2021-04-18 Thread Thomas S. Dye



Timothy  writes:


, but Org mode development is
in a new phase that *requires* technique and is quicker to 
identify and filter

out noise.


Hmmm, what constitutes noise?

Good question.  I suppose like most words the meaning changes over 
time.  Early on, posts along the lines of "Wouldn't it be cool if 
Org mode would do this?" were given more space than they seem to 
be today.  Tim Cross points out a project trajectory that appears 
to be common and would explain why.  At a more concrete level, I 
can offer several of my posts to the list :)


These changes mean that contributions need to be checked for 
contributions to
Nicolas' project and also fit into the history of discussion 
and development.
The Org mode project now resembles a scholarly discipline that 
moves slowly and
deliberately toward a more or less well defined goal.  The days 
when Carsten
would bang out a new feature during his train ride home from 
work are gone.


I think here there may have been a minor misunderstanding
/miscommunication. Reading this paragraph I get the sense you 
read my
email as complaining about a delay in merging patches, however 
this is a

separate ---if related--- point to what I intended to raise: the
lack of /response/ to patches.

1. Were I talking about merging: a more considered development 
model, as
   you describe above, can certainly see a protracted merge 
   delay.
   However, 6 months for a minor feature addition [1], and 2 
   months for
   a minor bug fix [2] is not justified by a more considered 
   development

   model IMO.
2. (My main point) Even if development is slower, leaving a 
first-time
   contributor with /absolutely no response/, i.e. *zero* 
   replies to
   their email *months* after they sent it (see [1] and [2] for 
   example,
   and updates.orgmode.org for more) is not good enough IMO. We 
   should

   be better.

So, something in between merging (or not) and appearing on the 
public list that Bastien keeps?



Once again, with reference to my earlier paragraph, IMO slowed
development is one thing, not responding at all to attempted
contributors for months on end another. It is the latter which I 
seek to
improve. I can, have, and will try to help with this myself; but 
I think
we would benefit from a "community effort" and a discussion on 
what the

best way to improve this is.



What do you think of Tim Cross' suggestion that a way forward is 
for "new features and enhancements to be initially implemented as 
add on contribution packages rather than as extensions/enhancement 
to the core 'org-mode' package"? This sounds good to me, but I'm 
not much of a programmer and lack the ability to suss out its 
ramifications fully.  I can see how it would ease Org mode 
maintenance, though.


All the best,
Tom

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



Re: Concerns about community contributor support

2021-04-17 Thread Thomas S. Dye
nkfully, I received prompt and 
friendly
feedback and was guided through the adjustments needed so it 
could be
merged in a timely manner. Should my patch have been similarly 
ignored,
I would have been quite disheartened; it is not an overstatement 
to say
I would likely have written off this mailing list and not tried 
again.


Simply put, this is not good enough. This does a disservice to 
those
that have dedicated time and effort to try and better this 
project only

to be ignored. Not rejected, not even acknowledged, nothing.

It is imperative that this community improves our response to
contributions for the long-term health of this project. Do not 
take me
to be a doomsayer; I have faith that Org is going to keep on 
improving
regardless. However, failing to welcome and encourage 
contributors has a

deleterious effect on the health of the project.

I do not blame the maintainers in the slightest. As Bastien 
brought up
in a recent worg discussion, as time goes on we find ourselves 
taking on
more and more life responsibilities. Therefore it's in our best 
interest
to delegate some of the maintainer responsibilities to 
consistently
active, and supportive community members to "pass down the 
torch" so the
community and platform can continue to expand with grace and 
care.


What can the community do?

I don't know of any silver bullet, but I believe there are some 
steps

which could help, namely:
+ The development and publication of "reasonable expectations" 
which

  contributors should have when submitting a patch, and that the
  maintainers should strive to uphold (e.g. "expect a response 
  within

  ").
+ A community effort/sprint to respond to those patches that 
have been

  seemingly abandoned
+ Onboarding of new maintainers, when reasonable and suitable 
candidates
  exist (I'd very willingly throw my hat in the ring for 
  consideration).

  If it's too much work, spread it out as much as possible.

If any other ideas come to mind, please share them so we can 
discuss

them further.

Finally, it's not all bad.

While this discussion has called for some criticism, I don't 
want to
give the false impression that I think nothing is working and 
nobody is
supporting contributors. This is not the case at all, there are 
some
standout individuals one the mailing list who have been 
fantastic. Kudos

to you all.

My best to everyone,

Timothy

[1] 
https://orgmode.org/list/caoywxzg1cbl07thlzxhbbczm6te2vmtqnmm0w63331gybrj...@mail.gmail.com/

[2] https://orgmode.org/list/87h7qi2l2m@gmail.com/



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



[PATCH] LaTeX export: arbitrary float environments

2021-04-04 Thread Thomas S. Dye

Aloha all,

LaTeX users are able to define arbitrary float types, e.g. with 
the float package.  The attached patch makes them accessible from 
Org mode.


This is a follow on to my efforts several years ago to support the 
Tufte-LaTeX package in Org mode, and a suggestion at the time (by 
Rasmus iirc) to implement an :environment attribute for LaTeX 
export.  This patch achieves a similar goal, but is a bit lighter 
imo.


Let me know if you have questions.

All the best,
Tom
>From 5154901b781f93d08851f96431c976f010fc420c Mon Sep 17 00:00:00 2001
From: "Thomas S. Dye" 
Date: Sun, 4 Apr 2021 08:11:40 -1000
Subject: [PATCH] LaTeX export: arbitrary float environments

* lisp/ox-latex.el (`org-latex--inline-image', `org-latex--decorate
table'): recognize arbitrary :float value.

LaTeX users are able to define arbitrary float types.  This patch
makes them accessible from Org mode.

* etc/ORG-NEWS: Announce new :float capability.
---
 etc/ORG-NEWS |  6 +-
 lisp/ox-latex.el | 16 +++-
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 9fc126b2f..cdfb1c727 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -12,6 +12,10 @@ Please send Org bug reports to mailto:emacs-orgmode@gnu.org.
 
 * Version 9.5 (not yet released)
 ** New options and settings
+*** LaTeX attribute ~:float~ now passes through arbitrary values
+
+LaTeX users are able to define arbitrary float types, e.g. with the float package.  The Org mode LaTeX exporter is now able to process and export arbitrary float types.  The user is responsible for ensuring that Org mode configures LaTeX to process any new float type.
+
 *** Option ~org-hidden-keywords~ now also applies to #+SUBTITLE:
 
 The option ~org-hidden-keywords~ previously applied
@@ -106,7 +110,7 @@ behavior.
 By default ox-html now inlines webp images.
 
 ** New features
-*** =ob-python= improvements to =:return= header argument 
+*** =ob-python= improvements to =:return= header argument
 
 The =:return= header argument in =ob-python= now works for session
 blocks as well as non-session blocks.  Also, it now works with the
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 376d27a07..514801d7c 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -2377,6 +2377,7 @@ used as a communication channel."
 			((string= float "sideways") 'sideways)
 			((string= float "multicolumn") 'multicolumn)
 			((and (plist-member attr :float) (not float)) 'nonfloat)
+(float float)
 			((or float
 			 (org-element-property :caption parent)
 			 (org-string-nw-p (plist-get attr :caption)))
@@ -2470,6 +2471,18 @@ used as a communication channel."
 		   nil t
 ;; Return proper string, depending on FLOAT.
 (pcase float
+  ((and (pred stringp) env-string)
+   (format "\\begin{%s}%s
+%s%s
+%s%s
+%s\\end{%s}"
+   env-string
+   placement
+   (if caption-above-p caption "")
+   (if center "\\centering" "")
+   comment-include image-code
+   (if caption-above-p "" caption)
+   env-string))
   (`wrap (format "\\begin{wrapfigure}%s
 %s%s
 %s%s
@@ -3200,7 +3213,7 @@ centered."
 (defun org-latex--decorate-table (table attributes caption above? info)
   "Decorate TABLE string with caption and float environment.
 
-ATTRIBUTES is the plist containing is LaTeX attributes.  CAPTION
+ATTRIBUTES is the plist containing LaTeX attributes.  CAPTION
 is its caption, as a string or nil.  It is located above the
 table if ABOVE? is non-nil.  INFO is the plist containing current
 export parameters.
@@ -3211,6 +3224,7 @@ Return new environment, as a string."
 	(cond ((and (not float) (plist-member attributes :float)) nil)
 		  ((member float '("sidewaystable" "sideways")) "sidewaystable")
 		  ((equal float "multicolumn") "table*")
+  (float float)
 		  ((or float (org-string-nw-p caption)) "table")
 		  (t nil
 	 (placement
-- 
2.25.1



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


Re: About exporting

2021-03-29 Thread Thomas S. Dye

Aloha Ypo,

"Exporting for life" is a vague target, so it is difficult to give 
precise recommendations.


It is usually the case that export to LaTeX doesn't require 
subsequent modification of the tex file.  In most cases for my 
work, I am exporting to a LaTeX document style/class provided by 
someone else.  This is fairly typical of the LaTeX world, where 
academic journals and university degree programs design their own 
in-house styles and then ask authors to use them.  The idea behind 
LaTeX is that LaTeX defines the meaningful units of a document 
(headers, paragraphs, quotes, etc.) so that a single LaTeX 
document can be exported to multiple targets, each of which styles 
the document units in its own way.  Because Org mode targets 
LaTeX, and not a particular style, this means that Org mode 
inherits LaTeX's style agnosticism.


Of course, there are exceptions to this general rule, where a 
LaTeX class/style defines document units that extend the LaTeX 
spec.  It can be tricky to get Org mode to export to one of these 
non-standard styles.


If you intend to create documents with bibliographies, then IMHO 
LaTeX export is the best choice.  BibTeX defines a plain text 
bibliographic database that is very widely used and capable of 
meeting the most exact bibliographic requirements.  John Kitchin 
has written org-ref to manage BibTeX databases from Org mode, and 
Joost Kremers has ebib, which integrates nicely with Org mode and 
accomplishes many of the same tasks covered by org-ref.  A native 
Org mode bibliographic solution has been discussed for many years 
and there is an org-cite branch that is a nearly complete work in 
progress.  This will be designed to use Citation Style Language, 
rather than BibTeX, which means (at least currently IIUC) that 
there will be somewhat less fine control over bibliographic 
format, although there are thousands of CSL style definitions, 
which presumably cover all the most likely targets.  In my 
experience, CSL approximates most bibliographic styles, rather 
than producing them exactly, so YMMV.


Even without the need for bibliographies, LaTeX might be your best 
choice.  In my field, most of the journals *require* an MS Word 
document, a practice that gives me no end of heartburn.  I've 
found that export to LaTeX followed by conversion with the Haskell 
program pandoc gives the best results.  Pandoc is pretty nifty, 
with conversion among quite a few different formats.  LaTeX 
provides a rich input, which pandoc handles really well.


hth,
Tom


Ypo writes:


Hi

After some years of using orgmode, and exporting using its 
defaults, I would
like to take a quality leap and find a way of exporting for 
life. My options:

LaTeX, ODT, HTML.

LaTeX: I can see some masters here that make professional books, 
and I have some
friends that publish scientific papers using LaTeX. But, it 
looks like a like a
rabbit hole to me, since even the masters seem to have to modify 
the tex file
directly (is this correct?), not being sufficient orgmode to 
culminate the work
by itself. And to learn LaTeX seems a lifelong activity (almost 
like "learning"
orgmode). BTW, when I export to LaTeX although it gets the job 
done, it sends a

lot of error messages.

ODT: I take this one as a lower level solution than LaTeX, but 
it looks easier
to tame, and it even allows to use templates,  for example to 
make reports in
the workplace. Do you think it is worth focusing on ODT 
exporting? Could it be a
definitive solution to publish papers and books directly from 
orgmode? ODT
exporting sends some error message to me, but at least I 
understand it.


HTML: I have seen some themes
<https://olmon.gitlab.io/org-themes/latexcss/latexcss.html> 
designed to export
in LaTeX format using HTML. Here we would have the "definitive 
tool": The power
of LaTeX in the versatility that could give the use of different 
themes for
different purposes. But, do you think it could get, some day, 
the quality of a
direct LaTeX export? No errors by my side when exporting to 
HTML.


How do you think I should spend some hundreds (or thousands) of 
hours to achieve

maestry exporting my documents?

Best regards.



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



Re: source blocks DAG evaluation

2021-03-21 Thread Thomas S. Dye

Aloha c4to,

I would be tempted to use noweb expansion here.

#+name: libB
#+begin_src scheme :results none :noweb yes
<>
(define greetings (string-append hi ", " "to all the people!"))
#+end_src

#+begin_src scheme :session example :results output :noweb yes
<>
(display greetings)
#+end_src

Does this do what you want?

All the best,
Tom

c4t0 writes:


Hi,

Is it possible to have a dependency hierarchy of source blocks?

i.e.: in C, if you use libA from a compilation unit and that 
library needs libB, you don't need to include it in main.c


-> main.c
#include "libB.h"
-> libB.c
#include "libA.h"

you don't need to:
-> main.c
#include "libB.h"
#include "libA.h"

because library headers are closed under inclusion.

I haven't succeeded in doing the same in org-mode. Even after 
populating org-babel-library-of-babel.


Using #+call just doesn't work. Using :var is better, evaluates 
all, but there appears to lack session support, it doesn't check 
for cycles and it feels a little hacky


With #+call I need to do it like this:

#+name: libA
#+begin_src scheme :results none
(define hi "hello")
#+end_src

#+name: libB
#+begin_src scheme :results none
(define greetings (string-append hi ", " "to all the people!"))
#+end_src

here is my "main" I need to C-c C-c in each #+call line and 
write the :session that the code block uses in each one, and do 
it in the correct order. If I C-c C-c in libB first it won't 
eval because 'hi' is not defined.


#+call: libB[:session example]
#+call: libA[:session example]
#+begin_src scheme :session example :results output
(display greetings)
#+end_src

source blocks can be #+call(ed) but aren't closed under #+call 
(a source block can be called but then the callee won't)


instead I would like to :

#+name: libA
#+begin_src scheme :results none
(define hi "hello")
#+end_src

#+call: libA
#+name: libB
#+begin_src scheme :results none
(define greetings (string-append hi ", " "to all the people!"))
#+end_src

#+call: libB
#+begin_src scheme :session example :results output
(display greetings)
#+end_src

- there shouldn't be needed to C-c C-c in the #+call line, 
evaluating the source block alone should suffice.

- there shouldn't be a need to write the :session
  - it should use the session of the user evaled block, unless 
  specified otherwise


In the other hand, using :var with a dummy variable:

#+name: libA
#+begin_src scheme :results none
(define hi "hello")
#+end_src

#+name: libB
#+begin_src scheme :results none :var _=libA
(define greetings (string-append hi ", " "to all the people!"))
#+end_src

#+HEADER: :var _=libB
#+begin_src scheme :session example :results output
(display greetings)
#+end_src

It evals libA then libB and finally the (display greetings) 
code.
But it fails, because the :session example is ignored. Even if I 
add a :session example to every source block (which would be 
really bad, sessión must be decided by the consumer) it doesn't 
work. I think that is because :var expects a value, so it just 
opens a new session to evaluate code every time.


Besides if there are any dependency cycles, it just fails with: 
Lisp nesting exceeds ‘max-lisp-eval-depth’


So if I'm right and there is not an implemented way to do this, 
how can we do it? Adding session support for :var? constructing 
a DAG of #+calls and then evaluating in order? maybe using a new 
header?


COD.



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



Re: Outdated instructions for Org-babel-abc

2021-03-05 Thread Thomas S. Dye

Done.  Thanks.

All the best,
Tom

Wade McReynolds writes:

The babel-languages setup instructions for ABC list the outdated 
"sh t" where they should have "shell t".



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



Re: Problem with custom links

2021-02-12 Thread Thomas S. Dye

Aloha Kyle,

Thanks for taking a look at this, and also for the instructions 
how to test.  I get the results you report.


Separately, off list, John Kitchin kindly noted that my symptoms 
might be caused by org-ref.  A bit of snooping led me to 
understand that org-ref was installed on my system as a dependency 
of emacs-reveal, so the mystery is solved.


I'm happy using the two new keywords; they seem to protect my 
setup from being changed by org-ref.


All the best,
Tom


Kyle Meyer writes:


Thomas S. Dye writes:


Aloha all,

Recently, custom links that I've used for years changed their
behavior.  They used to behave like other org mode links, but 
now
they are displayed in a different color face and are always 
fully

displayed, unless I add two new keywords to
org-link-set-parameters.

  (org-link-set-parameters
   "parencite"

[...]

   :display 'org-link
   :face 'org-link)


I tried this snippet, dropping the :display and :face arguments

  (org-link-set-parameters
   "parencite"
   :follow 'org-ebib-open
   :export (lambda (path desc format)
 (cond
  ((eq format 'html)
   (format "(%s)" path))
  ((eq format 'latex)
   (if (or (not desc) (equal 0 (search "parencite:"
   desc)))
   (format "\\parencite{%s}" path)
 (format "\\parencite[%s][%s]{%s}"
 (cadr (split-string desc ";"))
 (car (split-string desc ";")) 
 path))


with the following buffer:

  [[parencite:foo][bar]]

With an otherwise default configuration and the current master
(49364f904), the link gets fontified with the org-link face and
displayed as just "bar".  So, that seems to be behaving as 
expected and
I don't spot any relevant code change to the handling of the 
defaults in

org-activate-links.

Have you tried to trigger it without any additional 
configuration?



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



Problem with custom links

2021-02-08 Thread Thomas S. Dye

Aloha all,

Recently, custom links that I've used for years changed their 
behavior.  They used to behave like other org mode links, but now 
they are displayed in a different color face and are always fully 
displayed, unless I add two new keywords to 
org-link-set-parameters.


 (org-link-set-parameters
  "parencite"
  :follow 'org-ebib-open
  :export (lambda (path desc format)
(cond
 ((eq format 'html)
  (format "(%s)" path))
 ((eq format 'latex)
  (if (or (not desc) (equal 0 (search "parencite:" 
  desc)))

  (format "\\parencite{%s}" path)
(format "\\parencite[%s][%s]{%s}"
(cadr (split-string desc ";"))
(car (split-string desc ";")) path)
  :display 'org-link
  :face 'org-link)

I added the :display and :face keywords after I stumbled upon a 
list of defined links (which I wish I'd noted because I haven't 
found it since) that indicated that :display was set to 'full 
(which confused me because I'd read that the default was supposed 
to be 'org-link).  Adding these two keywords restores the original 
behavior for me.


I'm wondering why I have to set these keywords to get the default 
behavior?


I did search ORG-NEWS for a relevant entry, but didn't see 
anything that rang a bell.


I hope you and yours are well in the face of the pandemic.

Let me know if you have questions.

All the best,
Tom

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



Re: a few dead links on the babel languages page

2021-01-03 Thread Thomas S. Dye

Aloha,

These should be fixed now.

Thanks,
Tom

Greg Minshall writes:


hi.  here are a few dead links from
https://orgmode.org/worg/org-contrib/babel/languages/index.html

- http://ditaa.org/ditaa/
  - ? s/b http://ditaa.sourceforge.net/

- http://www.mathomatic.org/

- http://www.mozart-oz.org/

cheers, Greg



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



Re: [TIP] Export to LaTeX and HTML with a watermark

2020-12-22 Thread Thomas S. Dye

Nice!

This is the kind of thing I like to find here: 
https://orgmode.org/worg/org-hacks.html


Please consider adding it to Worg!

All the best,
Tom

Juan Manuel Macías writes:


Hi,

Recently, I needed to export a document to both LaTeX and HTML 
with a
watermark background. I came to write this little function (for 
LaTeX,
the 'draftwatermark' package is used; for html, a bit of CSS. 
The
optional arg `text' is the text of the watermark; by default 
what is

printed is "DRAFT"):

#+begin_src org
  ,#+begin_src emacs-lisp :exports results :results none
(defun my-watermark ( text)
  (cond ((org-export-derived-backend-p 
  org-export-current-backend 'latex)

 (concat "#+LaTeX_Header:\\usepackage"
 (if text
			 (format "[text=%s]" (replace-regexp-in-string " " "~" 
text))

   "")
 "{draftwatermark}"))
	((org-export-derived-backend-p org-export-current-backend 
'html)

 (concat "@@html:"
 (if text
 (format "%s" text)
   "DRAFT")
 "@@"

  ,#+end_src
#+end_src

The CSS could be (source:
https://stackoverflow.com/questions/68569/text-watermark-on-website-how-to-do-it):

#+begin_src org
  ,#+html_HEAD: #watermark {color: #d0d0d0; font-size: 
</tt><tt>  200pt; -webkit-transform: rotate(-45deg); -moz-transform: 
</tt><tt>  rotate(-45deg); position: absolute; width: 100%; height: 100%; 
</tt><tt>  margin: 0; z-index: -1; left:-100px; top:-200px;}

#+end_src

And then, this replacement macro:

#+begin_src org
  ,#+MACRO: wmark (eval (if (org-string-nw-p $1)(my-watermark 
  $1)(my-watermark)))

#+end_src

And finally, an example:

#+begin_src org
  {{{wmark(Top secret!)}}}

  Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  accumsan nisl.

  (...)
#+end_src

Regards,

Juan Manuel



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



Re: basic org questions

2020-09-16 Thread Thomas S. Dye
Yes, of course.  But first you need to write a style or class 
file.


All the best,
Tom

Emanuel Berg via General discussions about Org-mode. writes:


Thomas S Dye wrote:


There are many pieces of software that will allow
the user to the violate best typesetting practices
easily. LaTeX is not one of them.


In my experience, you can typeset whatever you want
with LaTeX, and in any way that you want.

non-fiction book:

  https://dataswamp.org/~incal/borta/borta.pdf

math teacher ad:

  https://dataswamp.org/~incal/about/matte.pdf

university paper:

  https://dataswamp.org/~incal/hs-linux/docs/report/report.pdf

(don't even remember what this was supposed to be)

  https://dataswamp.org/~incal/fps/cis/task_flow_demo.pdf



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



Re: basic org questions

2020-09-16 Thread Thomas S. Dye

This is the unix design: let each tool do what it does well.

LaTeX decides how to format and align tables, and it does this 
very well.  Nevertheless, it does this at the level of the 
document class, which decides how tables are formatted and aligned 
for the whole document.  The idea of having a user decide table 
formatting and alignment on a case by case basis is completely 
foreign to the design of LaTeX.  It is also completely foreign to 
the best practices of book design.


There are many pieces of software that will allow the user to the 
violate best typesetting practices easily.  LaTeX is not one of 
them.


hth,
Tom

Emanuel Berg writes:


Matt Huszagh wrote:


Yes, after export to PDF, they are centered.
they = the whole table items.


I think this link
(https://orgmode.org/manual/Tables-in-LaTeX-export.html)
is the relevant part of the documentation.


Yeah, but in LaTeX being left aligned is not some
property of the table, everything is left-aligned,
and if you want it otherwise, you put between
\begin{center} and \end{center} ...



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



Re: Can you automatically noweb include?

2020-08-07 Thread Thomas S. Dye
It works here if you remove the blank line between the headline 
and the PROPERTIES block.


William McCoy writes:


Chuck,

Thanks very much for your response.  I didn't know about those 
options.  When I

use C-c C-v C-i, I get the following:

Lang: python
Properties:
:header-argsnil
:header-args:python nil
Header Arguments:
:cache  no
:exportscode
:hlines no
:noweb  no
:resultsoutput replace
:sessionnone
:tangle no

And C-c C-v C-v, shows that the import statements in the header 
do not get

expanded into the code block.

So I am obviously doing something wrong.  There appear to be no 
typos or
misspellings and the org file containing the coded is exactly 
this:


* Test of prologue header

:PROPERTIES:
:header-args:python+: :prologue "import numpy as np; import os"
:END:

#+BEGIN_SRC python :results output
print(np.__version__)
#+END_SRC

#+RESULTS:


My init file has no org babel header arguments defined.

I am using C-c C-v C-b or C-c C-v C-s to evaluate and I get

"Code block produced no output." in the mini-buffer.


If I use C-c C-c directly on the code block itself I get:

Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'np' is not defined

Is there something else I need to do to get babel to recognize 
the header-args?


Thanks


On 8/7/20 12:51 PM, Berry, Charles wrote:


On Aug 7, 2020, at 8:39 AM, William McCoy  
wrote:


This use of :prologue appeared to me to be very useful.  But 
for some reason when I try it out it does not work for me.  I 
just get a message that the code block produced no output and 
that 'np' is not defined.  Just to check, when I put the 
import statements directly within my code block it works fine.


I am running:  Org mode version 9.3.7 (9.3.7-16-g521d7f-elpa

Any idea what I'm doing wrong?


It is sometimes useful to use C-c C-v C-i to see what header 
args org has detected for a source block. Misspelled words 
sometimes wreak havoc and invisible characters can cause real 
pain.



Also, it helps to use C-c C-v C-v to to see the expanded code 
block. When I do this with Kens' ECM, I get


import numpy as np; import os
print(np.__version__)

in the preview buffer.

HTH,

Chuck



On 8/6/20 2:12 PM, Ken Mankoff wrote:

Actual example:


* Prologue test
:PROPERTIES:
:header-args:python+: :prologue "import numpy as np; import 
os"

:END:

#+BEGIN_SRC python :results output
print(np.__version__)
#+END_SRC

#+RESULTS:
: 1.18.4




On Wed, Aug 5, 2020 at 3:03 PM Ken Mankoff 
 wrote:
What about using :pre or :prologue and setting it at the 
header or document level?


Please excuse brevity. Sent from tiny pocket computer with 
non-haptic-feedback keyboard.


On Wed, Aug 5, 2020, 14:22 George Mauer  
wrote:

Use case:

I'm using ob-racket but this would apply just as well to a 
few other workflows I have with python or js.


I would like to write a helper function in a src block and 
then automatically have access to it in other src blocks 
further down the document. I don't really want a stateful 
session (nor does ob-racket support sessions) so I 
essentially want the equivalent of automatically including it 
everywhere so I don't have to type it out all the time (and 
have it screw up syntax coloring/indentation).


Is this currently possible? Does anyone have any ideas for 
how to extend things so it is?





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



Re: [PATCH] Add margin option to float for figure in ox-latex.el

2020-05-17 Thread Thomas S. Dye

Aloha Kyle,

Barring a guru's user-end customization, Rasmus's figure 
:environment attribute idea is a good one.


The LaTeX float package has a facility to create and name 
environments that are handled like figures.  A figure :environment 
attribute in Org mode would provide a straightforward and flexible 
path to transcode them.


Thanks for looking into this.

Let me know if you have questions.

All the best,
Tom

Kyle Meyer writes:


Thomas S. Dye writes:

This patch produces a LaTeX environment, marginfigure, that 
isn't

part of the standard.  AFAIK, marginfigure is defined in the
sidenotes package and separately in the tufte-latex class, 
neither
of which Org mode loads by default.  If the patch is applied, 
then
one of these packages should be added to the list of default 
LaTeX
packages so ox-latex doesn't export code it is unable to 
compile.


My takeaway from the discussion surrounding ox-tufte-latex 
several
years ago is that support for non-standard LaTeX constructs 
should
not be part of Org mode core because they complicate 
maintenance

unduly.


Thanks for your input and the helpful summary.  The stance in 
the second

paragraph sounds like a sensible one.

Given the desire to use the marginfigure environment has popped 
up a few
times, I wonder if an ox-latex guru can suggest a user-end 
customization
that would enable the use of that environment.  I suppose an 
alternative
is Rasmus's proposal of an :environment attribute for figures 
[*] that I

mentioned in a sibling thread.

[*]: https://yhetil.org/orgmode/878u31ycc5@gmx.us/



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



Re: [PATCH] Add margin option to float for figure in ox-latex.el

2020-05-16 Thread Thomas S. Dye

Aloha Kyle,

This patch produces a LaTeX environment, marginfigure, that isn't 
part of the standard.  AFAIK, marginfigure is defined in the 
sidenotes package and separately in the tufte-latex class, neither 
of which Org mode loads by default.  If the patch is applied, then 
one of these packages should be added to the list of default LaTeX 
packages so ox-latex doesn't export code it is unable to compile.


My takeaway from the discussion surrounding ox-tufte-latex several 
years ago is that support for non-standard LaTeX constructs should 
not be part of Org mode core because they complicate maintenance 
unduly.


I haven't used ox-tufte-latex since I last used paper handouts at 
a presentation several years ago, so I don't know if it still 
works.  However, it really was cobbled together, a process that 
involved copying big chunks of Org mode code.  I knew then this 
approach is sub-optimal, but never found the time to puzzle out 
how to turn it into advice that could sit on top of a possibly 
changing code base.


Also, FYI, I found the tufte-latex class a bit difficult to use. 
Objects in the margin can easily overwrite one another and the 
author has to fix these manually, which can be tricky.  The upside 
is that when everything is right, the output can be terrific to 
look at.


All the best,
Tom

Kyle Meyer writes:


Pablo Palazon writes:

I've created a path to add a new option to float properties for 
figures on
latex. This is my first change for org-mode, and I don't really 
sure if

this is the correct way to do it.


Thank you!

* lisp/ox-latex.el (org-latex--inline-image): Include margin 
option
to create marginfigure environment for figures. It's useful for 
tufte
latex class, where with this environment shows the figure in 
the margin.


I wondered if something like this had been proposed or discussed 
before.
Searching the list, I see a patch [0] very similar to yours from 
a
couple of months back that didn't get a response (author added 
to cc).


Further back, there is a thread about an exporter Thomas Dye 
(+cc) wrote
to handle marginfigure and some other Tufte-y things [1].  It 
looks like
the code is available at 
<https://github.com/tsdye/tufte-org-mode>,

though I'm not sure if it still works with the current Org.

As for the proposed patch, while I think the specific code 
change itself
looks fine, skimming through the above thread makes me think 
that adding
marginfigure to ox-latex.el without considering similar cases 
may not be

the right approach.  What do others think?


[0]: 
https://yhetil.org/orgmode/35aac187-b751-5723-0f15-be6605fb8...@free.fr/

[1]: https://yhetil.org/orgmode/m2h9hsgdo2@tsdye.com/



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



Solved inline image problem from 2015

2020-04-14 Thread Thomas S. Dye

Aloha all,

Five (!) years ago, I came to the list with a problem toggling 
inline image display.  No matter what I did, images were displayed 
in the buffer.  Despite some good help from Rasmus, I wasn't able 
to solve the problem at that time.


A few years ago, I noticed the problem is restricted to png files, 
which I was exporting from R.  For a long while I solved the 
problem by not exporting png files :)


Recently, I needed png files again and ran into my old problem. 
Toggling inline images had no effect on the png files, which were 
always displayed in the buffer.


It appears the problem has to do with interlacing in the png file. 
I used ImageMagick to get rid of the interlacing --- mogrify 
-interlace none *.png.  Fixed!


All the best,
Tom

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



Re: rmarkdown-like production of multiple plots in org

2020-03-31 Thread Thomas S. Dye

Aloha Matt,

A guess based on my experience with ggplot2 is that the 
auto-naming and saving take place in the functions plot2() and 
plot4().  If so, then calling them from Org mode babel blocks will 
also get you auto-naming and saving.


I think you're right that you'll need to put each of the plots in 
its own babel source code block and then set up the html export to 
your satisfaction.  IIUC, these are the prices one pays for 
working in a system like Org mode which is both language agnostic 
and export target agnostic.  The rmarkdown/rstudio solution is 
nifty, but it is tied to one language and one export target.


hth,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Re: :tangle header argument not picked up in #+PROPERTY line or :PROPERTIES: block

2020-03-30 Thread Thomas S. Dye

Aloha Joost,

This link reflects my understanding of how properties accumulate, 
rather than overwrite: 
https://org-babel.readthedocs.io/en/latest/header-args/


hth,
Tom

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



Re: LaTeX export failure

2020-01-30 Thread Thomas S. Dye

Thanks Eric,

Good to know.  I'll try to track down the issue when I find time.

All the best,
Tom

Fraga, Eric writes:


On Wednesday, 29 Jan 2020 at 15:22, Thomas S. Dye wrote:

Here is the offending bit, which worked fine last November but
fails today:

 #+caption: Compare figure\nbsp{}[[fig:mqs3_op]].


This works fine for me.  Sorry; that probably doesn't help you
much... :-(



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



Re: LaTeX export failure

2020-01-29 Thread Thomas S. Dye

Thanks John,

IIRC, this isn't the first time you've recommended that I divide 
and conquer :)


Here is the offending bit, which worked fine last November but 
fails today:


#+caption: Compare figure\nbsp{}[[fig:mqs3_op]].

All the best,
Tom

John Hendy writes:

On Wed, Jan 29, 2020 at 2:32 PM Thomas S. Dye  
wrote:


Happy New Year!

Returning to a writing project after a few months absence, I'm 
no
longer able to export the writing project subtree.  Here is 
what I

find in *Messages*:

  Wrote /home/dk/Projects/historical-inference/r14c.org
  executing Shell code block...
  Wrote /tmp/babel-j0SOWm/ob-input-aS23DO
  Code block evaluation complete.
  match-string-no-properties: Args out of range: #  buffer>,

  3, 11



Are you able to share a portion of this? Or have you tried, say,
creating a copy of the file and removing all but the first 
heading and

a sentence to see if it fails?

Someone else might recognize that particular failure from past
experience, but I'd have to try something locally. In the past 
to
debug I've moved all headings after the first under a new one, 
marked
that as :noexport:, and exported iteratively, moving each one 
out of
the :noexport: heading until I find the offending one. Then I 
can hone

in on where I should be looking.

John


The writing project exported without issue on November 7, 2019.

I'm typically using up-to-date org-plus-contrib from Elpa, so
suspect my issue is due to a recent change in Org mode.

I don't know how to track down the problem.  Any ideas?

All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye




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



LaTeX export failure

2020-01-29 Thread Thomas S. Dye

Happy New Year!

Returning to a writing project after a few months absence, I'm no 
longer able to export the writing project subtree.  Here is what I 
find in *Messages*:


 Wrote /home/dk/Projects/historical-inference/r14c.org
 executing Shell code block...
 Wrote /tmp/babel-j0SOWm/ob-input-aS23DO
 Code block evaluation complete.
 match-string-no-properties: Args out of range: #, 
 3, 11


The writing project exported without issue on November 7, 2019.

I'm typically using up-to-date org-plus-contrib from Elpa, so 
suspect my issue is due to a recent change in Org mode.


I don't know how to track down the problem.  Any ideas?

All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



Fwd: Re: Finally figuring out some ob-sqlite stuff -- for worg?

2019-11-09 Thread Thomas S. Dye

Cancel that, I was looking at a cached version of the page.

Thanks again for the documentation.

All the best,
Tom

Thomas S. Dye writes:

Okay, it's up. If anyone wants to explain to me the point of 
the

"where
exists" clause in the SQL, I would be interested to hear. It
works as
expected this way, but is that clause necessary?


The 'if exists' clause protects against an SQLite error raised 
if
you ask to delete a table that doesn't exist.  The code will 
work
without it if the table exists, but will exit without creating 
the

table if not.

Thanks for a useful addition to the Org babel SQLite
documentation.  I agree with you that Org mode tables are a
convenient way to enter SQL data, keeping in mind that table
columns can't be rearranged without changes to the SQL code.

All the best,
Tom



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



Re: Finally figuring out some ob-sqlite stuff -- for worg?

2019-11-09 Thread Thomas S. Dye



Okay, it's up. If anyone wants to explain to me the point of the 
"where
exists" clause in the SQL, I would be interested to hear. It 
works as

expected this way, but is that clause necessary?


The 'if exists' clause protects against an SQLite error raised if 
you ask to delete a table that doesn't exist.  The code will work 
without it if the table exists, but will exit without creating the 
table if not.


Thanks for a useful addition to the Org babel SQLite 
documentation.  I agree with you that Org mode tables are a 
convenient way to enter SQL data, keeping in mind that table 
columns can't be rearranged without changes to the SQL code.


All the best,
Tom

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



Re: Finally figuring out some ob-sqlite stuff -- for worg?

2019-11-07 Thread Thomas S. Dye

Aloha Eric,

Good news.  Yes, please feel free to update the Worg SQLite page.

IIRC, you can get permission from Bastien to push changes and then 
you can edit Worg at will.


All the best,
Tom

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



Re: [O] change font-size in python plots depending on context

2019-08-19 Thread Thomas S. Dye

Aloha Johanna May,

This works:

#+name: fs
#+BEGIN_SRC emacs-lisp
10
#+END_SRC

#+RESULTS: fs
: 10

#+header: :var fontsize=fs() :results output
#+begin_src python
print(fontsize)
#+end_src

#+RESULTS:
: 10

Note "fs()" instead of "fs".

All the best,
Tom

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



[O] noweb strip-export

2019-06-26 Thread Thomas S. Dye

Aloha all,

The noweb strip-export setting leaves empty lines in the export.

I have this ecm:

 #+name: foo
 #+begin_src elisp
 (+ 1 1)
 #+end_src

 #+name: bar
 #+header: :noweb strip-export
 #+begin_src elisp
 <>
 (+ 2 2)
 #+end_src

LaTeX export renders this:

 \begin{minted}[fontsize=\footnotesize]{elisp}
 (+ 1 1)
 \end{minted}

 \begin{minted}[fontsize=\footnotesize]{elisp}

 (+ 2 2)
 \end{minted}

Note the blank line before (+ 2 2).

I'd like this LaTeX output:

 \begin{minted}[fontsize=\footnotesize]{elisp}
 (+ 1 1)
 \end{minted}

 \begin{minted}[fontsize=\footnotesize]{elisp}
 (+ 2 2)
 \end{minted}

Is it possible?

All the best,
Tom

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



[O] Bug in LaTeX export?

2019-06-13 Thread Thomas S. Dye

Aloha all,

I have this in my Org mode file:

#+name: tab:hanamiai-oxcal-files
#+attr_latex: :font \footnotesize :environment longtable :booktabs
#+caption: =OxCal= input files for the Hanamiai models

And this in the exported LaTeX file:

{\footnotesize
\begin{longtable}{lll}
\caption{\label{tab:orgf695a5d}
\texttt{OxCal} input files for the Hanamiai models}
\\

The linebreak at the end of the \caption line introduces a space 
before the caption in the list of tables.  I can get rid of the 
space like this:


{\footnotesize
\begin{longtable}{lll}
\caption{\label{tab:orgf695a5d}%
\texttt{OxCal} input files for the Hanamiai models}
\\

Note the % at the end of the \caption line.

A bug, or something in my setup?

All the best,
Tom
--
Thomas S. Dye
http://tsdye.online/tsdye



Re: [O] Key bindings for Org export back-ends?

2019-02-08 Thread Thomas S. Dye

One place for the list of key bindings might be here:
https://orgmode.org/worg/exporters/index.html

All the best,
Tom


Re: [O] Bug: Babel :var order affects :colnames [9.2 (9.2-41-g010a35-elpaplus @/home/dk/.emacs.d/elpa/org-plus-contrib-20190122/)]

2019-01-28 Thread Thomas S. Dye

Aloha all,

Answering myself.  This bug is known and was discussed several years 
ago:


From: Myles English
Subject: Re: [O] babel R: should/does order of parameters matter?
Date: Tue, 29 Mar 2011 16:57:37 +0100

Apparently, ob-R wants tables to be passed to parameters that are early 
in the parameter list.


Also, ob-R expects all the cells in a table to be non-empty.  An empty 
table cell raises Cain.


Argh.

All the best,
Tom


Re: [O] Easy templates broken with 9.2

2019-01-27 Thread Thomas S. Dye

Aloha Chuck,

That is helpful.  Thanks.

All the best,
Tom


[O] Easy templates broken with 9.2

2019-01-27 Thread Thomas S. Dye

Aloha LB,

I'm working my way through this change, too, hunting down all the 
places I've modified org-structure-template-alist.  You'll need to get 
rid of the templates you've added to this list.  The new function won't 
run if it finds an old-style template on the list.


Once the list is clean, the new function offers the possibility of 
selecting some text, then hitting C-c C-, and choosing a structure that 
encloses the selected text.  This is quite handy.


I had a number of one-line templates that I haven't figured out how to 
replace yet.  Any suggestions are welcome.


hth,
Tom


[O] Bug: Babel :var order affects :colnames [9.2 (9.2-41-g010a35-elpaplus @ /home/dk/.emacs.d/elpa/org-plus-contrib-20190122/)]

2019-01-24 Thread Thomas S. Dye




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.


I expect =colnames-bug-bad= to parse =test-table= like 
=colnames-bug-good=.  The only difference is the order of :var 
assignments.


 ECM
#+name: colnames-bug-bad
#+header: :var str="Foo" :var tab=test-table
#+header: :colnames yes
#+BEGIN_SRC R
data.frame(tab)
#+END_SRC

#+RESULTS: colnames-bug-bad
| cell.1 | cell.2 |
|+|

#+name: colnames-bug-good
#+header: :var tab=test-table :var str="Foo"
#+header: :colnames yes
#+BEGIN_SRC R
data.frame(tab)
#+END_SRC

#+RESULTS: colnames-bug-good
| head.1 | head.2 |
|+|
| cell.1 | cell.2 |

#+name: test-table
| head.1 | head.2 |
|+|
| cell.1 | cell.2 |

Let me know if you have questions.

All the best,
Tom


Emacs  : GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ 
Version 3.22.30)

of 2018-05-28
Package: Org mode version 9.2 (9.2-41-g010a35-elpaplus @ 
/home/dk/.emacs.d/elpa/org-plus-contrib-20190122/)

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



Re: [O] typo, sp at C++ Source Code Blocks in Org Mode

2018-11-10 Thread Thomas S. Dye

Aloha Van L,


On Sat, Nov 10, 2018 at 12:17 AM, Van L  wrote:


 AFAIK there is no mechanism to have changes in  one propagate 
changes in the other.


It should be possible to link the two because both are org files.

Worg would need to render to info:worg.


That's an interesting idea.  AFAICT it should be possible.  
Nevertheless, my guess is that it would be a lot of work to mark up the 
Worg sources to get well-formatted info output.


All the best,
Tom


Re: [O] typo, sp at C++ Source Code Blocks in Org Mode

2018-11-09 Thread Thomas S. Dye

Aloha Van L,

Thanks for your contribution.

The Org mode manual and Worg are separate documents.  AFAIK there is no 
mechanism to have changes in  one propagate changes in the other.


If you'd like to propose a change to the manual, please submit a patch 
following the instructions here: 
https://orgmode.org/worg/org-contribute.html.


All the best,
Tom


Re: [O] typo, sp at C++ Source Code Blocks in Org Mode

2018-11-05 Thread Thomas S. Dye

Aloha  Van L,

Worg is maintained by the community.  You can find information on how 
to make these changes yourself:


https://orgmode.org/worg/worg-git.html

Thanks for your interest in Org mode and Worg.

All the best,
Tom




[O] ox-hugo-like "DWIM" cope for other exporters?

2018-09-29 Thread Thomas S. Dye

Aloha Matt,

I've often wished LaTeX export had this capability.  I'd certainly be 
happy if this were a feature of all the exporters.


All the best,
Tom


Re: [O] ox-hugo, 2 questions

2018-06-09 Thread Thomas S. Dye

Aloha Kaushal,

Kaushal Modi writes:


It's difficult to tell. Can you share a git repo with a minimal 
site (just
the config.toml and the Org content files would do). I will try 
reproducing
the issue locally using ox-hugo plus the ox-hugo test site 
theme:

https://github.com/kaushalmodi/hugo-bare-min-theme.

I have a "sandbox" site where you can see an example of _index. 
See for

"_index" here:
https://gitlab.com/kaushalmodi/hugo-sandbox/raw/master/content-org/sandbox.org.
That example also happens to have an image on the home page, 
though I am
inserting that image in the layout file itself using the 
.Resources Hugo

method.

Here is the outcome: https://hugo-sandbox.netlify.com/.


Many thanks for this kind offer.  Will do, if I can't figure it 
out.


Just putting this custom figure.html in your site's 
layouts/shortcodes/
directory (which will override the inbuilt figure shortcode) 
will fix this

second issue.


Yes, it works like magic!

Hope this helps. For future, you can ask ox-hugo questions 
directly at

https://github.com/kaushalmodi/ox-hugo/issues.

I don't mind Hugo-related questions there too. But just so that 
you know
the Hugo Discourse forum is pretty active too: 
https://discourse.gohugo.io/.


OK, will do.

All the best,
Tom

--
Thomas S. Dye
http://www.tsdye.com



[O] ox-hugo, 2 questions

2018-06-09 Thread Thomas S. Dye

Aloha all,

1) Is this the correct way to get an image in the homepage branch 
bundle?


I have this in the org file:

* Homepage
 :PROPERTIES:
 :EXPORT_HUGO_SECTION:
 :EXPORT_FILE_NAME: index
 :END:

[[/bldg-1-5-sequence-distance-1332+-small.png]]

This is the markdown export:

+++
title = "Homepage"
author = ["Thomas S. Dye"]
lastmod = 2018-06-09T09:32:43-10:00
draft = false
+++

{{< figure src="/bldg-1-5-sequence-distance-1332+-small.png" >}}

I don't see an image on the home page.  Perhaps this is an issue 
with the theme I'm using (material-docs)?


2) Can I have links in figure captions?

I have this in the org file:

#+name: fig-12-sequence
#+caption: Stratigraphic DAG for the information on Figure 
[[fig-12-section]].

[[file:/fig-12-sequence.png][file:/fig-12-sequence-small.png]]

This is the markdown export:

{{< figure src="/fig-12-sequence-small.png" caption="Figure 2: 
Stratigraphic DAG for the information on Figure [1](#org1658d1e)." 
link="/fig-12-sequence.png" >}}


All the best,
Tom

--
Thomas S. Dye
http://www.tsdye.com



Re: [O] Moving from Jekyll to Orgmode

2018-05-09 Thread Thomas S. Dye

Aloha ST,

ST writes:


Is the difficulty to setup ox-publish the sole disadvantage vis.
ox-hugo/ox-jekyll/etc.? Is the functionality the same 
more_or_less?


What ox-hugo devs/users have to say on this?


I enjoy the hugo server.  Make a change to the org mode file, 
export with ox-hugo, and then look at the web browser to see the 
effect of the change.  It makes the work much easier, IMHO.


All the best,
Tom

--
Thomas S. Dye
http://www.tsdye.com



  1   2   3   4   5   6   7   8   9   10   >