Re: [O] General advice beyond Org

2018-05-19 Thread Marcin Borkowski

On 2018-05-18, at 21:57, Adonay Felipe Nogueira  wrote:

> c) better: do it with only free/libre software, and perhaps even teach
>or show the people involved how to make use of tools that support
>your workflow. For example Software Carpentry has awesome
>collaborative material on the basics of VCS using Git and of
>statistics wih R.
>
>If you don't have time to teach, make use of a tool that eases *them*
>participating in their terms.
>
>As an example, I'm writing my final course work using Org-mode, LaTeX
>and TikZ/PGF (this last one is for graphics), and whenever I want to
>send a snapshot for review to my advisor I do so through making a
>.pdf, but there is even more...
>
>The .pdf files don't actually track changes, so I must go into the
>extra step of doing the following:

Or use latexdiff (in case of LaTeX).

Hth,

-- 
Marcin Borkowski
http://mbork.pl



Re: [O] General advice beyond Org

2018-05-19 Thread Marcin Borkowski

On 2018-05-18, at 15:50, hymie!  wrote:

> For example, good luck finding free software that will do your taxes.

I, for that matter, do not use any proprietary software to do my taxes.
(And BTW, I'm not religiously following the "only use free software"
mantra, in fact, I feel some distance to the FSF ideals.)

Best,

-- 
Marcin Borkowski
http://mbork.pl



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-19 Thread edgar

Message: 14
Date: Fri, 18 May 2018 12:01:22 +0200
From: Joseph Vidal-Rosset 
To: emacs-orgmode list 
Subject: Re: [O] export to odt with LaTeX math formulae and tables
Message-ID: <87fu2p8eq5@gmail.com>
Content-Type: text/plain

Dear Edgar,

Thanks for your help on the export of bibliography for docx or odt. I 
am

going to persist in trying to succeed it.


One is glad to be of help :) ;) .



