Re: Help requested: Support for basic Org mode support in tools outside of Emacs

2021-08-07 Thread Sébastien Rey-Coyrehourcq

Hi there,

Thanks for this opportunity,

I also made recent research on this 
(https://orgmode.org/list/2b19797780df800a5feafd47836b83e5426752e1.ca...@univ-rouen.fr/), 
and Bastien update the  corresponding org parser page :


https://orgmode.org/worg/org-tools/

Best regards,

Le 03/08/2021 à 11:14, Karl Voit a écrit :

Hi,

I'm collecting information on basic Org mode support in tools that
are not Emacs.

I already have: GitHub, GitLab (exactly like GitHub), OrgModeWeb,
Orgzly, Orgro, Emacs, vim-orgmode.

What I need is information on much more tools.

I have set up a syntax checking file on
https://github.com/novoid/github-orgmode-tests/blob/master/orgmode_support.org
which also contains my current compatibility table for the most
basic set that makes sense as a Markdown-pendant outside of Emacs
according to my subjective judgement on Org mode at the bottom.

My focus is on tools that - at least - offer text formatting syntax
highlighting for *bold* /italic/ and so forth. The rest could be
"works as text but has no special support for outlining and more".

The goals is to emphasize that there are much more tools that allow
for viewing and/or editing data in Org mode syntax.

Since I don't have an iPhone, iOS-based tools supporting Org mode
syntax is very much appreciated.

Please do hand in more lines for the table either here, via email or
as a GitHub pull request.

Thank you!





Re: babel default header args as functions

2020-10-14 Thread rey-coyrehourcq
Hi Matt,

I'm unfamilliar with patch by mail but i try to apply your patch to my melpa 
local org 9.4 version used by doom emacs.
Patch hang on Hunk #3, i attach the .rej file.

patch -p1 < 0001-ob-core.el-Add-ability-to-use-closures-as-default-he.patch

File to patch: ob-core.el
patching file ob-core.el
Hunk #1 succeeded at 467 (offset -6 lines).
Hunk #2 succeeded at 596 (offset -16 lines).
Hunk #3 FAILED at 2745.
Hunk #4 succeeded at 2714 (offset -51 lines).
1 out of 4 hunks FAILED -- saving rejects to file ob-core.el.rej
patch unexpectedly ends in middle of line

Best

Le mercredi 14 octobre 2020 à 07:16 -0700, Matt Huszagh a écrit :
> rey-coyrehourcq  writes:
> 
> > I'm interested by this functionality, do you know if it was merged or i 
> > need to apply patch locally ?
> 
> Hi SR,
> 
> This hasn't been merged yet. I believe it's ready, but we're just
> waiting on a maintainer to apply it upstream. If you're able to apply
> the patch locally and provide feedback that always helps.
> 
> Matt
-- 

Sébastien Rey-Coyrehourcq
Research Engineer UMR IDEES
02.35.14.69.30

{Stronger security for your email, follow EFF tutorial : https://ssd.eff.org/}

--- lisp/ob-core.el
+++ lisp/ob-core.el
@@ -2745,12 +2786,21 @@ parameters when merging lists."
   results-exclusive-groups
   results
   (split-string
-   (if (stringp value) value (eval value t))
+   (if (stringp value)
+   value
+ (if (functionp value)
+	 (funcall value)
+   (eval value t)))
 	  (`(:exports . ,value)
 	   (setq exports (funcall merge
   exports-exclusive-groups
   exports
-  (split-string (or value "")
+  (split-string (or
+		 (if value
+		 (if (functionp value)
+			 (funcall value)
+		   value)
+		   ""))
 	  ;; Regular keywords: any value overwrites the previous one.
 	  (_ (setq params (cons pair (assq-delete-all (car pair) params)))
 ;; Handle `:var' and clear out colnames and rownames for replaced


signature.asc
Description: This is a digitally signed message part


Re: babel default header args as functions

2020-10-14 Thread rey-coyrehourcq
Hi there,

I'm interested by this functionality, do you know if it was merged or i need to 
apply patch locally ?

Thanks Matt for your work,

Best 
SR

Le mercredi 09 septembre 2020 à 12:33 -0700, Tom Gillespie a écrit :
> Hi Matt,
>Looking good here. Thanks!
> Tom
> 
> On Wed, Sep 9, 2020 at 12:06 PM Matt Huszagh  wrote:
> > Tom Gillespie  writes:
> > 
> > > [...] I have a number of use
> > > cases that I can imagine would benefit greatly from being able to
> > > define a :header-args: :header (lambda () "yay!") property as a
> > > closure (and actually I assumed that it would just work that way if I
> > > tried to do it, clearly not though). I can't tell for sure if the
> > > patch enables this behavior though or whether I would still get a
> > > Wrong type argument error.
> > 
> > This should work. Do you have reason for believing it might not?
> 
> With the patch applied this is working on my end.
> 
> * test header
> :PROPERTIES:
> :header-args:bash: :tangle (lambda () "./from-header.sh")
> :END:
> 
> #+begin_src bash :shebang "#!/usr/bin/env bash"
> echo yes
> #+end_src
> 
> > > [...] Looking
> > > at the patch it seems that it preserves the behavior of performing the
> > > evaluation of the closures at the source block, but I'm not 100% sure.
> > 
> > I'm not sure I completely understand what you mean here. However, the
> > closures are evaluated when point is at the source block, during the
> > source block evaluation, not when the default headers are declared. This
> > allows the closures to use context-dependent functionality (e.g. you can
> > call `org-element-at-point' inside the closure and retrieve whatever
> > information you want). Does this address your concern? Please clarify if
> > I've missed your point.
> 
> Yep, you've got it.
> 
> > > If the default header closures are being evaluated before checking
> > > whether they have been superseded by the headers on a block then that
> > > is incorrect and they should not be evaluated until it is clear that
> > > they are the value of the header for that block and have not been
> > > superseded.
> > 
> > I've fixed my patch (attached) so that now closures are only evaluated
> > when they are used as part of the final set of headers.
> 
> Great.
> 




signature.asc
Description: This is a digitally signed message part


bug on regex parsing breaks syntax highlighting on SRC block

2020-10-09 Thread rey-coyrehourcq
Hi,

I found that this specific line break syntax highlighting in org v9.4 : 

#+BEGIN_SRC nix
systemd.user.sessionVariables.NIX_PATH = lib.mkForce 
"nixpkgs=$HOME/nixpkgs\${NIX_PATH:+:}$NIX_PATH";
#+END_SRC

I suppose this is a bug localized on regex parsing, removing backslash here 
"\${NIX_PATH:+:}" repair the problem


Best regards,
-- 


Sébastien Rey-Coyrehourcq
Research Engineer UMR IDEES
02.35.14.69.30

{Stronger security for your email, follow EFF tutorial : https://ssd.eff.org/}




signature.asc
Description: This is a digitally signed message part


How to reinject custom function into derived backend which doesn't implement it, ex : footnote in ox-slimhtml backend.

2020-10-02 Thread rey-coyrehourcq

Hi,

I'm trying to develop my own `publish.el` for some research project linked to 
reproductibility. 
I chose ox-slimhtml [0] as derived backend to limit and simplify the html/css 
outputs generated by vanilla html
backend/publish. 

Actually footnotes are not defined in ox-slimhtml, so as i read in the org 
documentation [1] ), 
i try to add this capacity by simply calling vanilla ox-html function 
org-html-footnote-reference into translate-alist :

(org-export-define-derived-backend 'ox-slimhtml-publish-to-html 'slimhtml
  :translate-alist '((bold . ox-slimhtml-bold)
 
(footnote-reference . org-html-footnote-reference)
 (verse-block . org-html-
verse-block)
 (special-block . org-html-special-block)))

Using the vanilla ox-html export function, everything is awesome and footnote 
appear in my html, normal.
 
:publishing-function org-blog-publish-to-html 

But if i switch to ":publishing-function ox-slimhtml-publish-to-html" the 
function 
org-html-footnote-reference is never called.

There is something i don't understand in the processing of "translate-alist", 
so perhaps if the derived backend doesn't
implement a footnote-reference function, i cannot extend it ?

If you have some higlight on this, or solution on this problem, i'm interested.

[0] https://github.com/balddotcat/ox-slimhtml
[1] https://orgmode.org/manual/Advanced-Export-Configuration.html

Best 
-- 

Sébastien Rey-Coyrehourcq
Research Engineer UMR IDEES
02.35.14.69.30

{Stronger security for your email, follow EFF tutorial : https://ssd.eff.org/}



signature.asc
Description: This is a digitally signed message part


Re: official orgmode parser

2020-09-23 Thread rey-coyrehourcq
Hi Przemysław,

Some partial org Parsers (AST or regex...) i found on the web for a recent 
state of the art : 

* org-js
https://github.com/mooz/org-js

* orgajs
Orga is a flexible org-mode syntax parser. It parses org content into AST 
(Abstract Syntax Tree)
https://github.com/orgapp/orgajs
* orgparse
* org-mode-parser
https://github.com/daitangio/org-mode-parser
* org-rs
https://github.com/org-rs/org-rs
* org-ruby
https://github.com/wallyqs/org-ruby
* org-swift
https://github.com/orgapp/swift-org
* organice
https://github.com/200ok-ch/organice
* organum
https://github.com/seylerius/organum
* clj org
https://github.com/eigenhombre/clj-org
* orgmode-parse
https://github.com/ixmatus/orgmode-parse
* org-mode
https://www.fosskers.ca/
https://hackage.haskell.org/package/org-mode
* orgize
https://github.com/PoiScript/orgize
https://www.worthe-it.co.za/blog.html

Best regards,

Le mercredi 23 septembre 2020 à 19:46 +0200, Przemysław Kamiński a écrit :
> On 9/23/20 10:09 AM, Bastien wrote:
> > Hi Przemysław,
> > 
> > Przemysław Kamiński  writes:
> > 
> > > I oftentimes find myself needing to parse org files with some external
> > > tools (to generate reports for customers or sum up clock times for
> > > given month, etc). Looking through the list
> > > 
> > > https://orgmode.org/worg/org-tools/
> > 
> > Can you help on making the above page more useful to anyone?
> > 
> > Perhaps we can have a separate worg page just for parsers, reporting
> > the ones that seem to fully work.
> > 
> > I disagree that a parser is too difficult to maintain because Org is
> > a moving target.  Org core syntax is not moving anymore, a parser can
> > reasonably target it.  That's what is done with the Ruby parser, in
> > use in this small project called github.com :)
> > 
> > So I'd say:
> > 
> > - let's enhance Worg's documentation
> > - yes, please go for enhancing parsing tools
> > 
> > I don't think we need official tools.  The official Org parser exists,
> > it is Org itself.
> > 
> > Thanks,
> > 
> 
> Hello Bastien,
> 
> Thank you for your remarks.
> 
> I updated the README, hopefully it's more usable now.
> 
> Przemek
> 
-- 


Sébastien Rey-Coyrehourcq
Research Engineer UMR IDEES
02.35.14.69.30

{Stronger security for your email, follow EFF tutorial : https://ssd.eff.org/}






How to replace secrets during org-babel tangle/export without loosing the reproductibility of original script ?

2020-09-10 Thread rey-coyrehourcq
Hi there, 

First thanks again guys for all the works you doing on org-mode !

I'm searching a way or an example of workflow for such a thing i consider as a 
common pattern for reproductibility
(reproductible papers in science for example).

For example, i'm starting writing a blog post with org-mode and org-babel to 
deploy, for example, a nixOS system on a
VPS. I wrote some bash scripts and a configuration.nix for nixOS which contains 
my gpg key, my vps password, and so
on... When everything works right, i'm ready to publish my full working 
tutorial on web.

BUT as you imagine, i don't want to share secrets/password ... 

- A first solution was to replace password by some "foo-bar" things, but doing 
that i lost all the reproductibility of
this script in the future ... so this is silly.

- A second solution, i suppose, was to dynamically choose if i want to replace 
or not password/secrets/etc by "foo-bar"
things during tangle/export of the script. 

Because i'm not an expert in org-babel headers (so much possibilities ...), if 
you have some ready to go template/script
to do that into org-babel, i'm interested !

Best !

-- 


Sébastien Rey-Coyrehourcq
Research Engineer UMR IDEES
02.35.14.69.30

{Stronger security for your email, follow EFF tutorial : https://ssd.eff.org/}






Re: Contact data and sync revisited

2020-05-31 Thread rey-coyrehourcq
Hi,

There is probably something to do using EteSync end-to-end
Cardav/Caldav FOSS program https://www.etesync.com/ : 

- android / ios client
- contacts management
- task management and task.org compatibility : 
https://blog.etesync.com/tasks-org-adds-etesync-support/
- dav bridge / radicale : 
https://blog.etesync.com/desktop-dav-bridge-a-few-improvements-and-a-radicale-dependency-issue/
- gnome support (summer 2020) 

I'm a noob in lisp/elisp but there is probably something to write to
sync org data with client of this awesome FOSS tool.  

Best


Le dimanche 31 mai 2020 à 10:31 -0700, Eric Abrahamsen a écrit :
> Russell Adams  writes:
> 
> > I've been trying to find the best way to manage my contacts. I've
> > dabbled with
> > org-contact and using an Org file with property drawers, I've
> > dabbled with
> > BBDB. I've looked at standalone programs.
> > 
> > My key problem is I need a way to access my contacts in Emacs and
> > Mutt, and send
> > them to my Android phone. Single direction sync is fine.
> > 
> > Using a Nextcloud host, org-caldav, and DAVx5 I have already
> > successfully pushed my
> > calendar events to my Android phone. This makes it even more
> > important for me to
> > solve this issue finally.
> > 
> > I've considered the merit of a few options:
> > 
> >  - Use Org-contacts
> >- Pro: It's in org! So easy, lets me keep notes and appointment
> > data easily.
> >- Cons: Doesn't export at all.
> > 
> >  - BBDB
> >- Pro: It's in Emacs natively, with Org integration.
> >- Pro: Larger users base than Org-contacts, more software
> >- Cons: Exports but requires additional tools to sync
> > 
> > Unfortunately looking at the options keeps coming back to how poor
> > general
> > support for CardDAV and vcard files is. In particular, the popular
> > vdirsyncer
> > tool is now looking for a new maintainer, and I had the impression
> > from his list
> > of grievances he might drop it entirely.
> 
> This is not yet a working solution, but I'm gradually getting there
> with
> EBDB, a port/rewrite of BBDB. It does vCard export, though not very
> well
> yet. I've also written a library called "vcard", which does parsing
> of
> vcards into Elisp data, but have yet to get off my butt and wire
> everything together. The end result will be an EBDB database that
> uses
> the vCard format natively for storage.
> 
> Then I was planning on relying on vdirsyncer for CardDAV syncing, and
> it's a bummer to hear that it might go unmaintained. I could write a
> native CardDAV client using dav.el, but seeing how much fun David
> Engster has maintaining org-caldav, I'm not eager to go that route.
> 
> If you're interested, you can follow this issue.
> 
> https://github.com/girzel/ebdb/issues/4
> 
> Yes, it's issue #4, opened in 2016. Don't let that discourage you!
> 
> Eric
> 
-- 


Sébastien Rey-Coyrehourcq
Research Engineer UMR IDEES
02.35.14.69.30

{Stronger security for your email, follow EFF tutorial : 
https://ssd.eff.org/}




signature.asc
Description: This is a digitally signed message part


Re: Improving Org Mode for VSCode - Thinking Aloud

2020-05-24 Thread rey-coyrehourcq
Hi,

Really cool discussion here.

My two cents, Jupyter & Kernel on various langage, which have a very
large community, could be an interesting backend for org-babel on
VSCode or anyeditoryouwantusehere. 

Lot of things start to appear to collaborate online around
online/scientific cnotebook/literate programing this last year, and that 
continue, for example i discover recently :
Stencila : https://github.com/stencila=

org-babel / org-mode outside of emacs has a great potential to lead an
alternative to other markdown (RStudio / Jupyter) solution.

Best regards

Le dimanche 24 mai 2020 à 06:06 -0700, Jack Kamm a écrit :
> It would be very good indeed for org-babel if it could be ported to
> other editors. One of the biggest drawbacks of org-babel notebooks is
> that I can't collaborate with my colleagues on them, since I can't
> expect them to use Emacs.
> 
> Aside from VSCode, I think RStudio would be an excellent target for a
> few reasons:
> 
> - Literate programming is already popular among R users (see also:
>   knitr, sweave, Rmarkdown)
> - There is a strong ob-R community here
> - There are some prominent Emacs users among the Rstudio developers
>   (e.g. Lionel Henry, who I think is both an Rstudio and ESS
> developer)
> 
> However, this would be a massive undertaking, and ultimately would
> need
> a volunteer to step up to the plate. I don't have any bandwidth to do
> this in the foreseeable future but dream of working on it one day.
> The
> biggest downside -- it would require spending considerable time
> outside
> Emacs!
> 
-- 


Sébastien Rey-Coyrehourcq
Research Engineer UMR IDEES
02.35.14.69.30

{Stronger security for your email, follow EFF tutorial : 
https://ssd.eff.org/}




signature.asc
Description: This is a digitally signed message part


About options to export/tangle block for markdown or html, on a remote tramp ssh relative dir ?

2020-01-14 Thread rey-coyrehourcq
Hi,

I'm using tramp and remote ssh VM with org-mode v9 & org-babel  to
produce reproducible scientific document on web using ox-hugo. 

In this context, to describe my scientific workflow, i'm interested to
display html or markdown block content in my final exported document 
AND export this content as a file (bla.html or bla.org used as input
file for other scripts into org document) in my remote session.

I have a global header arg which define my session on vm  : 

:properties:
:header-args:sh: :dir /ssh:rzine@multipass:/home/rzine/
:end:

To move into different folders using relative or absolute path starting
from this remote :dir i found some weird solution, and ask for other
answer by org experts here : 
https://emacs.stackexchange.com/questions/54914/rewrite-relative-or-absolute-path-from-inherited-tramp-ssh-property-with-org-bab

But i face another problem, in the final document, i'm interest to
display and export html/markdown text, so i use BEGIN_EXPORT block.

#+BEGIN_EXPORT html
...
#+END_EXPORT 

#+BEGIN_EXPORT markdown
...
#+END_EXPORT 

But is it possible using options to :
- export this block as file using :tangle, 
- on a remote :dir using option for #+BEGIN_EXPORT ?

I search a little on the org doc and on the mailling list, but i see
nothing like this.

Thanks for your help,
Best,

-- 


Sébastien Rey-Coyrehourcq
Research Engineer UMR IDEES
02.35.14.69.30

{Stronger security for your email, follow EFF tutorial : 
https://ssd.eff.org/}




signature.asc
Description: This is a digitally signed message part


org-mode html export using bulma css ?

2019-11-27 Thread rey-coyrehourcq
Hi,

I'm interested to map the bulma https://bulma.io/ css framework to org-
mode html export.

I begin with exporter, so do you have any advice to do that ? 

Is there some way to map the css classes generated by org-html-to-html
to classes compatible with bulma framework ? 

Best regards

-- 

Sébastien Rey-Coyrehourcq
Research Engineer UMR IDEES
02.35.14.69.30

{Stronger security for your email, follow EFF tutorial : 
https://ssd.eff.org/}



signature.asc
Description: This is a digitally signed message part


Re: [O] Strange interaction between ID block property, org-schedule and ical/ics export backend

2019-09-02 Thread rey-coyrehourcq
Hi,
Sorry, i make a typo in the previous mail, i use the "org-icalendar-export-to-
ics" method and not the org-caldav method...
* Heading 1
SCHEDULED <...--...>
:PROPERTIES:
:ID: xxx
:END:
foo


Le dimanche 01 septembre 2019 à 09:29 +, Fraga, Eric a écrit :
> On Saturday, 31 Aug 2019 at 20:42, rey-coyrehourcq wrote:
> > I'm trying to create a day-to-day workflow with org-mode, org-agenda
> > Scheduleand iCalendat-export backend.
> 
> [...]
> > Normally org-caldav-generate-ics export command reuse the ID fromproperty
> > block to generate the *.ics, but it only works if theSCHEDULED block is
> > after the property block.
> 
> I don't know about org-caldav-generate-ics butorg-icalendar-export-to-ics
> works fine with the standard org format(deadline & scheduled entries ahead of
> properties drawer).  Thatfunction is in ox-icalendar.el.  Maybe try that
> instead of theorg-caldav-... method?
In my case, this Schedule event don't export with "org-icalendar-export-to-ics" 
... 
I'm using emacs 26.2 


Sébastien Rey-Coyrehourcq
Research Engineer UMR IDEES
02.35.14.69.30

{Stronger security for your email, follow EFF tutorial : https://ssd.eff.org/}




signature.asc
Description: This is a digitally signed message part


[O] Strange interaction between ID block property, org-schedule and ical/ics export backend

2019-08-31 Thread rey-coyrehourcq
Hi,

I'm starting using org-mode to replace asana, clickup, and other tools to manage
my work.

I'm trying to create a day-to-day workflow with org-mode, org-agenda Schedule
and iCalendat-export backend.

1) What exactly did you do 

After creating a new entry, i run (org-id-get-create) to get a permanent ID
properties :

* Heading 1
 :PROPERTIES:
 :ID: xxx
 :END:
  foo

2) what did you expect to happen

I run org-schedule (c-c c-s), choosing a date, and Schedule date is added AFTER
block of property.

* Heading 1
 :PROPERTIES:
 :ID: xxx
 :END:
 foo
 SCHEDULED <...--...>

3) What happened instead 

Scheduled block is added between the HEADING and the property block...

* Heading 1
 SCHEDULED <...--...>
 :PROPERTIES:
 :ID: xxx
 :END:
 foo

4) Problem with icalendar export ?

Normally org-caldav-generate-ics export command reuse the ID from property block
to generate the *.ics, 
but it only works if the SCHEDULED block is after the property block.

So in this case, icalendar export generate a new UID, and don't consider the ID
which already exist.




-- 


Sébastien Rey-Coyrehourcq
Research Engineer UMR IDEES
02.35.14.69.30

{Stronger security for your email, follow EFF tutorial : https://ssd.eff.org/}




signature.asc
Description: This is a digitally signed message part