[ANN] org-ql 0.4 released

2020-01-23 Thread Adam Porter
Hi friends,

FYI, I've released org-ql 0.4.  It includes many improvements since 0.3.

https://github.com/alphapapa/org-ql

Thanks,
Adam




Re: Latex export: setting options for packages included by default

2020-01-23 Thread John Kitchin
Is this package listed in org-latex-default-packages-alist?

If so, you might try something like:

#+BEGIN_SRC emacs-lisp
(let ((org-latex-default-packages-alist org-latex-default-packages-alist))
  (setf (nth (seq-position org-latex-default-packages-alist "color"
   (lambda (a b) (string= b (nth 1 a
 org-latex-default-packages-alist)
'("monochrome" "color" nil))
  (org-latex-export-to-pdf))
#+END_SRC

I think that would be a temporary modification just for the export.

Alternatively, you might define a new latex class like this:

(add-to-list 'org-latex-classes
 '("article-monochrome"
   "\\documentclass{article}
\\PassOptionsToPackage{monochrome}{color}
 [DEFAULT-PACKAGES]
 [PACKAGES]
 [EXTRA]"
   ("\\section{%s}" . "\\section*{%s}")
   ("\\subsection{%s}" . "\\subsection*{%s}")
   ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
   ("\\paragraph{%s}" . "\\paragraph*{%s}")
   ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

and then specify #+LATEX_CLASS: article-monochrome in the org-file.

Jarmo Hurri  writes:

> Greetings.
>
> When I export to Latex, org automatically creates the following line in
> preamble:
>
> \usepackage{color}
>
> I would like to find a way to pass option [monochrome] to this
> package. Adding another \usepackage creates a conflict. My preferred way
> would be to add the line
>
> \PassOptionsToPackage{monochrome}{color}
>
> to the preamble before \usepackage.
>
> 1. Is there a way to do this (easily) in Org? I think it is possible to
>redefine the preamble template, but that would be an overkill.
>
> 2. If there is no direct option for this, could we have one? Like
>#+latex_header but which would be applied before any packages are
>loaded?
>
> Jarmo


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



Re: code.orgmode.org

2020-01-23 Thread Nick Dokos
Robert Klein  writes:

> Hi,
>
> Gogs config does the trace automatically due to a configuration
> inheritance issue (cf. https://github.com/gogs/gogs/issues/5007).
>
> I added the following lines to the custom/conf/app.ini file and
> restarted gogs:
>
>
> [log.file]
> LEVEL = Info
>
>
> Btw. the trace was afaik on all the time.  Dunno why it started to show
> up in the web interface only now.
>

I was seeing all sorts of problems last night, but it seems to work
now.

The problems sometimes manifested themselves with TRACE output that complained
about "pipe2: too many file descriptors open" (this is from memory, so take it
with the appropriate grain of salt) and sometimes by getting a 500 page.

Thanks for fixing it!

>
> On Wed, 22 Jan 2020 18:37:38 -0500
> Nick Dokos  wrote:
>
>> Somebody seems to be playing with stuff on code.orgmode.org: every
>> once in a while when I look at the repo (e.g by visiting
>> https://code.orgmode.org/bzg/org-mode), I get a literal HTML page,
>> instead of a rendered one. That seems to be caused by some extra text
>> at the beginning:
>> 
>> ,
>> | 2020/01/22 23:14:06 [TRACE] Session ID: 6961d7733328363f
>> | 2020/01/22 23:14:06 [TRACE] CSRF Token:
>> CMr9jiGTHiieFuGUEVds1J-EeOg6MTU3OTcyODI2MzgzMDMwMzA3OA== | HTTP/1.0
>> 200 OK | Content-Type: text/html; charset=UTF-8
>> | Date: Wed, 22 Jan 2020 23:14:07 GMT
>> | 
>> | 
>> | 
>> | ...
>> | 
>> `
>> 
>> The TRACE lines seem to indicate that somebody is trying to debug
>> something, but it's killing the website. Has anybody seen that? Does
>> anybody know what is going on?
>> 
>> Thanks!
>
>
>

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: noweb

2020-01-23 Thread Nick Dokos
"Fraga, Eric"  writes:

> My approach to this is to create three blocks that are tangled and a
> separate block (or more than one if you have different tests you want to
> perform) for evaluation that references those three blocks (via noweb)
> but is not tangled.

That works, but shouldn't Nuno's approach with :noweb eval work? What use
is it to include unexpanded noweb markers in the tangled output?

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Latex export: setting options for packages included by default

2020-01-23 Thread Jarmo Hurri


Greetings.

When I export to Latex, org automatically creates the following line in
preamble:

\usepackage{color}

I would like to find a way to pass option [monochrome] to this
package. Adding another \usepackage creates a conflict. My preferred way
would be to add the line

\PassOptionsToPackage{monochrome}{color}

to the preamble before \usepackage.

1. Is there a way to do this (easily) in Org? I think it is possible to
   redefine the preamble template, but that would be an overkill.

2. If there is no direct option for this, could we have one? Like
   #+latex_header but which would be applied before any packages are
   loaded?

Jarmo




Bug: [[info:org#Org Mobile]] should mention org-tag-persistent-alist [9.3.1 (9.3.1-elpaplus @ /home/jorge/.emacs.d/elpa/26.3/develop/org-plus-contrib-20191230/)]

2020-01-23 Thread Jorge P. de Morais Neto
Hi.  I believe [[info:org#Org Mobile]] should mention
org-tag-persistent-alist, saying whether it is examined or not.

Regards

Emacs  : GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.13)
Package: Org mode version 9.3.1 (9.3.1-elpaplus @ 
/home/jorge/.emacs.d/elpa/26.3/develop/org-plus-contrib-20191230/)
-- 
- 
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z.
- Free/libre software for Replicant, LineageOS and Android: https://f-droid.org
- [[https://www.gnu.org/philosophy/free-sw.html][What is free software?]]



Re: code.orgmode.org

2020-01-23 Thread Bastien
Hi Robert,

thanks a lot for fixing this.

I will take some time to update gogs this week.

All best,

-- 
 Bastien



Re: ob-scheme haunted source code block?

2020-01-23 Thread Joost Kremers



On Tue, Jan 21 2020, Neil Jerram wrote:
OK, up to this point I am thinking: this is all quite curious, 
but
presumably not really a big problem, as you surely don't need to 
use this

rather strange workflow...


Mind you, that's not my normal workflow. I normally just do =C-'= 
to edit a source block, =C-'= to finish the edit and return to the 
Org file, and then =C-c C-c= to evaluate the source block. The 
rest was just to try and find out where the problem lies.


The weirdest thing about this is that the problem is 
persistent. I
restarted Emacs and in my desperation even rebooted the 
computer,

but to no avail.


But this is indeed weird.  Are you saying that you can reboot 
your
computer, restart Emacs, open the relevant Org file, evaluate 
the source

block (without any C-c ') and you still see the problem?


Yes, that was what was happening. I suspected there might be some 
history being kept somewhere, that's why I grepped through my 
=~/.emacs.d/= directory.


If so, I wonder if it's a real but intermittent problem in your 
code that
was somehow made more likely by the original workflow, and now 
you're just

being unlucky?


The code was fairly straightforward (and not even mine... It came 
directly from SICP), so I doubt that had much to do with it.


Anyway, I'm gonna have to put this down as a Heisenbug. The 
problem disappeared after a while and I can't reproduce it: Going 
through the steps that I thought triggered the bug doesn't 
recreate it. Weird.


Thanks for reading and apologies for wasting everyone's time...

Joost



Re: code.orgmode.org

2020-01-23 Thread Robert Klein
Hi,

Gogs config does the trace automatically due to a configuration
inheritance issue (cf. https://github.com/gogs/gogs/issues/5007).

I added the following lines to the custom/conf/app.ini file and
restarted gogs:


[log.file]
LEVEL = Info


Btw. the trace was afaik on all the time.  Dunno why it started to show
up in the web interface only now.


Best regards
Robert


On Wed, 22 Jan 2020 18:37:38 -0500
Nick Dokos  wrote:

> Somebody seems to be playing with stuff on code.orgmode.org: every
> once in a while when I look at the repo (e.g by visiting
> https://code.orgmode.org/bzg/org-mode), I get a literal HTML page,
> instead of a rendered one. That seems to be caused by some extra text
> at the beginning:
> 
> ,
> | 2020/01/22 23:14:06 [TRACE] Session ID: 6961d7733328363f
> | 2020/01/22 23:14:06 [TRACE] CSRF Token:
> CMr9jiGTHiieFuGUEVds1J-EeOg6MTU3OTcyODI2MzgzMDMwMzA3OA== | HTTP/1.0
> 200 OK | Content-Type: text/html; charset=UTF-8
> | Date: Wed, 22 Jan 2020 23:14:07 GMT
> | 
> | 
> | 
> | ...
> | 
> `
> 
> The TRACE lines seem to indicate that somebody is trying to debug
> something, but it's killing the website. Has anybody seen that? Does
> anybody know what is going on?
> 
> Thanks!




automatic completion of file tags

2020-01-23 Thread Alan Schmitt
Hello,

I'm playing with an implementation of Zettelkasten using deft and org
files, and I want to tag each note with some tags taken from a list (I'm
using the ~#FILETAGS:~ line for that at the moment). Is there a builtin
org way of doing it (have a list of tags defined somewhere and tag a
whole file with them using some completion mechanism, as for headlines),
or do I need to roll up my own?

Thanks,

Alan