Re: [PATCH] ob-sql.el support auto set sql-product in editing sql-mode src block buffer

2020-02-11 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


Hmmm.. Just a gentle ping ... This might is been missed  Let me resume this 
thread.

stardiviner  writes:

> I tried to write an alist of all database names. and write an function to used
> to match name to possible names. But I found this solution is a little kind of
> complicated.
>
> Another simple solution is just add an duplicate code of "postgresql" for 
> alias
> "postgres". Because I found only one exception "postgresql" is "postgres" in
> ~sql-mode~ products alist. Other database names are matched with ~sql-mode~.
>
> So I decided to take the simpler solution. I attached patch in the email 
> attachment.
>
> # 
> ==
>
> BTW, I'm still not good at Elisp, can't write out a good solution for 
> translate
> and matching for database names.
>
> Here is my temporary databases alist:
>
> #+begin_src diff
> modified   lisp/ob-sql.el
> @@ -87,6 +87,52 @@ (defconst org-babel-header-args:sql
>  (database   . :any))
>"SQL-specific header arguments.")
>  
> +(defcustom org-babel-sql-engines-alist nil
> +  "Alist of engine names for :engine header argument.
> +
> +It is an alist data structure: ( . (list of alias names)).
> +Merged with sql-mode's `sql-product-alist'."
> +  :type '(alist :key-type symbol :value-type list)
> +  :group 'org-babel)
> +
> +;;; initialize `org-babel-sql-engines-alist'
> +(dolist (product (mapcar 'car sql-product-alist))
> +  (pcase product
> +(`ansi
> + (add-to-list 'org-babel-sql-engines-alist (cons 'ansi (list 'ansi
> +(`sqlite
> + (add-to-list 'org-babel-sql-engines-alist (cons 'sqlite (list 
> 'sqlite
> +(`mysql
> + (add-to-list 'org-babel-sql-engines-alist (cons 'mysql (list 'mysql
> +(`mariadb
> + (add-to-list 'org-babel-sql-engines-alist (cons 'mariadb (list 'mariadb 
> 'maria
> +(`postgresql
> + (add-to-list 'org-babel-sql-engines-alist (cons 'postgresql (list 
> 'postgresql 'postgres
> +(`oracle
> + (add-to-list 'org-babel-sql-engines-alist (cons 'oracle (list 
> 'oracle
> +(`mssql
> + (add-to-list 'org-babel-sql-engines-alist (cons 'mssql (list 'mssql 
> 'ms
> +(`dbi
> + (add-to-list 'org-babel-sql-engines-alist (cons 'dbi (list 'dbi
> +(`monetdb
> + (add-to-list 'org-babel-sql-engines-alist (cons 'monetdb (list 
> 'monetdb
> +(`sqsh
> + (add-to-list 'org-babel-sql-engines-alist (cons 'sqsh (list 'sqsh
> +(`vertica
> + (add-to-list 'org-babel-sql-engines-alist (cons 'vertica (list 
> 'vertica
> +(`db2
> + (add-to-list 'org-babel-sql-engines-alist (cons 'db2 (list 'db2
> +(`infomix
> + (add-to-list 'org-babel-sql-engines-alist (cons 'infomix (list 
> 'infomix
> +(`ingres
> + (add-to-list 'org-babel-sql-engines-alist (cons 'ingres (list 
> 'ingres
> +(`interbase
> + (add-to-list 'org-babel-sql-engines-alist (cons 'interbase (list 
> 'interbase
> +(`solid
> + (add-to-list 'org-babel-sql-engines-alist (cons 'solid (list 'solid
> +(`sybase
> + (add-to-list 'org-babel-sql-engines-alist (cons 'sybase (list 
> 'sybase))
> +
>  (defun org-babel-expand-body:sql (body params)
>"Expand BODY according to the values of PARAMS."
>(org-babel-sql-expand-vars
>
> #+end_src
>
> I don't know how to write a translation function for alist to be used in 
> function ~org-babel-execute:sql~.
>
> #+begin_src emacs-lisp :eval no
> (defun org-babel-execute:sql (body params)
>   "Execute a block of Sql code with Babel.
> This function is called by `org-babel-execute-src-block'."
>   (let* ((result-params (cdr (assq :result-params params)))
>  (cmdline (cdr (assq :cmdline params)))
>  (dbhost (org-babel-find-db-connection-param params :dbhost))
>  (dbport (org-babel-find-db-connection-param params :dbport))
>  (dbuser (org-babel-find-db-connection-param params :dbuser))
>  (dbpassword (org-babel-find-db-connection-param params :dbpassword))
>  (database (org-babel-find-db-connection-param params :database))
>  (engine (cdr (assq :engine params)))
>  (colnames-p (not (equal "no" (cdr (assq :colnames params)
>  (in-file (org-babel-temp-file "sql-in-"))
>  (out-file (or (cdr (assq :out-file params))
>(org-babel-temp-file "sql-out-")))
>(header-delim "")
>  (command (pcase (intern engine)
> (`dbi (format "dbish --batch %s < %s | sed '%s' > %s"
> (or cmdline "")
> (org-babel-process-file-name in-file)
> "/^+/d;s/^|//;s/(NULL)/ /g;$d"
> (org-babel-process-file-name out-file)))
> (`monetdb (format "mclient -f tab %s < %s > %s"
> 

Making info gives error

2020-02-11 Thread Colin Baxter


Making info in org-version: 9.3.4 (release_9.3.4-273-g4028cc) gives the
error:

Loading /home/redknight/git/org-mode/mk/org-fixup.el (source)...
Undefined Org macro: kdb; aborting
Makefile:31: recipe for target 'org.texi' failed
make[1]: *** [org.texi] Error 255
make[1]: Leaving directory '/home/redknight/git/org-mode/doc'
mk/targets.mk:127: recipe for target 'info' failed
make: *** [info] Error 2


Best wishes.

Colin.

-- 
Colin Baxter
www.Colin-Baxter.com




On writing a theme for raw-notes prose legibility

2020-02-11 Thread Texas Cyberthal
I already like and use Leuven themes:
https://github.com/fniessen/emacs-leuven-theme

It appears to be the correct normie-noob choice. Maybe some raw-notes
prose features would fit there. Emacs has many use cases, calling for
different settings. But Leuven already has some customize settings, so
flexibility is possible. It's already doing more than just
color-theming.

Duplication of effort between many themes is an issue, but this
appears to solve it:
https://github.com/jonnay/org-beautify-theme/

Doubtless some components of the normie-noob intake funnel should go
to Spacemacs, others to Org, others to Emacs, others to theme, others
to separate packages. Leuven is a good option I didn't consider.



Re: org-timer-set-timer from any buffer

2020-02-11 Thread Kyle Meyer
Bastien  writes:

> Kyle Meyer  writes:
>
>> Ian already addressed it with the patch at
>> ,
>> which was applied as 044e9718c (org-timer.el: Allow org-timer-set-timer
>> from non-Org buffers, 2019-11-16).
>
> Thanks!  I didn't read the whole thread as I should have, thanks for
> applying this.

It happened in a separate thread, so there wasn't much hope for it to be
linked up.  I should have sent a message here for posterity when I
applied the patch.



Re: org-babel strange html print in R

2020-02-11 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


Jeremie Juste  writes:

> Hello,
>
> Thanks for the input.
> I didn't see the full mail of stardiviner for some reason.

About this, I found Gmail put my emails into Spams folder. I can't figure out
what reasons. I also found similar situations in some people in Emacs-help guys.
Anyway, If you can, please report my emails "Not Spam". Thanks :)

>
> :results value html  in the following code generates an error for me.
> (Org mode version 9.2.3,R version 3.6.2).
> but :results value output the "html" in an org-table format
>
> #+begin_src R :results value html
> library(xtable)
> x <- rnorm(100)
> y <- x + rnorm(100)
> print(xtable(summary(lm(y ~ x))),type="html")
> #+end_src
>
> Best regards,
> Jeremie
>
> Jack Kamm  writes:
>
>> Hi,
>>
>> stardiviner  writes:
>>
>>> You should try ~:results value html~. Here is what I got correctly:
>>
>> Yes, this seems like the best solution for this case.
>>
>> On the other hand, it would be desirable if ":results output" didn't
>> mangle the output, due to trying to clean up prompts. There is probably
>> some corner case out there where this is a more serious issue -- but for
>> this case, it seems best to just use ":results value html".
>>
>> I was planning to submit my implementation of ":session :results output"
>> that avoids the prompt mangling [0], but now I'm leaning towards putting
>> this off, until a more compelling case arises to justify it.
>>
>> [0] 
>> https://github.com/jackkamm/ob-session-async/blob/master/lisp/ob-session-async-R.el


- -- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  
-BEGIN PGP SIGNATURE-

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5Do/gUHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsN8ewf/YkjUlLOAAAtpBRgOdIZg2N0JKxVt
vwXxH5G+5VOJNgH0avDRrGnI+2r5Kooqs0lpfIjoy5yi9tkG9Z4GShKa2iYP2wLA
hbsN0OJxZ3ChdCjbyW2ABNdzCVL6T3oremxy8DzdZGrM2sSmFFSKK+N8s/PI7IJP
2wE7jjUCoNFcB6XGodcZiRXE+Ms/k1gPfzyJxvbeOdX1GQriQE8ecofEpomkz3F0
VQZ/sgec9mAsKZMC9054H0br5DT1c3Wo/DnaKnVpw24wrwWyMJSj02XSau+GIFLq
3hAx01mrP4ud7aUs/TnwCfaVrvH0i/4iO+KhJr6KyZB2gPMTXTs4nuf5Zw==
=dAR8
-END PGP SIGNATURE-



Re: Bug: broken org-cycle-include-plain-lists integrate [9.3.3 (9.3.3-elpa @ /home/bruce/.emacs.d/elpa/org-9.3.3/)]

2020-02-11 Thread Bruce Tulloch
Thanks for the prompt response guys! :01:nt3r448ppfurl90h:

On Tue, Feb 11, 2020 at 5:56 PM Bastien  wrote:

> Hi Stardiviner,
>
> stardiviner  writes:
>
> > This this related to recently new added option value.
>
> the option was introduced just 2-3 hours before Bruce reported his
> problem ;)
>
> > #+begin_src emacs-lisp
> > (setq org-adapt-indentation 'headline-data)
> > #+end_src
> >
> > It is introduced in commit "e3b79ad2bf7ab7b91c0ad2b8383d639bfe154ce7".
> Which
> > might breaks indentation of plain list etc.
>
> I hope e3b79ad2 won't break anything but you're right, it can.
>
> Thanks,
>
> --
>  Bastien
>


Re: Feature request: Radio button option for lists of checkboxes

2020-02-11 Thread Bastien
Hi Phil,

Phil Sainty  writes:

> A nice feature that may be missing from this implementation
> is the ability to mark individual lists as radio-button lists,
> and then have C-c C-c do the right thing contextually.

Good idea, this is now in.

> The syntax John and Matúš used was:
>
> #+attr_org: :radio

I think it should be "#+attr_org: :radio t".

Try "#+attr_org: :radio t" and let me know if it works for you.

> If that's practical to add to the new implementation, I would think
> it would provide the best end-user experience for interacting with
> such lists.

Yes, I find it nice too, thanks again for suggestion this!

Best,

-- 
 Bastien



Re: Bug: export html with nice urls [9.1.9 (release_9.1.9-65-g5e4542 @ /gnu/store/djza93lqjcndsldf4794bp8mvipd6fz4-emacs-26.3/share/emacs/26.3/lisp/org/)]

2020-02-11 Thread Bastien
Hi Arne,

ArneBab  writes:

> To make this work with every org-link would require hacking
> org-html-link to not only allow keeping the org-link (if
> :html-link-org-files-as-html is nil), but also to allow stripping the
> extension alltogether.

>From the latest master branch, using an empty org-html-extension will
behave as expected: no trailing period on the file name or on links
to .org files.

Can you try it and let us know if it helps dealing with "cool" URLs?

-- 
 Bastien



Re: Bug: org-mime-htmlize generates unwanted equations numbers in mail [9.2.5 (release_9.2.5-521-gdea0c7 @ /home/oub/emacs/site-lisp/packages/org/)]

2020-02-11 Thread Uwe Brauer
>>> "B" == Bastien   writes:

Hi Bastian


> Hi Uwe,
> Uwe Brauer  writes:

>> I contacted the org-mime maintainer and he claims the fault is in org
>> (or the org preview engine)

> can you cc the org-mime maintainer in this thread so that he can guide
> us through where he thinks Org is faulty?

I am puzzled, Thibault Marin  proposed a patch
the 9th of December 
From: Nicolas Goaziou 
replied and even attached the patch, I think to master, I will forward
these messages to you privately.


smime.p7s
Description: S/MIME cryptographic signature


Re: org-mode functional programming library

2020-02-11 Thread Bastien
Hello Nathan,

this looks very interesting and promising, thanks for this work.

I hope you can work with Nicolas to spot possible enhancements to
your own library or to org-element.el, if that's relevant.

I will reference om.el (or org-ml.el?) on Worg, but if you want
to do it yourself, please go ahead:

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

Thanks!

-- 
 Bastien



Re: Bug: org-mime-htmlize generates unwanted equations numbers in mail [9.2.5 (release_9.2.5-521-gdea0c7 @ /home/oub/emacs/site-lisp/packages/org/)]

2020-02-11 Thread Bastien
Hi Uwe,

Uwe Brauer  writes:

> I am puzzled, Thibault Marin  proposed a patch
> the 9th of December 
> From: Nicolas Goaziou 
> replied and even attached the patch, I think to master, I will forward
> these messages to you privately.

Perhaps I missed it, no problem and thanks for replying.

-- 
 Bastien



Re: Bug: org-map-entries infinite loop for org file with tags [9.2.6 (9.2.6-elpa @ /home/ian/.emacs.d/elpa/org-9.2.6/)]

2020-02-11 Thread Bastien
ian martins  writes:

> Thanks for looking into it. The problem was most likely an
> incompatibility between emacs 24.5.1 and org 9.2.6. I upgraded emacs
> and it went away.

Great, thanks for confirming!

-- 
 Bastien



Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-02-11 Thread Bastien
Hi Miguel,

Miguel Morin  writes:

> delete newlines from the end of the org-capture buffer

I can reproduce your problem when I do delete newlines
from the end of the capture buffer, but I don't see why
I would delete newlines.

Is this just some casual cleanup on your side or do you
have a compelling reason for deleting those lines?

-- 
 Bastien



Re: Bug: javascript license not recognized by librejs [9.2.6 (9.2.6-elpa @ /home/arne/.guix-profile/share/emacs/site-lisp/guix.d/org-9.2.6/)]

2020-02-11 Thread Bastien
Hi Arne,

this is fixed in the master branch -- not in maint, as this is just
a (welcome) enhancement.

Thanks for suggesting this.

-- 
 Bastien



Re: [issue] Small typo in ox-html

2020-02-11 Thread Bastien
Hi Gerry,

Gerry Agbobada  writes:

> There's a small typo in latest ox-html commits

Fixed, thanks for reporting this!

-- 
 Bastien



Re: Bug: Effort prompt write malformed input in agenda file even after reporting the error [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/share/emacs/26.3/lisp/org/)]

2020-02-11 Thread Bastien
Hi Firmin,

Firmin Martin  writes:

> In the agenda buffer, I've called the `org-set-effort` function
> with the `e` key, and input "-" which is malformed. I did receive
> an error `Invalid duration format: "-"`, but the "-" has still been
> written in the entry as an effort property.
>
> As a consequence of this bug, opening the agenda buffer raise again
> the error `Invalid duration format: "-"` which results that the agenda
> buffer cannot be opened. The malformed line  
>
>  :Effort:   -

fixed, thanks a lot for reporting this.

-- 
 Bastien



Re: Bug: org-read-date ignores hours?

2020-02-11 Thread Bastien
Hi,

I tried 

(progn
  (setq org-popup-calendar-for-date-prompt t)
  (org-read-date t))

(progn
  (setq org-popup-calendar-for-date-prompt nil)
  (org-read-date t))

from master and could not reproduce the problem (not having the
inserted time string taken into account).

Marco, can you reproduce the problem in master?

-- 
 Bastien



[issue] Small typo in ox-html

2020-02-11 Thread Gerry Agbobada
There's a small typo in latest ox-html commits

https://code.orgmode.org/bzg/org-mode/src/master/lisp/ox-html.el#L244

The "code-highlighted" string needs to keep the escaped ". It breaks
otherwise. (exact commit :
https://code.orgmode.org/bzg/org-mode/commit/68fa5e589f00c8d5b4f7f0dc70be6ebe59238bb8
)

I don't know any other way to convey this issue, sorry if it's not the
correct way

Thanks for org-mode, and have a good day !
Gerry AGBOBADA



Re: ox-html: Bug or feature for export of title and meta information?

2020-02-11 Thread Bastien
Hi Jens,

it is difficult to justify existing code, it is easier to answer to
bug reports.  If you think there is a bug in this aread, can you tell
what it is?

https://orgmode.org/org.html#Feedback might help.

Thanks!

-- 
 Bastien



Re: Fixed vs variable pitch font [legibility 4/6]

2020-02-11 Thread Joost Kremers



On Tue, Feb 11 2020, Bastien wrote:

Hi Texas,

Texas Cyberthal  writes:

Why does there need to be an Org version of mixed-pitch-mode? 
It

already works for Org.


Yes, indeed.


Besides, there's also `org-variable-pitch`, available on Melpa.

--
Joost Kremers
Life has its moments



Re: Powershell scripting with org-babel

2020-02-11 Thread briangpowell .
Damn straight it's "mature and appropriate"

MicroSoft has been found guilty of MANY crimes that set the software
industry back many years through serial acquisitions & monopolistic
practices

Corporate immaturity, unfair and illegal practices have driven the rise of
the Free Software Foundation, Emacs & OrgMode

It's why were all here using OrgMode and supporting it--its ALL about
freedom and free and open source software

MicroSoft PowerShell is a participation in immaturity & stupidity

It's fashioned off of shells that really work rather than stripped down
nonsense that Gates stole and called his own--i.e. "quick and dirty
DOS"--which still works a little bit, on worthless machines enslaved by
MicroSoft products

Grow up: MicroSoft products are evil and enslaving

Now that said, I've used PowerShell; but, only when I had to--I strongly
suggest you do the same

On Mon, Feb 10, 2020 at 10:33 PM George Mauer  wrote:

> > Micro$loth WindBlows is a computer virus
>
> Well that's mature and appropriate.
>
> I recently did an implementation of `ob-pwsh` for supporting powershell
> core (it assumes there’s a pwsh command available on PATH though thats
> configurable with `org-babel-command:pws`). Here’s the link
> https://github.com/togakangaroo/ob-pwsh. Instructions for installing are
> in the README
>
> It works ok and even supports variables but was a 3 hour hack job, plenty
> of features missing. I hadn’t even announced it on this list before. The
> code is pretty small though - under 60 loc if you want to contribute to it,
> I’m game.
>
> I also saw this a while ago but haven’t really dug in
> https://old.reddit.com/r/emacs/comments/dkz0n1/babel_with_powershell/?st=k5jqc8es=b464c181
>
> Oh, and powershell is awesome. It’s 2020, we *should* have a runtime in
> our terminal (eshell somewhat does this and is pretty good because of it).
> One of the things that would be really nice to do some day would be some
> sort of conversion between powershell and lisp structures so that we could
> pass structured data as hashes and lists between languages - not just
> strings.
>
> On Mon, Feb 10, 2020 at 7:59 PM briangpowell . 
> wrote:
>
>> Micro$loth WindBlows is a computer virus
>>
>> But if you must use Windows, suggest you use Cygwin and BASH and/or
>> EShell {the Emacs Shell}--you can do much more than PowerSh3ll
>>
>> And Emacs & OrgMode work very nicely on Cygwin
>>
>> On Mon, Feb 10, 2020 at 11:58 AM MS Window 
>> wrote:
>>
>>> Hello,
>>>
>>> can you help me ? I want to use org-babel for Powershell scripting. I
>>> found this code chunk on the internet for customizing org-babel for
>>> Powershell on github:
>>>
>>> https://gist.github.com/cbilson/ae0d90d163be4d769f8a15ddb58292bc
>>>
>>> There is no explanation there I should put the configuration. The
>>> org-babel documentation is too brief for me as beginner to understand.
>>>
>>> Yours sincerely
>>>
>>> Claus Keller
>>>
>>>
>>>
>>>


Re: Powershell scripting with org-babel

2020-02-11 Thread Bastien
Hi Brian,

emacs-orgmode@gnu.org is for discussing Org bugs and features, not
free software in general.

Also, everyone here is encouraged to read and follow the GNU Kind
communication guidelines as a way to keep an appropriate attitude
when talking with each other:

https://www.gnu.org/philosophy/kind-communication.html

Thanks!

-- 
 Bastien



Re: Bug: LaTeX output of numbered TODO plain list items lose numbering. [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/27.0.50/lisp/org/)]

2020-02-11 Thread Bastien
Hi Brian,

thanks for reporting this and for proposing a fix, your fix is now in
the maint branch: https://code.orgmode.org/bzg/org-mode/commit/5acf4d46

@Eric, let me know if there is something I overlooked while accepting
Brian's fix, I tested the change and it looks good to me.

Thanks,

-- 
 Bastien



Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-11 Thread Bastien
Hi Karl,

did you manage to fix this one?

I read "Property drawers allowed before first headline" in
etc/ORG-NEWS from the master branch:

  Property drawers are now allowed before the first headline.

  Org mode is moving more towards making things before the first
  headline behave just as if it was at outline level 0.  Inheritance
  for properties will work also for this level.  In other words:
  defining things in a property drawer before the first headline will
  make them "inheritable" for all headlines.

I guess your problem might be related to this new behavior.

2 cents,

-- 
 Bastien



Re: Bug: org-mime-htmlize generates unwanted equations numbers in mail [9.2.5 (release_9.2.5-521-gdea0c7 @ /home/oub/emacs/site-lisp/packages/org/)]

2020-02-11 Thread Bastien
Hi Uwe,

Uwe Brauer  writes:

> I contacted the org-mime maintainer and he claims the fault is in org
> (or the org preview engine)

can you cc the org-mime maintainer in this thread so that he can guide
us through where he thinks Org is faulty?

Thanks,

-- 
 Bastien



Re: Bug: org-map-entries infinite loop for org file with tags [9.2.6 (9.2.6-elpa @ /home/ian/.emacs.d/elpa/org-9.2.6/)]

2020-02-11 Thread ian martins
Thanks for looking into it. The problem was most likely an incompatibility
between emacs 24.5.1 and org 9.2.6. I upgraded emacs and it went away.

On Wed, Feb 5, 2020 at 2:13 AM Bastien  wrote:

> Hi Ian,
>
> > Running org-map-entries on an org file with tags results in an infinite
> > loop.
>
> FWIW, I cannot reproduce this.
>
> > Example function using org-map-entries:
> >
> > (defun org-map-entries-test ()
> >   (interactive)
> >   (org-map-entries '(lambda () (message "%s" (org-entry-properties
> > (point) 'standard
> >   (message "done"))
> >
> > Example org file:
> >
> > * one
> > * two
> > * three
> >  :noexport:
>
> The above exemple is not a valid org file, the tag should be on the
> same line than the headline... but perhaps that's just because your
> email was sent as HTML.
>
> Thanks,
>
> --
>  Bastien
>


Re: Bug: Re: ob-scheme.el has two problems: not killing a misbehaving interpreter and sometimes returns nil [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.2/lisp/org/)]

2020-02-11 Thread Bastien
Hi,

Vladimir Nikishkin  writes:

> The super-pedestrian patch I wrote to patch this issue is:

I implemented a similar "fix" in Org master, thanks.

-- 
 Bastien



Re: Emacs hangs sometimes for no reason

2020-02-11 Thread Karl Voit
* Sebastian Christ  wrote:
> Hi list,
>
> in the last couple weeks (perhaps months?) Emacs hangs for no specific
> reason for me. The single constant is, that when it hangs, it hangs
> while I'm in org-mode. This occurs on multiple circumstance as
>
> - changing the outline structure by demoting and promoting headline
> - when refiling
> - re-schedule in agenda
> - yanking
> - perhaps more

Same here with 3 different Emacs versions.

> The strange thing is that it happens unpredictably, e.g. I re-schedule
> 11 items without problems and the 12th one lets Emacs crash. Sometimes
> it works for days without problems and then I promote a headline and
> Emacs crashes. Very sad :(

I did not have a crash here, though.

> My actual question is, had someone had similar issues? Or is it just me
> with my configuration?
>
> Perhaps someone can guide me on how I can find the root cause for this?
> I pretty much lost here.
>
> Thanks in advance for any hints.

In a discussion on Org/Emacs scalability issues, I got a hint[1] to use
gcmh.el which indicates garbage collecting activity. My
freeze-moments are almost entirely related to garbage collecting.

You might want to try that.

I've got no solution or workaround so far.

[1] 
https://www.reddit.com/r/orgmode/comments/e9p84n/scaling_org_better_to_use_more_medsize_files_or/fcm5bsc/

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Bug: org-babel-tangle-comment-links does not honor org-babel-tangle-uncomment-comments in noweb comments [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/share/emacs/26.2/lisp/org/)]

2020-02-11 Thread Bastien
Hi Immanuel,

immanuel  writes:

> Try the following code;

Fixed, thanks!

-- 
 Bastien



Re: Bug: org-read-date ignores hours?

2020-02-11 Thread Marco Wahl
Bastien  writes:

> I tried 
>
> (progn
>   (setq org-popup-calendar-for-date-prompt t)
>   (org-read-date t))
>
> (progn
>   (setq org-popup-calendar-for-date-prompt nil)
>   (org-read-date t))
>
> from master and could not reproduce the problem (not having the
> inserted time string taken into account).
>
> Marco, can you reproduce the problem in master?

I get back a date with a time in each case.

Concretely find the return values below if I do

C-u C-x C-e 11:55 RET

after each of the two sexp's below.

(progn
  (setq org-popup-calendar-for-date-prompt t)
  (org-read-date t))

"2020-02-11 11:55"

(progn
  (setq org-popup-calendar-for-date-prompt nil)
  (org-read-date t))

"2020-02-11 11:55"

In summary I can say that this LGTM and I can't reproduce the problem.


Ciao!







Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-11 Thread Karl Voit
* Bastien  wrote:
> Hi Karl,

Hi Bastien,

> did you manage to fix this one?

Well ...

> I read "Property drawers allowed before first headline" in
> etc/ORG-NEWS from the master branch:
>
>   Property drawers are now allowed before the first headline.
>
>   Org mode is moving more towards making things before the first
>   headline behave just as if it was at outline level 0.  Inheritance
>   for properties will work also for this level.  In other words:
>   defining things in a property drawer before the first headline will
>   make them "inheritable" for all headlines.
>
> I guess your problem might be related to this new behavior.

Since I'm not using drawers before the first headline, I don't
understand how this might relate to my issue.

However, I just re-enabled org-depend which I had disabled for
batch mode only in order to get the export done. Then I ran the
batch process for the export and it finished without an error within
1min53sec. :-)

So the issue seems to be gone (for now) but I don't know why it
appeared in the first place nor why it disappeared in the meantime.

I'm using Org mode from maint. Currently on my side: d20e45b18 (3
days ago). The version that had the issue was from November or
December. I could provide the exact ID hash if anybody is
interested.

Thanks anyway and thanks for the pointer with the new feature. That
might come handy when there is a property which does not have a
file-local version.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-11 Thread Bastien
Hi Karl,

Karl Voit  writes:

> So the issue seems to be gone (for now) but I don't know why it
> appeared in the first place nor why it disappeared in the meantime.

/me looks for a good xkcd quote. :)

-- 
 Bastien



Re: Bug: org-read-date ignores hours?

2020-02-11 Thread Bastien
Hi Marco,

Marco Wahl  writes:

> In summary I can say that this LGTM and I can't reproduce the
> problem.

Thanks for taking the time and trouble to try reproducing it!

-- 
 Bastien



Re: Bug: Org-babel can't capture the output of rg/ag/pt with org-babel on OS X [9.2.6 (9.2.6-4-ge30905-elpaplus @ /Users/maxflander/.emacs.d/elpa/org-plus-contrib-20191014/)]

2020-02-11 Thread Bastien
Hi Max,

Max Flander  writes:

> I've also tried ag and pt which don't work either. It works with
> grep but this is too slow for my use-case.

Is there any difference between how grep and ag send their output in
the terminal?  If so, can it be relevant to the issue at point?

Thanks,

-- 
 Bastien



Re: org-capture fails to insert link even on :immediate-finish templates

2020-02-11 Thread Bastien
Hi Leo,

Leo Gaspard  writes:

> Is it possible to make org-capture fail loudly when capturing a
> =:immediate-finish t= template for which all the substitutions didn't
> succeed, instead of just having empty strings at the substitution
> locations?

Good idea - I've implemented this just for annotations (%a).  When
:immediate-finish is non-nil and the template contains a "%a", chances
are that the content of the finished template is useless when the %a
cannot be expanded.

Thanks,

-- 
 Bastien



Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-11 Thread Karl Voit
* Bastien  wrote:
> Hi Karl,
>
> Karl Voit  writes:
>
>> So the issue seems to be gone (for now) but I don't know why it
>> appeared in the first place nor why it disappeared in the meantime.
>
> /me looks for a good xkcd quote. :)

Alternatively: https://en.wikipedia.org/wiki/Haiku_in_English  ;-)

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: Org 9.2 not inhibiting electric-pair-mode in the beginning of lines?

2020-02-11 Thread Bastien
Hi Vladimir,

Vladimir Nikishkin  writes:

> I used org 8 until recently, and it used to be that I could type "<"
> at the beginning of a line, and it would be still a single "<" (thus
> allowing the expansion of structured templates with TAB)

This is still the case for me in latest Org mode version 9.3.4.

Can you try again with Emacs -q and Org 9.3.4?

Thanks,

-- 
 Bastien



Re: Short captions

2020-02-11 Thread Fraga, Eric
On Monday, 10 Feb 2020 at 23:20, Anthony Cowley wrote:
> I am having trouble understanding how short captions are supposed to
> work. Consider this org document:

[...]

> The first matches my expectations. The second is an example of taking
> the last bit of markup as the short caption. The third seems to lose
> the short caption altogether.

I can confirm (with a slightly out of date org) this behaviour which
does seem to be inconsistent and/or wrong.  However, I wasn't able to
find any discussion of short captions in the org manual so I'm not sure
if there are caveats on their use.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.3.2-199-ga557cf



Re: org-timer-set-timer from any buffer

2020-02-11 Thread Bastien
Hi Ian,

ian martins  writes:

> Is it intentional that org-timer start, stop, and pause-or-continue
> all work from any buffer, but org-timer-set-timer only works from an
> org buffer?

I don't know if this is intentional.

Is there a problem here?  If so, how can we fix it?

Thanks,

-- 
 Bastien



Re: [PATCH] ox.el: Fix extra character deleted in org-export--update-included-link

2020-02-11 Thread Bastien
Hi Christoffer and Nicolas,

thanks for your patch.

a...@xkqr.org (Christoffer Stjernlöf) writes:

> * ox.el (org-export--update-included-link): Fix bug.
> (org-export--update-included-link): Delete region only until one less
> than (org-element-property :end link).

Nicolas, does it look good to you?  The patch passes all the test but
probably they don't cover edge cases about link insertion/updating.

Thanks,

-- 
 Bastien



Agenda: How to bulk mark regex w/spaces?

2020-02-11 Thread Nathan Neff
Hello all,

I'm trying to use org-agenda-bulk-mark-regexp and trying to search for
headings having "Pre Class".

None of the combinations have worked so far (I've tried with quotes
and without quotes in the prompt)

Pre Class
Pre\sClass
Pre\\sClass
Pre.*Class
{Pre Class}

It appears that the function is simply using the
(re-search-forward) function, and I've tried simply calling
:(re-search-forward "Pre Class") in the agenda, and the text is indeed
found.

Therefore, I'm wondering if the prompt for the regex is somehow mangling
the input to the function itself?

Thanks,
--Nate


Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-02-11 Thread Miguel Morin
Hi Bastien,

Yes, it works! I appreciate your work, thank you very much.

I tested the code with the Org 9.3.3 and confirm that the first issue I 
reported is fixed: now when I run `org-capture` and delete lines at the end of 
the org-capture buffer I cannot delete the newline that in the org buffer 
separates the capture item from the next heading.

The other issue I reported is still there, i.e. running this code:

```
(defun +org|insert-newlines ()
  (beginning-of-buffer) (insert "\nhello world!\n")
  (end-of-buffer) (insert "\nhello world!\n"))
+org|insert-newlines


(add-hook 'org-capture-before-finalize-hook #'+org|insert-newlines)
(+org|insert-newlines)
```

will insert "hello world!" at the beginning and end of the org buffer and not 
the org-capture buffer. I'm not sure if this is intended, and I never use this 
feature anyway. So I'm happy to close this matter here.

Miguel


On Wed, 05 Feb 2020 at 06:30 WET, Bastien wrote:

> Hi Miguel,
>
> I made a change in Org maint branch that could somehow impact the
> issue you reported.  Can you test and see if it does?
>
> Morin  writes:
>
>> In the course of fixing this, I found another bug in using the hook
>> `org-capture-before-finalize-hook`, which adds text at the beginning
>> and end of the org buffer and not in the beggining and end of the
>> capture item.
>
> If this is really another bug, please fill a different bug report for
> it, it helps us track all issues separately.
>
> Thanks,




Re: Visual index for Org based presentation slide sets

2020-02-11 Thread Bastien
Hi Michael,

Michael Welle  writes:

> On [0] you will find an index of reveal based presentations. Is there
> something similar for Org based presentations? Maybe even a visual
> index? Something where you can learn and stea^Wborrow ideas? If not,
> should there be something like that?

I don't know of such a list but that's the kind of resources we can
share on Worg: https://orgmode.org/worg/org-contribute.html

2 cts,

-- 
 Bastien



Re: [PATCH] Add org-agenda-show-indirect variable

2020-02-11 Thread Bastien
Hi Tumashu and Adam,

what is the value of this addition?

If integrating it into Org is useful, can you resubmit a final patch
for this?

Thanks!

-- 
 Bastien



Re: How to use specific keywords

2020-02-11 Thread Bastien
Hi Pascal,

Pascal Quesseveur  writes:

> Wih Org V7 I had developed a custom latex export that used specific
> keywords defined in org-export-inbuffer-options-extra (document
> reference, title in the footer, ...). What should I use with recent
> versions of Org to add keywords in org-export-options-alist?

Probably this can help: https://orgmode.org/worg/org-8.0.html

HTH,

-- 
 Bastien



Re: org-timer-set-timer from any buffer

2020-02-11 Thread Bastien
Hi Kyle,

Kyle Meyer  writes:

> Ian already addressed it with the patch at
> ,
> which was applied as 044e9718c (org-timer.el: Allow org-timer-set-timer
> from non-Org buffers, 2019-11-16).

Thanks!  I didn't read the whole thread as I should have, thanks for
applying this.

-- 
 Bastien



Re: Bug: refiling gobbles a newline and absorbs the next heading [9.1.9 (release_9.1.9-65-g5e4542 @ /Applications/Emacs.app/Contents/Resources/lisp/org/)]

2020-02-11 Thread Bastien
Hi Miguel,

Miguel Morin  writes:

> will insert "hello world!" at the beginning and end of the org buffer
> and not the org-capture buffer. I'm not sure if this is intended, and
> I never use this feature anyway. So I'm happy to close this matter
> here.

Okay, thanks for confirming the main issue is gone.

-- 
 Bastien



Re: ox-html: add option to restore old src block behaviour?

2020-02-11 Thread Bastien
Hi Matt,

Matt Price  writes:

> However, at least one very common syntax highlighter, https://
> highlinghtjs.org, expects just a single  tag, as do other
> common CSS frameworks. These often leave odd borders or background
> color disruptions which somewhat distort the view of the code.
> There's also a funny conflict with `org-re-reveal`, which expects the
> old behaviour (see https://gitlab.com/oer/org-re-reveal/issues/27). 
> It would in principal be possible to fix these issues directly in
> CSS, but it might be much more practical to have an option -- a
> defvar or a file/headline-settable property -- that restores the old
> behaviour when desired.  If this would be welcome, I could do it. I
> know org already has a bewildering number of options,though,and the
> code change would be oddly a number of times as large as the
> substantive change of that commit, os thought I'd check first.

Yes, an option makes sense here -- can you provide one that allows to
restore the old behavior (and avoid all those ... lines)?

Thanks in advance!

-- 
 Bastien



Re: org-timer-set-timer from any buffer

2020-02-11 Thread Kyle Meyer
Hi Bastien,

Bastien  writes:

> Hi Ian,
>
> ian martins  writes:
>
>> Is it intentional that org-timer start, stop, and pause-or-continue
>> all work from any buffer, but org-timer-set-timer only works from an
>> org buffer?
>
> I don't know if this is intentional.
>
> Is there a problem here?  If so, how can we fix it?

Ian already addressed it with the patch at
,
which was applied as 044e9718c (org-timer.el: Allow org-timer-set-timer
from non-Org buffers, 2019-11-16).



Re: org-babel strange html print in R

2020-02-11 Thread Jack Kamm
Hi,

stardiviner  writes:

> You should try ~:results value html~. Here is what I got correctly:

Yes, this seems like the best solution for this case.

On the other hand, it would be desirable if ":results output" didn't
mangle the output, due to trying to clean up prompts. There is probably
some corner case out there where this is a more serious issue -- but for
this case, it seems best to just use ":results value html".

I was planning to submit my implementation of ":session :results output"
that avoids the prompt mangling [0], but now I'm leaning towards putting
this off, until a more compelling case arises to justify it.

[0] 
https://github.com/jackkamm/ob-session-async/blob/master/lisp/ob-session-async-R.el



how to hack section lines in LaTeX export?

2020-02-11 Thread Julius Müller
Hi folks,

I would like to add a property's contents to the section line in LaTeX
export. Is there a way to do that?

Here's a minimal (not) working example. Use it with 'emacs -q', execute
the source block to add the class definition to org, then export to LaTeX.

---
#+begin_src elisp :exports none :results none
(require 'ox-latex)
(add-to-list 'org-latex-classes
  '("QA"
"\\documentclass{article}"
("\\QA{%s}" . "\\QA{%s}")
("\\QA{%s}" . "\\QA{%s}")
("\\QA{%s}" . "\\QA{%s}")
("\\QA{%s}" . "\\QA{%s}")
("\\QA{%s}" . "\\QA{%s}")
("\\QA{%s}" . "\\QA{%s}")
#+end_src

#+LATEX_CLASS: QA

* test section
:PROPERTIES:
:ID:   ylv4e021ami0
:END:
-

Currently this produces section headers like

\QA{test section}

in LaTeX export.

I would like to have org produce section headers like

\QA[ID: ylv4e021ami0]{test section}.

I know the ID can be extracted with something like

(if (org-id-get) (insert (format "\n\\ID: %s\n" (org-id-get

but how can I add that to the section header?

John Kitchin kindly provided some code to extract the ID at the end of
the metadata block, but unfortunately that's too late for the effect I
am after :-(

Thanks for any pointers,

Julius Müller



Re: [ANN/RFC] org-ql-view-dispatch command

2020-02-11 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256


Bastien  writes:

> Hi Adam,
>
> Adam Porter  writes:
>
>> I've pushed a new feature to org-ql's master branch: a Magit-like view
>> dispatcher using Jonas Bernoulli's transient.el library.
>
> It looks really neat!
>
> I wish we could unify at the two main Org dispatch screens, i.e. org
> export and org capture selection interfaces.

I agree, this will be great!!

>
> Transient is not in Emacs, so we cannot use it by default in Org but
> would anyone try to provide a transient interface for Org export and
> capture interfaces?


- -- 
[ stardiviner ]
   I try to make every word tell the meaning what I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
  
-BEGIN PGP SIGNATURE-

iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl5C5G4UHG51bWJjaGls
ZEBnbWFpbC5jb20ACgkQG13xyVromsOMRQf/fycMzJnL830xtAt0xY2+XVgPA8Wp
9N30m2C1uVvh8Dt1m+RwSKRE1XTvqlFUITZnTo/ypedLPlsU/DlvfiHWIuSfZO6I
5LcVS795FDpD0UyVJ0SEXCt+c30pcdZX5z6jCjxIeo0jdu71RFqdOBdjpiIl3MO/
wYDZzj7PAjw9KITA9TiXoh6zHZPPwBeKRkGDKd4/HIoOTNCNrfBsbPw4hGc5CxZX
G1v6u+fQfaO+U73ODKCXrD2KJNQOZFyL5lYR1SvWPRxdec/GDEUY1TEeigak8mqy
jo405trykEycxxkPRQmav/TMRgB3sCjSLDgVbDtof1MYMcoU0vnZOHDPDQ==
=ZXFY
-END PGP SIGNATURE-



Re: org-babel strange html print in R

2020-02-11 Thread Jeremie Juste
Hello,

Thanks for the input.
I didn't see the full mail of stardiviner for some reason.

:results value html  in the following code generates an error for me.
(Org mode version 9.2.3,R version 3.6.2).
but :results value output the "html" in an org-table format

#+begin_src R :results value html
library(xtable)
x <- rnorm(100)
y <- x + rnorm(100)
print(xtable(summary(lm(y ~ x))),type="html")
#+end_src

Best regards,
Jeremie

Jack Kamm  writes:

> Hi,
>
> stardiviner  writes:
>
>> You should try ~:results value html~. Here is what I got correctly:
>
> Yes, this seems like the best solution for this case.
>
> On the other hand, it would be desirable if ":results output" didn't
> mangle the output, due to trying to clean up prompts. There is probably
> some corner case out there where this is a more serious issue -- but for
> this case, it seems best to just use ":results value html".
>
> I was planning to submit my implementation of ":session :results output"
> that avoids the prompt mangling [0], but now I'm leaning towards putting
> this off, until a more compelling case arises to justify it.
>
> [0] 
> https://github.com/jackkamm/ob-session-async/blob/master/lisp/ob-session-async-R.el



Re: [PATCH] ox.el: Fix extra character deleted in org-export--update-included-link

2020-02-11 Thread Nicolas Goaziou
Hello,

Bastien  writes:

> Nicolas, does it look good to you?  

How would I dare to have an opinion m'lord? Only yours matters.

Christoffer, unfortunately, this patch is incorrect. It doesn't account
for a zero :post-blank value. For the record, (1-
(org-element-property :end ...)) is always a bad idea.

I pushed a fix, with a test. I let you check if the issue is resolved on
your side, and close the bug report if appropriate.

Thank you for the report.

-- 
Nicolas Goaziou



Re: Bug: Org-babel can't capture the output of rg/ag/pt with org-babel on OS X [9.2.6 (9.2.6-4-ge30905-elpaplus @ /Users/maxflander/.emacs.d/elpa/org-plus-contrib-20191014/)]

2020-02-11 Thread Samuel Wales
you probably already tried this to judge from your links but it's
worth poinitng out for mailing list readers that shell blocks use the
exit code.  a user who just wants to run a diff or grep for the stdio
results (stderr and stdout) has to stop that mechanism.

if you want both stdin and stout, you need to combine them.  note that
stderr is normally unbuffered, so the sequence might or might not be
preserved.  and if you want to stop babel from thinking it should do
something different with nonzero ec, you have to stop that.

all of this i think needs to be done in shell code inside the block.


On 10/29/19, Max Flander  wrote:
> I'm trying to capture the output of rg but I'm getting no output (I'm
> getting the message "Code block produced no output" in the minibuffer.
>
> I've also tried ag and pt which don't work either. It works with grep but
> this is too slow for my use-case.
>
> Example:
>
> #+BEGIN_SRC shell
> mkdir -p myproject
> pushd myproject
> echo "something" > something.txt
> rg something
> popd
> #+END_SRC
>
> #+RESULTS:
>
> I've tried the solutions from these similar questions, but they're not
> working here:
>
> *
> https://stackoverflow.com/questions/27304469/capturing-the-output-of-diff-with-org-babel
> *
> https://stackoverflow.com/questions/12771642/capture-output-from-a-shell-command-with-babel-in-org-mode?noredirect=1=1
>
> Emacs  : GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.5.0, NS
> appkit-1671.40 Version 10.14.4 (Build 18E226))
> of 2019-08-30
> Package: Org mode version 9.2.6 (9.2.6-4-ge30905-elpaplus @
> /Users/maxflander/.emacs.d/elpa/org-plus-contrib-20191014/)
>
> current state:
> ==
> (setq
> org-src-mode-hook '(org-src-babel-configure-edit-buffer
> org-src-mode-configure-edit-buffer)
> org-metadown-hook '(org-babel-pop-to-session-maybe)
> org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
> org-html-format-inlinetask-function
> 'org-html-format-inlinetask-default-function
> org-odt-format-headline-function 'org-odt-format-headline-default-function
> org-imenu-depth 8
> org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
> org-mode-hook '(org-indent-mode #[0 "\301\211\207"
> [imenu-create-index-function org-imenu-get-tree] 2]
>  #[0 "\300\301\302\303\304$\207" [add-hook
> change-major-mode-hook org-show-all append local] 5]
>  #[0 "\300\301\302\303\304$\207"
>[add-hook change-major-mode-hook
> org-babel-show-result-all append local] 5]
>  org-babel-result-hide-spec org-babel-hide-all-hashes
> toc-org-enable org-bullets-mode
>  org-eldoc-load)
> org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
> org-archive-hook '(org-attach-archive-delete-maybe)
> org-confirm-elisp-link-function 'yes-or-no-p
> org-startup-with-inline-images t
> org-agenda-before-write-hook '(org-agenda-add-entry-text)
> org-metaup-hook '(org-babel-load-in-session-maybe)
> org-bibtex-headline-format-function #[257 "\300\236A\207" [:title] 3
> "\n\n(fn ENTRY)"]
> org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
> org-babel-pre-tangle-hook '(save-buffer)
> org-tab-first-hook '(org-babel-hide-result-toggle-maybe
> org-babel-header-arg-expand)
> org-babel-load-languages '((shell . t))
> org-ascii-format-drawer-function #[771 "\207" [] 4 "\n\n(fn NAME CONTENTS
> WIDTH)"]
> org-src-lang-modes '(("arduino" . arduino) ("redis" . redis) ("php" . php)
> ("C" . c) ("C++" . c++)
>   ("asymptote" . asy) ("bash" . sh) ("beamer" . latex)
> ("calc" . fundamental) ("cpp" . c++)
>   ("ditaa" . artist) ("dot" . fundamental) ("elisp" .
> emacs-lisp) ("ocaml" . tuareg)
>   ("screen" . shell-script) ("shell" . sh) ("sqlite" .
> sql))
> org-occur-hook '(org-first-headline-recenter)
> org-cycle-hook '(org-cycle-hide-archived-subtrees
> org-cycle-show-empty-lines
>   org-optimize-window-after-visibility-change)
> org-speed-command-hook '(org-speed-command-activate
> org-babel-speed-command-activate)
> org-odt-format-inlinetask-function
> 'org-odt-format-inlinetask-default-function
> org-confirm-shell-link-function 'yes-or-no-p
> org-link-parameters '(("id" :follow org-id-open) ("eww" :follow eww :store
> org-eww-store-link)
>("rmail" :follow org-rmail-open :store
> org-rmail-store-link)
>("mhe" :follow org-mhe-open :store
> org-mhe-store-link)
>("irc" :follow org-irc-visit :store
> org-irc-store-link :export org-irc-export)
>("info" :follow org-info-open :export org-info-export
> :store org-info-store-link)
>("gnus" :follow org-gnus-open :store
> org-gnus-store-link)
>("docview" :follow org-docview-open :export
> org-docview-export :store org-docview-store-link)
>("bibtex" :follow org-bibtex-open :store
> 

Re: Short captions

2020-02-11 Thread Anthony Cowley


Fraga, Eric writes:

> On Monday, 10 Feb 2020 at 23:20, Anthony Cowley wrote:
>> I am having trouble understanding how short captions are supposed to
>> work. Consider this org document:
>
> [...]
>
>> The first matches my expectations. The second is an example of taking
>> the last bit of markup as the short caption. The third seems to lose
>> the short caption altogether.
>
> I can confirm (with a slightly out of date org) this behaviour which
> does seem to be inconsistent and/or wrong.  However, I wasn't able to
> find any discussion of short captions in the org manual so I'm not sure
> if there are caveats on their use.

They are described in section 12.8 Captions 


I think this patch fixes the issue:

diff -ruN A/org-element.el B/org-element.el
--- A/org-element.el2019-12-03 10:28:06.0 -0500
+++ B/org-element.el2020-02-11 14:47:45.564452900 -0500
@@ -4018,14 +4018,15 @@
   (parsed? (member kwd org-element-parsed-keywords))
   ;; Find main value for any keyword.
   (value
-   (let ((beg (match-end 0))
- (end (save-excursion
-(end-of-line)
-(skip-chars-backward " \t")
-(point
- (if parsed?
- (org-element--parse-objects beg end nil restrict)
-   (org-trim (buffer-substring-no-properties beg end)
+(save-match-data 
+ (let ((beg (match-end 0))
+   (end (save-excursion
+  (end-of-line)
+  (skip-chars-backward " \t")
+  (point
+   (if parsed?
+   (org-element--parse-objects beg end nil restrict)
+ (org-trim (buffer-substring-no-properties beg end))
   ;; If KWD is a dual keyword, find its secondary value.
   ;; Maybe parse it.
   (dual? (member kwd org-element-dual-keywords))


Anthony



Re: [org-inlinetask] Inquiry of opinion from all users

2020-02-11 Thread D
Thanks! :)

Right now I am mostly focused on what features people could want from a
package like this without blowing the scope out of proportion.
Currently I mostly stick to vanilla org with a few tweaks (such as using
the same proportions for org-level-X as LaTeX does for sub*sections), so
I will most likely add very few things on my own and keep an eye on
potential requests.  I am aware there were a couple of suggestions on
org-bullets' original GitHub, which I will try to address thoroughly.

Cheers,

D.



Re: Feature request: Radio button option for lists of checkboxes

2020-02-11 Thread Bastien
Hi Phil,

Phil Sainty  writes:

> (Where "radio button" means that for a list of checkboxes, only
> one may be selected at any given time -- selecting a different
> checkbox automatically de-selects the previous one.)

>From latest master, please try C-c C-x C-r on a checkbox or turn
on M-x org-list-checkbox-radio-mode RET so that C-c C-c consider
all checkboxes as radio buttons.

Thanks for sharing this idea!

Best,

-- 
 Bastien



Re: Bug? Multi day event with times

2020-02-11 Thread Bastien
Hi Detlef,

Detlef Steuer  writes:

> My travel starts at 10am on Thurday and stretches till Sunday 4pm.

I would use

** some travel
   <2020-01-30 Do 10:00-16:00>-<2020-02-01 Sa 10:00-16:00>

which should, with a recent Org, display times every three day
in the agenda view.

Not ideal, but closest to what's true: you start at 10 one day,
you finish at 4pm the last day, and things inbetween probably
happen between 10am and 4pm :)

-- 
 Bastien



Re: Bug: ob-scheme.el has two problems: not killing a misbehaving interpreter and sometimes returns nil [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.2/lisp/org/)]

2020-02-11 Thread Bastien
Hi Vladimir,

> Note that t is not a registered symbol in scheme (should be #t), but is
> shows two errors:

Below the quoted text are... 4 errors, one of which has been fixed
recently IIRC.  Don't hesitate to tell more about remaining problems,
preferrably one per report.

Thanks!

-- 
 Bastien



Re: Agenda: How to bulk mark regex w/spaces?

2020-02-11 Thread Bastien
Hi Nathan,

Nathan Neff  writes:

> I'm trying to use org-agenda-bulk-mark-regexp and trying to search
> for
> headings having "Pre Class".
>
> None of the combinations have worked so far (I've tried with quotes
> and without quotes in the prompt)

There is nothing special with the regexps you need to enter with
`org-agenda-bulk-mark-regexp', you can use the same syntax you would
use for, e.g., C-u C-s in Emacs.

Note that only the text of the headline is considered, not part of
the agenda line that are not the heading itself (e.g. todo keywords,
tags, etc.)

> Pre Class

should work

> Pre\sClass

=> Pre\s-Class should work

> Pre\\sClass

nope

> Pre.*Class

should work

> {Pre Class}

nope.

HTH,

-- 
 Bastien



Re: org-babel strange html print in R

2020-02-11 Thread Jack Kamm
Hi,

Jeremie Juste  writes:

> :results value html  in the following code generates an error for me.
> (Org mode version 9.2.3,R version 3.6.2).
> but :results value output the "html" in an org-table format

Hmm, I can confirm that ":session :results value html" is working for
me, same as for stardiviner. Could you give more info about the error
you're seeing?

I'm using R 3.6.2 and Org 9.4. But I'd be surprised if it doesn't work
for Org 9.2 -- git blame suggests that html output has been supported in
ob-R since at least 2015. But it wouldn't hurt to upgrade to the latest
released version of Org (9.3).



Re: Feature request: Radio button option for lists of checkboxes

2020-02-11 Thread Phil Sainty
On 12/02/20 12:10 pm, Bastien wrote:
> From latest master, please try C-c C-x C-r on a checkbox or turn
> on M-x org-list-checkbox-radio-mode RET so that C-c C-c consider
> all checkboxes as radio buttons.

Brilliant, thanks Bastien!

A nice feature that may be missing from this implementation
is the ability to mark individual lists as radio-button lists,
and then have C-c C-c do the right thing contextually.

The syntax John and Matúš used was:

#+attr_org: :radio
- [ ] localhost
- [X] staging
- [ ] production

Then you can always just use C-c C-c to select a checkbox -- but
if the list is intended to be radio buttons then that behaviour
gets used automatically.

If that's practical to add to the new implementation, I would think
it would provide the best end-user experience for interacting with
such lists.


-Phil


p.s. Their code for detecting this was along similar lines:

(when (-contains? (org-element-property
 :attr_org
 (org-element-property :parent (org-element-context)))
":radio")

vs

(let ((list (org-radiobutton--get-list-at-point)))
  (when (-contains? (org-element-property :attr_org list) ":radio")



Re: Bug: javascript license not recognized by librejs [9.2.6 (9.2.6-elpa @ /home/arne/.guix-profile/share/emacs/site-lisp/guix.d/org-9.2.6/)]

2020-02-11 Thread Arne Babenhauserheide
Hi Bastien,

Thank you very much!

Best wishes,
Arne

Bastien  writes:

> Hi Arne,
>
> this is fixed in the master branch -- not in maint, as this is just
> a (welcome) enhancement.
>
> Thanks for suggesting this.


-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken



Re: Emacs hangs sometimes for no reason

2020-02-11 Thread briangpowell .
Emacs periodically saves all files that you are visiting; this is called
auto-saving . Auto-saving prevents you from losing more than a limited
amount of work if the system crashes. By default, auto-saves happen every
300 keystrokes, or after around 30 seconds of idle time.

Suggest you try making your auto-save-interval variable much larger and see
if that helps

Also suggest making smaller .org files when practical

On Tue, Feb 11, 2020 at 7:33 AM Karl Voit  wrote:

> * Sebastian Christ  wrote:
> > Hi list,
> >
> > in the last couple weeks (perhaps months?) Emacs hangs for no specific
> > reason for me. The single constant is, that when it hangs, it hangs
> > while I'm in org-mode. This occurs on multiple circumstance as
> >
> > - changing the outline structure by demoting and promoting headline
> > - when refiling
> > - re-schedule in agenda
> > - yanking
> > - perhaps more
>
> Same here with 3 different Emacs versions.
>
> > The strange thing is that it happens unpredictably, e.g. I re-schedule
> > 11 items without problems and the 12th one lets Emacs crash. Sometimes
> > it works for days without problems and then I promote a headline and
> > Emacs crashes. Very sad :(
>
> I did not have a crash here, though.
>
> > My actual question is, had someone had similar issues? Or is it just me
> > with my configuration?
> >
> > Perhaps someone can guide me on how I can find the root cause for this?
> > I pretty much lost here.
> >
> > Thanks in advance for any hints.
>
> In a discussion on Org/Emacs scalability issues, I got a hint[1] to use
> gcmh.el which indicates garbage collecting activity. My
> freeze-moments are almost entirely related to garbage collecting.
>
> You might want to try that.
>
> I've got no solution or workaround so far.
>
> [1]
> https://www.reddit.com/r/orgmode/comments/e9p84n/scaling_org_better_to_use_more_medsize_files_or/fcm5bsc/
>
> --
> get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
>> get Memacs from https://github.com/novoid/Memacs <
> Personal Information Management > http://Karl-Voit.at/tags/pim/
> Emacs-related > http://Karl-Voit.at/tags/emacs/
>
>
>