Re: SQLite for contacts and relations to Org - Re: contact management in emacs

2022-10-11 Thread Sébastien Rey-Coyrehourcq
Hi Jean Louis,

First i want to thank you for this very detailled explanation, this is very 
valuable for someone that start in elisp like me.

Secondly, i found the idea of using sqlite for contacts very interesting, and i 
think a lot on this solution on my side the last weeks. With the new emacs 
interface to sql, it was easy i suppose to create a “both-way” syncing tool 
between org-contact (to easily maintain info, linking to notes, agenda, etc.) 
and a database that anyone could reuse, move, send also using mobile phone.

I use org-roam that use both of the two world, database and org, in the light 
of recent discussion, why we cannot do the same things for org-contact ? 
Linking / syncing properties with unique hash/id also stored in a database. If 
you have 15 contact, with 15 unique ID, and if you want to create an 
org-contact file/propertie into an org document, that’s probably easy to inject 
and maintain some sort of syncing (like org-roam do) between the info in 
database and the info into some properties block no ?

Best regards,
SR

Jean Louis  writes:

> * Sébastien Rey-Coyrehourcq  
> [2022-09-09 ven. 19:12]:
>> Hi,
>>
>> After some search today on the web, like Alan i try to compare all
>> possibility to manage my contact + mail using emacs, mu4e, and org.
>
> I will describe you how to manage contacts with Emacs in the reverse
> example reverse of what org-contacts tries to do for you.
>
> Org contacts try to keep people in Org file. Emacs 29 has a built-in
> SQLite database which allows every Emacs user to keep information in
> ordered, structured manner in the relational database.
>
> For people who do not use latest development Emacs version, there are
> SQLite Emacs packages that allow immediate usage of file based
> single-user access database, see <https://www.sqlite.org>
>
> In Emacs 29, here is how I create the SQLite database, or open the existing 
> one:
>
> (setq my-db (sqlite-open “~/my-people”))
>
> This is database handle:
>
> my-db ⇒ # name=/home/data1/protected/my-org-properties>
>
> This is how to create a table of `people’ in the database. The
> structure of the table `people’ is thus pretty much individual,
> one can record any kind of entries and be sure if the the entry
> is there or not. It does not allow vague guessing with text files
> like in Org or Hyrolo in Hyperbole.
>
> This is example table, one can build upon it. This one contains emails only.
>
> (sqlite-execute my-db “CREATE TABLE people1 (people_id INTEGER PRIMARY KEY,
>people_firstname TEXT,
>people_middlenames TEXT,
>people_name TEXT NOT NULL DEFAULT 
> ’>>>UNKNOWN<<<‘,
>people_email TEXT,
>people_description TEXT)”)
>
> This is how to get all queries from the table:
>
> (sqlite-select my-db “SELECT * FROM people”) ⇒ nil
>
> This is how to insert new entry programmatically:
>
> (sqlite-execute my-db “INSERT INTO people (people_firstname, people_name, 
> people_email)
>   VALUES (?, ?, ?)
>RETURNING people_id”
>   ’(“Robert” “Weiner” “r...@gnu.org”))
>
> Get information back from database, programmatically. Do with information 
> what you wish.
>
> (sqlite-select my-db “SELECT * FROM people”) ⇒ ((1 “Robert” nil “Weiner” 
> “r...@gnu.org” nil) (2 “Robert” nil “Weiner” “r...@gnu.org” nil))
>
> Delete everything in the database.
>
> (sqlite-execute my-db “DELETE FROM people”) ⇒ 0
>
> ;; Backup?
>
> Backup database by simple copy of the file “~/my-people”
>
> (sqlite-select my-db “SELECT * FROM people”) ⇒ nil
>
> Make nicer function to add new people:
>
> (defun my-people-add ()
>   (interactive)
>   (let* ((first-name (read-string “First name: ”))
>(middle-names (read-string “Middles names: ”))
>(name-or-last-name (let ((result))
> (while (not result)
>   (setq result (apply ’read-string ’(“Last name: 
> ”
> result))
>(email (read-string “Email: ”))
>(description (read-string “Description: ”)))
> (sqlite-execute my-db “INSERT INTO people (people_firstname, 
> people_middlenames, people_name, people_email, people_description)
>VALUES (?, ?, ?, ?, ?) RETURNING people_id”
>   (list first-name middle-names name-or-last-name 
> description
>
> Run the function by using (my-people-add) or M-x my-people-add
>
> Verify that per

Re: You can now support Org-mode through https://liberapay.com/org-mode/

2022-09-23 Thread Sébastien Rey-Coyrehourcq

Done !

Thanks for all your work !

Le 21/09/2022 à 08:34, Bastien a écrit :

Thanks for all you do – donation forthcoming!




Re: contact management in emacs

2022-09-09 Thread Sébastien Rey-Coyrehourcq

Hi,

After some search today on the web, like Alan i try to compare all 
possibility to manage my contact + mail using emacs, mu4e, and org.


Since Alan Schmitt message, i think many people jump into the great 
*org-roam* wagon to manage notes, bibliography, links, everything...


I'm into this *crazy* wagon, trying now to manage contact, with this 
workflow :


- one file/node by contact,
- stored into the org-roam specific folder "/myorgroamfolder/contact/ 
with this encrypted org pattern to protect files "*.org.gpg"

- using into mu4e

There are some post exploring part of this use case on the web, but i 
first focus to *org-contacts*, because it's well integrated with mu4e 
auto-completion :


Moving from org-contrib to https://repo.or.cz/org-contacts.git , 
accessible with melpa,  the documentation is mostly into the source-code 
actually, i found few example on the web .


What property field are correct :MOBILE:, :PHONE:, :BIRTHDAY: , and ?

I found some information about configuration in Terencio Agozzino 
dotfiles (https://github.com/rememberYou/.emacs.d) but when i try to 
adapt to this use case,
that don't work, probably because i misunderstand something, about 
properties name, or localization into the .org.gpg files.


I config like that (org-contacts-file (file-expand-wildcards 
"~/my-org-roam-folder/contact/*.org.gpg))


It's slow because everything need to be unencrypted before (this is 
another problem ...) but something i don't understand is how matching 
work :
calling "M-x org-contacts", i try multiple patterns, so i'm interested 
by a working org/org-roam contact example.


I found some alternatives to test next week :

- org-vcard (on github) compatible with org-contacts, focusing on 
import/export of vcard files

- mu4e-contacts (on gitlab) using helm / mu4e, inspired by org-contacts
- org-ql query ?

Best,

Sebastien R.C



Le 27/02/2021 à 12:08, Alan Schmitt a écrit :

Hello,

This may be slightly off-topic for the list, but as I’m considering
org-contacts for my question, I hope it will be of interest here.

I would like to migrate my contact management to emacs, as I’m already
using it for email. My requirements are the following ones:
- address completion in emacs email clients (I currently use notmuch)
- support for multiple email addresses and custom fields
- creation of org links to contacts
- export to vcard format for synchronization to my mobile phone (using
vdirsyncer)
- keep the data under version control

I have looked at two tools, which almost seem fit for the job.
- ebdb does most of this, with the exception of vcard export (it seems
to be worked on, https://github.com/girzel/ebdb/issues/60), and I’m not
sure using version control on an sqlite file is a good idea.
- org-contacts also seem to have all the required features, including
vcard export (and if not sufficient there is
https://github.com/novoid/org-contacts2vcard). I was worried it was
unmaintained when looking at the copyright line, but I see in
https://code.orgmode.org/bzg/org-mode/commits/master/contrib/lisp/org-contacts.el
that there are recent commits to the file.

Do you manage your contacts in emacs? And if so, what tools or workflow
do you recommend?

Best,

Alan




Re: Org babel Python and R, table not transformed when :var is called ?

2021-12-02 Thread Sébastien Rey-Coyrehourcq

Hi,

I found a solution using *Wrapping*, adding a #+NAME to #+RESULTS block 
resolve the problem.


This is not defined / described into the doc, and actually i found this 
process a little anti-intuitive. #+RESULTS has already a name, 
resulting/linked from/to the execution of mypythoncode ...


Best regards


#+NAME: attr_wrap
#+BEGIN_SRC sh :var data="" :results output
  echo "#+NAME: cities"
  echo "$data"
#+END_SRC

#+NAME:mypythoncode
#+begin_src python  :results value raw :output  :post 
attr_wrap(data=*this*) :return tabulate(df, headers=df.columns, 
tablefmt='orgtbl')

import numpy as np
import pandas as pd
from tabulate import tabulate
df = pd.DataFrame(np.random.randint(0,10,size=(10, 4)), 
columns=list('ABCD'))

#+end_src

Le 01/12/2021 à 09:04, Sébastien Rey-Coyrehourcq a écrit :


Hi there,

Perhaps it's a bug, or something i don't understand, i post on reddit 
(https://www.reddit.com/r/emacs/comments/r5yt4a/r_talking_with_python_using_orgtable_not_work/) 
to see if people on org community know the problem.


I cross post here to see if it's a know bug or somethings ?

There is something i don't understand,
a difference between behavior of org-babel and org-mode when you use 
org table to pass data using or not using :var.


|#+NAME:mypythoncode #+begin_src python :results value raw :output 
:return tabulate(df, headers=df.columns, tablefmt='orgtbl') import 
numpy as np import pandas as pd from tabulate import tabulate df = 
pd.DataFrame(np.random.randint(0,10,size=(10, 4)), 
columns=list('ABCD')) #+end_src #+RESULTS: mypythoncode | | A | B | C 
| D | |---+---+---+---+---| | 0 | 0 | 9 | 6 | 0 | | 1 | 2 | 9 | 0 | 4 
| | 2 | 9 | 6 | 0 | 1 | | 3 | 6 | 1 | 8 | 1 | | 4 | 4 | 2 | 1 | 4 | | 
5 | 2 | 1 | 1 | 1 | | 6 | 4 | 8 | 9 | 0 | | 7 | 1 | 4 | 8 | 7 | | 8 | 
9 | 3 | 2 | 5 | | 9 | 5 | 0 | 7 | 3 | #+NAME:lib-R #+HEADER: :var 
code=mypythoncode #+begin_src R :results output library(ggplot2) 
library(dplyr) library(lubridate) str(code) #+end_src #+RESULTS: lib-R 
: chr "| | A | B | C | D |\n|+-+-+-+-|\n| 0 | 8 | 
0 | 5 | 2 |\n| 1 | 2 | "| __truncated__ |


As you see, the org table is not recognized as a dataframe by R.

If i replace by a basic org table :

|||#+NAME: any_data | | parameter | value | |---+---+---| | 
0 | heats | 30 | | 1 | heats | 30 | #+NAME:lib-R #+HEADER: :var 
code=any_data #+begin_src R :results output library(ggplot2) 
library(dplyr) library(lubridate) str(code) #+end_src #+RESULTS: lib-R 
: 'data.frame': 2 obs. of 3 variables: : $ X : int 0 1 : $ parameter: 
chr "heats" "heats" : $ value : int 30 30 |||


That works...

Best regards,

||


Org babel Python and R, table not transformed when :var is called ?

2021-12-01 Thread Sébastien Rey-Coyrehourcq

Hi there,

Perhaps it's a bug, or something i don't understand, i post on reddit 
(https://www.reddit.com/r/emacs/comments/r5yt4a/r_talking_with_python_using_orgtable_not_work/) 
to see if people on org community know the problem.


I cross post here to see if it's a know bug or somethings ?

There is something i don't understand,
a difference between behavior of org-babel and org-mode when you use org 
table to pass data using or not using :var.


|#+NAME:mypythoncode #+begin_src python :results value raw :output 
:return tabulate(df, headers=df.columns, tablefmt='orgtbl') import numpy 
as np import pandas as pd from tabulate import tabulate df = 
pd.DataFrame(np.random.randint(0,10,size=(10, 4)), columns=list('ABCD')) 
#+end_src #+RESULTS: mypythoncode | | A | B | C | D | 
|---+---+---+---+---| | 0 | 0 | 9 | 6 | 0 | | 1 | 2 | 9 | 0 | 4 | | 2 | 
9 | 6 | 0 | 1 | | 3 | 6 | 1 | 8 | 1 | | 4 | 4 | 2 | 1 | 4 | | 5 | 2 | 1 
| 1 | 1 | | 6 | 4 | 8 | 9 | 0 | | 7 | 1 | 4 | 8 | 7 | | 8 | 9 | 3 | 2 | 
5 | | 9 | 5 | 0 | 7 | 3 | #+NAME:lib-R #+HEADER: :var code=mypythoncode 
#+begin_src R :results output library(ggplot2) library(dplyr) 
library(lubridate) str(code) #+end_src #+RESULTS: lib-R : chr "| | A | B 
| C | D |\n|+-+-+-+-|\n| 0 | 8 | 0 | 5 | 2 |\n| 1 | 
2 | "| __truncated__ |


As you see, the org table is not recognized as a dataframe by R.

If i replace by a basic org table :

|||#+NAME: any_data | | parameter | value | |---+---+---| | 0 
| heats | 30 | | 1 | heats | 30 | #+NAME:lib-R #+HEADER: :var 
code=any_data #+begin_src R :results output library(ggplot2) 
library(dplyr) library(lubridate) str(code) #+end_src #+RESULTS: lib-R : 
'data.frame': 2 obs. of 3 variables: : $ X : int 0 1 : $ parameter: chr 
"heats" "heats" : $ value : int 30 30 |||


That works...

Best regards,

||



OpenPGP_0xD262AFCCE42732D3.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


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