Re: [O] Bug: Documentation of the html-export of links across files [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.5/lisp/org/)]

2016-03-12 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

> Unfortunately, this feature is very experimental, and actually quite
> buggy. It's not ready for prime time, and therefore not documented.

Actually, references across files should work out the box now. I added
documentation in (info "(org) Publishing links").



Re: [O] export to markdown: a simpler version which is more suited for github etc

2016-03-12 Thread Nicolas Goaziou
Hello,

Uwe Brauer  writes:

> I attach 3 files a original README-bitbucket.md from a bitbucket repo. I
> converted it to org (via pandoc) README.org and then back using the
> internal org converter to md, the result README.md is more complicated.
> So the question is simply this could the converter be configured to use
> a simpler conversion?

See `org-export-with-toc'.

Regards,

-- 
Nicolas Goaziou



Re: [O] using vref in latex export, and normal links in html export

2016-03-12 Thread John Kitchin
I guess these are defined in backends, e.g. org-latex-link.

Alan Schmitt writes:

> On 2016-03-11 16:05, Alan Schmitt  writes:
>
>> On 2016-03-11 15:02, John Kitchin  writes:
>>
>>> Try:
>>>
>>> (setq org-latex-prefer-user-labels t)
>>>
>>> I think this does what you want for org 8.3.4 at least.
>>
>> Thank you! This is what I was missing.
>
> As a followup question, I read the documentation for `org-add-link-type`
> which says "Org mode has a built-in default for exporting links." What
> is the name of that function? I would like to change Eric's function to
> something like:
>
> #+begin_src elisp
>   (org-add-link-type "vref" nil
>  (lambda (path desc format)
>(cond
> ((eq format 'latex)
>  (format "\\vref{%s}" path))
> (t (call org default)
> #+end_src
>
> I searched through ox.el but could not find that function.
>
> Thanks,
>
> Alan


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



Re: [O] using vref in latex export, and normal links in html export

2016-03-12 Thread John Kitchin
you could also try redefining the export of a ref link like this.

#+BEGIN_SRC emacs-lisp
(setf (elt  (assoc "ref" org-link-protocols) 2)
  (lambda (keyword desc format)
(cond
 ((eq format 'latex)
  "\\vref{keyword}")
 ((eq format 'html)
  (format
   "%s"
   keyword (or desc ""))
#+END_SRC

I am not sure if that is the kind of html export you want, but you could
adapt it to something else.

Stefan Nobis writes:

> Alan Schmitt  writes:
>
>> I'm converting a latex document into org-mode to easily export it both
>> to latex and html. I've just encountered something that I don't know how
>> to do: export a \vref reference. I would like to have something that
>> exports to \vref in latex, and to a normal link in html.
>
> I solve this with the help of an export filter:
>
> --8<---cut here---start->8---
> (defun sn/ox-latex-filter-varioref (text backend info)
>   (when (org-export-derived-backend-p backend 'latex)
> (replace-regexp-in-string "ref{" "vref{" text)))
>
> (eval-after-load "ox-latex"
>   '(progn
>  (add-to-list 'org-export-filter-link-functions 
> 'sn/ox-latex-filter-varioref)))
> --8<---cut here---end--->8---


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



Re: [O] Bug: ox-html.el does not indicate enough languages [8.2.10 (release_8.2.10 @ c:/Users/txiong/emacs-24.5/share/emacs/24.5/lisp/org/)]

2016-03-12 Thread Robert Klein
Hi,


thanks for the report.

I already began looking into this after my answer on stackexchange.
I'll try to make a patch in the next couple of days.  I want to run
some tests before submitting a patch.  You can expect a patch around
Tuesday/Wednesday.

Best regards
Robert



Tianxiang Xiong  wrote:

> Remember to cover the basics, that is, what you expected to happen and
> 
> what in fact did happen.  You don't know how to make a good report?
> See
> 
> 
> 
>  http://orgmode.org/manual/Feedback.html#Feedback
> 
> 
> 
> Your bug report will be posted to the Org-mode mailing list.
> 
> 
> 
> 
> 
> In the file "ox-html.el", the following bit of CSS displays the source
> 
> code block language's name on hover:
> 
> 
> 
>   pre.src:hover:before { display: inline;}
> 
>   pre.src-sh:before{ content: 'sh'; }
> 
>   pre.src-bash:before  { content: 'sh'; }
> 
>   pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
> 
>   pre.src-R:before { content: 'R'; }
> 
>   pre.src-perl:before  { content: 'Perl'; }
> 
>   pre.src-java:before  { content: 'Java'; }
> 
>   pre.src-sql:before   { content: 'SQL'; }
> 
> 
> 
> Org supports far more languages than this. In Section 14.7 of the Org
> 
> manual, the following languages are listed (formatting is screwed up):
> 
> 
> 
>   Language Identifier Language
> Identifier
> 
>   Asymptote  asymptote  Awk  awk
> 
>   Emacs Calc   calc   CC
> 
>   C++  C++Clojure  clojure
> 
>   CSS  cssditaaditaa
> 
>   Graphviz dotEmacs Lisp
> emacs-lisp
> 
>   gnuplot  gnuplotHaskell  haskell
> 
>   Java java
> 
>   Javascript   js LaTeXlatex
> 
>   Ledger   ledger Lisp lisp
> 
>   Lilypond lilypond   MATLAB   matlab
> 
>   Mscgen   mscgen Objective Caml   ocaml
> 
>   Octave   octave Org mode org
> 
>   Oz   oz Perl perl
> 
>   Plantuml plantuml   Python   python
> 
>   RR  Ruby ruby
> 
>   Sass sass   Scheme   scheme
> 
>   GNU Screen   screen shellsh
> 
>   SQL  sqlSQLite   sqlite
> 
> 
> 
> "ox-html.el" should support at least all the languages that Org mode
> supports by default.
> 
> 
> 
> Emacs  : GNU Emacs 24.5.1 (i686-pc-mingw32)
> 
>  of 2015-04-11 on LEG570
> 
> Package: Org-mode version 8.2.10 (release_8.2.10 @
> c:/Users/txiong/emacs-24=
> 
> .5/share/emacs/24.5/lisp/org/)




Re: [O] Exporting math code containing a cases environment to LaTeX

2016-03-12 Thread Francesco Turco
On Sat, Mar 12, 2016, at 19:16, Eric S Fraga wrote:
> Alternatively, you can enclose it all in a export block, as in
> 
> #+begin_export latex
> \[
> ...
> \]
> #+end_export

The following code doesn't work:

#+begin_export latex
\[
n!=
\begin{cases}
  1 & n=0 \\
  n(n-1)! & n\ge 1 \\
\end{cases}
\]
#+end_export

Because of the following error message:

> ! LaTeX Error: Environment export undefined.

But I can use #+begin_latex and #+end_latex instead.

I read the former syntax is new and will be released with Org Mode 9.0.
Is that true?

See https://www.mail-archive.com/emacs-orgmode@gnu.org/msg102960.html



[O] export to markdown: a simpler version which is more suited for github etc

2016-03-12 Thread Uwe Brauer

Hello

I attach 3 files a original README-bitbucket.md from a bitbucket repo. I
converted it to org (via pandoc) README.org and then back using the
internal org converter to md, the result README.md is more complicated.
So the question is simply this could the converter be configured to use
a simpler conversion?

Thanks

Uwe Brauer



README-bitbucket.md
Description: Binary data


README.md
Description: Binary data
* README

This README would normally document whatever steps are necessary to get
your application up and running.

** What is this repository for?

-  Quick summary: Our cool software

** Before we start

-  Installation:
-  sudo apt-get install hg
-  sudo apt-get install tortoisehg

** How do I get set up?

-  The .hgrc file

[ui] username = Uwe Brauer [[mailto:o...@mat.ucm.es][o...@mat.ucm.es]]

[paths]
default = git+ssh://o...@git.code.sf.net/p/matlab-emacs/src


** HOWTO

-  use thg, a graphical interface.
-  from the command line



Re: [O] Exporting math code containing a cases environment to LaTeX

2016-03-12 Thread Eric S Fraga
On Saturday, 12 Mar 2016 at 18:49, Francesco Turco wrote:
> I can fix the problem by replacing \[ and \] with \begin{displaymath}
> end \end{displaymath} respectively:
>
>   \begin{displaymath}  
>   n!=
>   \begin{cases}
> 1 & n=0 \\
> n(n-1)! & n\ge 1 \\
>   \end{cases}
>   \end{displaymath}
>
> Is this the best way to fix the problem? Am I missing a better solution?

The \[ ... \] construct is only valid, in org, if on a single
line.  Your solution is perfectly valid although, in practice, I would
use equation* instead of displaymath.

Alternatively, you can enclose it all in a export block, as in

#+begin_export latex
\[
...
\]
#+end_export

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.4-626-gb62d55



[O] Exporting math code containing a cases environment to LaTeX

2016-03-12 Thread Francesco Turco
Why the following piece of Org Mode document doesn't display correctly
when exported to a PDF document via LaTeX?

  \[n!=
  \begin{cases}
1 & n=0 \\
n(n-1)! & n\ge 1 \\
  \end{cases}
  \]

It is displayed at the left instead of center of the document.
Moreover the \[ and \] symbols are not removed in the final document.

I can fix the problem by replacing \[ and \] with \begin{displaymath}
end \end{displaymath} respectively:

  \begin{displaymath}  
  n!=
  \begin{cases}
1 & n=0 \\
n(n-1)! & n\ge 1 \\
  \end{cases}
  \end{displaymath}

Is this the best way to fix the problem? Am I missing a better solution?



Re: [O] Probable typo in the manual for org-timer-pause-or-continue key binding

2016-03-12 Thread Kyle Meyer
Tubo Shi  writes:

> Hi,
>
> In the current manual, it described the keybinding for both
> "org-timer-pause-or-continue" and "org-toggle-pretty-entities" to be "C-c
> C-x \".
>
> However, since release_8.3.4 the correct keybinding for
> "org-timer-pause-or-continue" is "C-c C-x ,".

Fixed.  Thank you.

-- 
Kyle



Re: [O] org-passwords.el and encryption

2016-03-12 Thread Eric S Fraga
On Saturday, 12 Mar 2016 at 11:50, Julien Cubizolles wrote:
> I've recently started using org-passwords.el. I'm using symmetric
> encryption for the gpg file where the passwords are stored. I've seen
> mention of several ways to avoid typing the passphrase over and over in
> one session: using gpg-agent or not... What would you recommend ?

I use gpg-agent in conjunction with keychain.  Generally works very
well.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.4-626-gb62d55



[O] org-passwords.el and encryption

2016-03-12 Thread Julien Cubizolles
I've recently started using org-passwords.el. I'm using symmetric
encryption for the gpg file where the passwords are stored. I've seen
mention of several ways to avoid typing the passphrase over and over in
one session: using gpg-agent or not... What would you recommend ?

Wilk.




Re: [O] commit 7b9f2fba66

2016-03-12 Thread Rafael Laboissiere

* Achim Gratz  [2016-01-26 18:11]:

Getting the copyright assigned would be good since if you've had some 
previous changes (not the two commits you did yourself), then quite 
likely you've already exhausted your TINYCHANGE budget.


The papers have been signed with the Free Software Foundation.  I went 
ahead and changed the org-contribute.org file in Worg to reflect the new 
situation [commit 697ec6c].  Please, tell me whether I should send the 
PDF file with the signed form to someone.


Best,

Rafael Laboissière



Re: [O] [PATCH] call_*() is not working inside #+DATE

2016-03-12 Thread Rafael Laboissiere

* Eric S Fraga  [2016-03-12 08:51]:


On Saturday, 12 Mar 2016 at 08:57, Rafael Laboissiere wrote:

P.S.: For those who are reading this message and are interested in a
solution for my original problem, here is the way I am getting around it
right now.


Thanks for this alternate solution.


You are welcome.

It would be much better if the following construct worked:

   #+DATE: src_sh{git show -s --date=short --format="%cd [%h]" HEAD}

Unfortunately, it does not.  This behavior (or misbehavior, I do not 
know) can be traced down to the org-element-context function.  Suppose 
that you have the following content in a org-mode buffer:


   #+DATE: src_sh{date}
   src_sh{date}

With the cursor just after the underscore in the #+DATE line, 
org-element-context returns:


   (keyword
(:key "DATE" :value "src_sh{date}" :begin 1 :end 22 :post-blank 0 
:post-affiliated 1 :parent nil))

On the other hand, with the cursor just after the underscore in the next 
line, org-element-context returns (as it should be):


   (inline-src-block
(:language "sh" :value "date" :parameters nil :begin 22 :end  34 
:post-blank 0
  :parent (paragraph (:begin 22 :end 35 :contents-begin 22 :contents-end 35 
:post-blank 0
  :post-affiliated 22 :parent nil

This is the reason why Org-babel does not evaluate the inline source 
block in the #+DATE line.


Best,

Rafael Laboissière



Re: [O] [PATCH] call_*() is not working inside #+DATE

2016-03-12 Thread Eric S Fraga
On Saturday, 12 Mar 2016 at 08:57, Rafael Laboissiere wrote:
> P.S.: For those who are reading this message and are interested in a 
> solution for my original problem, here is the way I am getting around it 
> right now.

Thanks for this alternate solution.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.4-626-gb62d55



Re: [O] using vref in latex export, and normal links in html export

2016-03-12 Thread Stefan Nobis
Alan Schmitt  writes:

> I'm converting a latex document into org-mode to easily export it both
> to latex and html. I've just encountered something that I don't know how
> to do: export a \vref reference. I would like to have something that
> exports to \vref in latex, and to a normal link in html.

I solve this with the help of an export filter:

--8<---cut here---start->8---
(defun sn/ox-latex-filter-varioref (text backend info)
  (when (org-export-derived-backend-p backend 'latex)
(replace-regexp-in-string "ref{" "vref{" text)))

(eval-after-load "ox-latex"
  '(progn
 (add-to-list 'org-export-filter-link-functions 
'sn/ox-latex-filter-varioref)))
--8<---cut here---end--->8---

-- 
Until the next mail...,
Stefan.



[O] Probable typo in the manual for org-timer-pause-or-continue key binding

2016-03-12 Thread Tubo Shi
Hi,

In the current manual, it described the keybinding for both
"org-timer-pause-or-continue" and "org-toggle-pretty-entities" to be "C-c
C-x \".

However, since release_8.3.4 the correct keybinding for
"org-timer-pause-or-continue" is "C-c C-x ,".


Thanks
Tubo Shi