About proof.sty, really there is not  the least problem from org-mode 
to
latex, everything  is smoothly  exported and the  final pdf  document 
is
really nice (with the really pretty 
smfart.class

[[http://smf4.emath.fr/Publications/Formats/]] that I advice.)


I will try that. Thanks.



No,  my problem  is only  with the  export of  these proof  to odt,


Oh, I know!


and
Authorea fails  also (that is  the main reason  why I gave  up 
Authorea,
which seems  to me  being a  nice project, but  not complete  enough 
and

therefore unfortunately  useless for me).


I'm sorry if I mislead you: the only thing that I recommended was the 
LaTeXML style from them. I don't know what Authorea is, actually.



The  only reasonable solutions
seems to me the png export from a succeeding org export to an odt file.


This is by far the quickest solution, and if you don't care about having 
others modify your equations in the ODT, go for it! I would even send a 
compressed file with the Org and other required files (.bib, .png, 
etc.).


I make no promises, but I will try to make a template for you that can 
export tables and equations (on my machine)




Best wishes,

--
Joseph


I wish you the best of luck on this :) .

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-19 Thread edgar

Message: 16
Date: Fri, 18 May 2018 14:48:56 +0200
From: Joseph Vidal-Rosset 
To: emacs-orgmode list 
Subject: Re: [O] export to odt with LaTeX math formulae and tables
Message-ID:

Content-Type: text/plain; charset="utf-8"

Hello again,

I just got this message error:

OpenDocument export failed: Wrong type argument: listp, 67




What is the meaning of this message and how can I do?

Many thanks for your help,

Jo.


I don't really know, Jo, but whenever I get something like that it means 
that

1. there is something wrong with my .emacs, or
2. there is something wrong with my document (strange character, missing 
bracket, mistyped #+OPTIONS line, etc.).


I would (and usually)
0. Open the *Messages* buffer to see if there is some useful information 
there.

1. fire up a new emacs ::  ~emacs -Q~,
2. load package ::  M-: (require 'package),
3. initialize package ::  M-: (package-initialize),
4. load Org ::  M-: (require 'org)   (you may need a path, if you did 
not install from elpa or similar).
5. take the document by chunks, export it piece by piece, and try to 
find which part holds the bug.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Should org-complete-tags-always-offer-all-agenda-tags be documented in the manual? [was: Tag completion does not work well with ...]

2018-05-19 Thread Nicolas Goaziou
Hello,

alain.coch...@unistra.fr writes:

> My reasoning was that, at section "6.2" and upon sequential reading,
> the user does not really know what agenda files are yet.  I was hoping
> that the excerpt:
>
>   ‘C-c a m (org-tags-view)’
>Create a global list of tag matches from all agenda files.
>  *Note Matching tags and properties::.
>
> could him to get acquainted with the concept.  In fact I hesitated
> between this link and, as is sometimes done in similar cases, the link
> to "10 Agenda views"[fn:1], but which I found too general.

OK.

> But perhaps it is not pertinent to assume sequential reading.  Or
> perhaps (a digest of) "10 Agenda views" should appear earlier in the
> manual.

I added the variable in the manual, in a footnote, as you suggested.
However, I made the link point to "Agenda Views" because I think this is
a better starting place for all Agenda related questions.

Thank you.

Regards,

-- 
Nicolas Goaziou0x80A93738



Re: [O] Inheriting some local variables from source code block editing buffers

2018-05-19 Thread Nicolas Goaziou
Hello,

Göktuğ Kayaalp  writes:

> And here it is.  Please find the patch attached.

Thank you. Comments follow.

> I have ran the entire test suite against this, which completed w/
> 6 failures, seemingly unrelated (they fail on revision 58c9bedfd too);

You may be using an old revision. I see no error from tests in HEAD.

> find the list below. I have tried to follow apparent conventions in
> each file w.r.t. the copyright/authors lines, sorry if I modified them
> unnecessarily.

Usually, we do not modify authors lines, which represents the people who
initially wrote the file. No worries, though.

> Subject: [PATCH] Implement edit bindings feature
>
> Enable defining local variable bindings to be applied when editing
> source code.
>
> * lisp/org-src.el (org-src--apply-edit-bindings)
> (org-src--simplify-edit-bindings)
> (org-src--parse-edit-bindings)
> (org-src--edit-bindings-string)
> (org-src--get-edit-bindings-for-subtree)
> (org-src--get-edit-bindings-from-header)
> (org-src--collect-global-edit-bindings)
> (org-src--collect-edit-bindings-for-element): New functions.
> (org-src-apply-risky-edit-bindings): New defcustom.
> (org-src--edit-element):
> * doc/org.texi (Editing source code): Add edit bindings.

"org.texi" no longer exists in master. We write the manual as an Org
file: "org-manual.org".

> +It is possible to define local variable bindings for these buffers using the
> +@samp{edit-bindings} element header, the @samp{edit-bindings} buffer
> +property, or the @samp{EDIT_BINDINGS} entry property.  All three can be used
> +together, the bindings from the header override those of the subtree, and
> +they both override the bindings from buffer properties.  The syntax is
> +similar to that of @code{let} varlists, but a sole symbol means the
> +variable's value is copied from the Org mode buffer.  Multiple uses of
> +@samp{edit-bindings} headers and buffer properties are supported, and works
> +like @code{let*}.  Entry property @samp{EDIT_BINDINGS} can not be repeated.
> +Below is an example:

It seems you are partly re-inventing the wheel here. Org already has
such mechanism, called Babel headers:

#+PROPERTY: header-args :edit-bindings '(...)

:PROPERTIES:
:HEADER-ARGS: :edit-bindings '(...)
:END:

#+header: :edit-bindings '(...)
...

Of course, this is currently limited to source blocks and inline source
blocks. However, I think it is better to extend them to your use-case
than rewriting something different, albeit similar.

You already looked at `org-babel-get-src-block-info'. You may want to
start hacking on it and extend it instead of providing your own tools.

>  ** New features
> +*** Set local variables for editing blocks
> +Bindings from =edit-bindings= header and buffer property, and
> +=EDIT_BINDINGS= entry property are applied in Org Src buffers.  For
> +example, when editing the following code block with
> +~org-edit-special~:

AFAIU, these bindings are not used when evaluating the buffer, which may
be surprising. What about calling them :local-bindings instead
of :edit-bindings and handle them in Babel too?

In this case, what would be the difference with, e.g., 

:var lexical-binding=t

> +(defun org-src--apply-edit-bindings (simplified-bindings)

Could you provide a docstring for the functions?

> +  (pcase-dolist (`(,name . ,value) simplified-bindings)
> +(let ((prompt-apply
> +(concat "Setting risky local variable ‘%S’"
> +" in edit-special buffer, its value is: %S; Continue?"))

You can use \ + \n, i.e., continuation string instead of calling
`concat' each time.

> +   (risky-message "%s risky local variable ‘%S’ in edit-special buffer.")

I suggest to use two different messages instead of doing the above, if
one day we move to proper i18n.

> +   (apply-binding (lambda () (set (make-local-variable name)
> +  (eval value)
> +  (unless
> +   (and
> +(risky-local-variable-p name)
> +(cond ((or (and (eq org-src-apply-risky-edit-bindings 'ask)
> +(y-or-n-p (format prompt-apply name value)))
> +   (eq org-src-apply-risky-edit-bindings 'apply-silent))
> +   (funcall apply-binding))
> +  (org-src-apply-risky-edit-bindings
> +   (prog1
> +   (funcall apply-binding)
> + (message risky-message "Applied" name)))

You probably mean

  (funcall apply-binding)
  (message ...)
  t

which is clearer, IMO.

> +  ((not org-src-apply-risky-edit-bindings)
> +   (message risky-message "Skipped" name))
> +  ((eq org-src-apply-risky-edit-bindings 'skip-silent))
> +  ('else
> +   (user-error
> +"Unexpected value for ‘%S’, will not apply this or any more 
> bindings."
> +'org-src-apply-risky-edit-bindings

Error messages must not end with a period.

> + (funcall apply-bindi

Re: [O] [PATCH] Add new keyword :coding for #+include directive

2018-05-19 Thread Nicolas Goaziou
Hello,

pierre.techouey...@free.fr (Pierre Téchoueyres) writes:

> I reattach the examples, but note that  the cmd.txt or sh.txt extensions
> are only there to avoid my mail to be wiped out.

I must be missing something. When I install both patches, and I export
your example to, e.g., UTF-8, I get the following document, where coding
systems are not resolved.

--8<---cut here---start->8---
1 Pierre Téchoueyres


  bad
  ┌
  │ @echo off
  │ 
  │ echo Hello Pierre T├Üchoueyres ├▒
  │ 
  │ rem Local Variables:
  │ rem coding: cp850-dos
  │ rem mode: bat
  │ rem End:
  └
  or
  ┌
  │ #!/bin/sh # -*- coding: iso-8859-15-unix -*-
  │ 
  │ echo "Hello Pierre Téchoueyres"
  │ 
  │ # Local Variables:
  │ # coding: iso-8859-15-unix
  │ # End:
  └

  and good ?
  ┌
  │ @echo off
  │ 
  │ echo Hello Pierre TÚchoueyres ñ
  │ 
  │ rem Local Variables:
  │ rem coding: cp850-dos
  │ rem mode: bat
  │ rem End:
  └
  or
  ┌
  │ #!/bin/sh # -*- coding: iso-8859-15-unix -*-
  │ 
  │ echo "Hello Pierre Téchoueyres"
  │ 
  │ # Local Variables:
  │ # coding: iso-8859-15-unix
  │ # End:
  └
--8<---cut here---end--->8---

Regards,

-- 
Nicolas Goaziou0x80A93738


Re: [O] export to odt with LaTeX math formulae and tables

2018-05-19 Thread Joseph Vidal-Rosset
Dear Edgar,

At the  moment, the results that  I get with  the odt export are  not so
bad. Bibliography  works and images  for proofs also. Therefore  I guess
that the problems that I have really to solve are minor.

We stay in touch and I will inform you.

Best wishes, 

-- 
Jo. 



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-19 Thread Joseph Vidal-Rosset
Hello,

Edgar was right: the problems that I had with the odt export came from my
file "user.el" i.e. the file for my setup of preferences for scimax. With a
minimal user.el file containing the latex packages that I need , the export
is now almost perfect. Are still lacking the right numbering of equations
and references for these equations, and the bibliography is not pretty. But
the main work is done.

Best wishes,

Jo.

2018-05-19 15:32 GMT+02:00 Joseph Vidal-Rosset <
joseph.vidal.ros...@gmail.com>:

> Dear Edgar,
>
> At the  moment, the results that  I get with  the odt export are  not so
> bad. Bibliography  works and images  for proofs also. Therefore  I guess
> that the problems that I have really to solve are minor.
>
> We stay in touch and I will inform you.
>
> Best wishes,
>
> --
> Jo.
>


Re: [O] [PATCH] Add new keyword :coding for #+include directive

2018-05-19 Thread Pierre Téchoueyres
Hello Nicolas,
it's really strange.
I've checked it another time some minutes ago and, on my machine, this
works.
I've used the following command to do the test :
for emacs 25.3
#+begin_src sh
emacs -Q -L lisp -L ~/.emacs.d/elpa-25/htmlize-20180412.1244 -l 
~/.emacs.d/elpa-25/htmlize-20180412.1244/htmlize-autoloads.el 
testing/examples/test.org
#+end_src

for Emacs 26.1 (934bb475b9)
#+begin_src sh
emacs -Q -L lisp -L ~/.emacs.d/elpa-25/htmlize-20180412.1244 -l 
~/.emacs.d/elpa-25/htmlize-20180412.1244/htmlize-autoloads.el 
testing/examples/test.org
#+end_src

And I still obtain the expected results : see the text attached file
(encoded in utf-8-unix).

 TEST WITH DIFFERENT ENCODINGS.

   Pierre TÚchoueyres



Table of Contents
 

1. Pierre TÚchoueyres





1 Pierre TÚchoueyres


  bad
   
@echo off

echo Hello Pierre T┌choueyres ±

rem Local Variables:
rem coding: cp850-dos
rem mode: bat
rem End:
   
  or (only without
  0001-Manage-correctly-the-encoding-of-files-with-include-.patch
  applied)
   
#!/bin/sh # -*- coding: iso-8859-15-unix -*-

echo "Hello Pierre TÚchoueyres"

# Local Variables:
# coding: iso-8859-15-unix
# End:
   

  and good ?
   
@echo off

echo Hello Pierre TÚchoueyres  

rem Local Variables:
rem coding: cp850-dos
rem mode: bat
rem End:
   
  or
   
#!/bin/sh # -*- coding: iso-8859-15-unix -*-

echo "Hello Pierre TÚchoueyres"

# Local Variables:
# coding: iso-8859-15-unix
# End:
   

   
Org mode version 9.1.13 (release_9.1.13-763-gcd25c7 @ 
/home/ptechoueyres/Travail/VCS/emacs-org-mode/lisp/)
   

So I don't really understand what's appening.

Nicolas Goaziou  writes:

> Hello,
>
> pierre.techouey...@free.fr (Pierre Téchoueyres) writes:
>
>> I reattach the examples, but note that  the cmd.txt or sh.txt extensions
>> are only there to avoid my mail to be wiped out.
>
> I must be missing something. When I install both patches, and I export
> your example to, e.g., UTF-8, I get the following document, where coding
> systems are not resolved.
>
> 1 Pierre Téchoueyres
> 
>
>   bad
>   ┌
>   │ @echo off
>   │ 
>   │ echo Hello Pierre T├Üchoueyres ├▒
>   │ 
>   │ rem Local Variables:
>   │ rem coding: cp850-dos
>   │ rem mode: bat
>   │ rem End:
>   └
>   or
>   ┌
>   │ #!/bin/sh # -*- coding: iso-8859-15-unix -*-
>   │ 
>   │ echo "Hello Pierre Téchoueyres"
>   │ 
>   │ # Local Variables:
>   │ # coding: iso-8859-15-unix
>   │ # End:
>   └
>
>   and good ?
>   ┌
>   │ @echo off
>   │ 
>   │ echo Hello Pierre TÚchoueyres ñ
>   │ 
>   │ rem Local Variables:
>   │ rem coding: cp850-dos
>   │ rem mode: bat
>   │ rem End:
>   └
>   or
>   ┌
>   │ #!/bin/sh # -*- coding: iso-8859-15-unix -*-
>   │ 
>   │ echo "Hello Pierre Téchoueyres"
>   │ 
>   │ # Local Variables:
>   │ # coding: iso-8859-15-unix
>   │ # End:
>   └
>
> Regards,

-- 
| Pierre Téchoueyres -  Appt. 150 Bat. B
| Tel : 05 56 42 53 22  Res. Le FLORE  ___
|   09 51 40 74 43  32 rue Marcelin Berthelot  ,,,
| Port: 06 77 11 64 05  33200 CAUDERAN(o o)
| mailto:pierre.techouey...@free.fr ---ooO-(_)-Ooo---


Re: [O] export to odt with LaTeX math formulae and tables

2018-05-19 Thread Joseph Vidal-Rosset
Hello John, hello the list,

The results of my efforts to export an org file with equations, proofs and
so on to odt: imagemagick works, but the png images are ugly. References of
equations and bibliography do not work, because the png images do not
reproduce the org-ref references. I am afraid that by using another way of
exporting math. (Mathjax, Mathml...) I will not get the natural deductions
proofs that I get via proof.sty.  (The export to odt or docx seems to be a
real nightmare, and that is not very surprising, because LaTeX is the only
good solution...)

Best wishes,

Jo.

2018-05-19 17:52 GMT+02:00 Joseph Vidal-Rosset <
joseph.vidal.ros...@gmail.com>:

> Hello,
>
> Edgar was right: the problems that I had with the odt export came from my
> file "user.el" i.e. the file for my setup of preferences for scimax. With a
> minimal user.el file containing the latex packages that I need , the export
> is now almost perfect. Are still lacking the right numbering of equations
> and references for these equations, and the bibliography is not pretty. But
> the main work is done.
>
> Best wishes,
>
> Jo.
>
> 2018-05-19 15:32 GMT+02:00 Joseph Vidal-Rosset <
> joseph.vidal.ros...@gmail.com>:
>
>> Dear Edgar,
>>
>> At the  moment, the results that  I get with  the odt export are  not so
>> bad. Bibliography  works and images  for proofs also. Therefore  I guess
>> that the problems that I have really to solve are minor.
>>
>> We stay in touch and I will inform you.
>>
>> Best wishes,
>>
>> --
>> Jo.
>>
>
>


Re: [O] General advice beyond Org

2018-05-19 Thread Samuel Wales
perhaps we can start thinking about improving registration between formats?

if you export org [you posted to org mailng list] to a foreign format,
you want your collaborator to be able to edit, save, send back without
raising a sweat.

now you have to integrate the changes.  you want to do this without annoyance.

suppose you export comments in the foreign format that contain the
equivalent of persistent markers.  you might or might not be willing
to put org id or custom id on every heading, but there might be
workarounds that are not so intrusive.  maybe your source can contain
comments with markers.  dunno.

if your exported document is a subtree within a huge org file that you
edit all the time, registration allows your software to identify that
subtree, so you're not trying to change anything outside that subtree.
that alone is a win.

but maybe we can do more.  the markers can register sections or even
paragraphs if you're doing intensive collaboration.  the tricky part
might be getting standard tools to understand that the mapping of
markers takes precedence over everything else.

details of this handwavey and possibly impossible brainstorm are left
as an exercise for the reader.



[O] Exporting ODT to Org [was Re: General advice beyond Org]

2018-05-19 Thread edgar

On 2018-05-20 01:24, Samuel Wales wrote:
perhaps we can start thinking about improving registration between 
formats?


I don't really know what this means.


if you export org [you posted to org mailng list] to a foreign format,
you want your collaborator to be able to edit, save, send back without
raising a sweat.


Not really, although it would be nice--and possibly titanic to do.

now you have to integrate the changes.  you want to do this without 
annoyance.


suppose you export comments in the foreign format that contain the
equivalent of persistent markers.  you might or might not be willing
to put org id or custom id on every heading, but there might be
workarounds that are not so intrusive.  maybe your source can contain
comments with markers.  dunno.


Every great project had to start somewhere (this sounds like that). 
However, if I am going to devote time to such a gigantic task, I would 
rather spend it trying to convert others to free software rather than 
doing favours to a closed format. I am not saying that it wouldn't be 
nice to have it.



if your exported document is a subtree within a huge org file that you
edit all the time, registration allows your software to identify that
subtree, so you're not trying to change anything outside that subtree.
that alone is a win.


This sounds like a project for people in LibreOffice or Pandoc. I think 
I will contact them to see if they are interested.




but maybe we can do more.  the markers can register sections or even
paragraphs if you're doing intensive collaboration.  the tricky part
might be getting standard tools to understand that the mapping of
markers takes precedence over everything else.


Yes, big project.



details of this handwavey and possibly impossible brainstorm are left
as an exercise for the reader.


LL! you remind me of books with notes such as "after deriving the 
equation one arrives to the following expression" :P !


Thank you.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!