[O] exporting LaTeX to ODT with custom symbols

2017-06-03 Thread edgar

Hello hackers,

I'm having some issues when exporting to ODT, and I would like to know 
if someone can help me. I tried my best to describe the problem in the 
the attached tmp.org. I also attach a symbols.tex which has my custom 
symbols.


Thank you for any help.


Edgar


-

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!  * Issue 1: custom symbols not exported
I am trying to export this to ODT without much
success (it exports well to PDF through LaTeX, and
the previews are fine).

This equation is exported correctly:
\[ a = 2 \]

This too.
\[ a = \frac{1}{2} \]

But this isn't.
\[ a = \deriv{x}{X} \]

The definition of deriv{}{} is in
the [[./symbols.tex][attached file]], and the preview seems to work
too (scale and symbol)

* Issue 2: when exported, resolution is unchanged
  I have tried to change the resolution of the
  exported image, but dvipng seems to disregard
  it.

* Configuration:noexport:
  I have this configuration (I just open the
  file). It asks me if I want to apply the "usafe"
  scale variable.
** Emacs configuration
   #+BEGIN_SRC emacs-lisp :results none
 (require 'package)
 (package-initialize)
 (use-package "org")
 (setq org-export-backends '(latex odt))
 (org-babel-do-load-languages 
'org-babel-load-languages  
'((shell . t)
  (emacs-lisp . t)))
   #+END_SRC
*** My system version
#+BEGIN_SRC emacs-lisp
  (org-version)
#+END_SRC

#+RESULTS:
: 9.0.7

#+BEGIN_SRC emacs-lisp
  (emacs-version)
#+END_SRC

#+RESULTS:
: GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
:  of 2015-01-11 on maritornes, modified by Debian

** Cleaning
   Before I do C-c C-e o o, I run this:
   #+BEGIN_SRC shell :results none
 rm -fr ltx{png,img}
   #+END_SRC

** General options
   - Load symbols
 #+LaTeX_HEADER: \input{./symbols.tex}

   - No table of contents
 #+OPTIONS: toc:nil
** Change the resolution of the exported equations (and previews)
   - Export (and preview) the equations as pictures
 The equation looks terrible with
 #+OPTIONS: tex:imagemagick

 There is a decent picture with dvipng, but I
 cannot improve it (uncomment if necessary)
 # #+OPTIONS: tex:dvipng

   - Improve the quality of the pictures (does not work)
 I just want to export; previewing with a
 different scale is an undesired side-effect
 # https://stackoverflow.com/a/20033865
 # Local Variables:
 # org-format-latex-options: (plist-put org-format-latex-options :scale 10 
:foreground default :background default)
 # End:

- This does not work either for the export (it
  does for preview):
 # org-format-latex-options: (:scale 10 :foreground default :background 
default)

- I have also tried with
  M-x customize-variable org-format-latex-options
% * Custom symbols **
% ***
% Change del operator to d (for maxima)
% 
http://tex.stackexchange.com/questions/178946/better-automatic-spacing-of-differential-d
\renewcommand{\d}[1]{\mathop{\mathrm{d}{#1}}\!{}}
\newcommand{\del}[1]{\d{\left(#1\right)}}
\newcommand{\diff}[2]{
  \frac{\d{}}{\d{#2}}
  \left(#1\right)}
\newcommand{\deriv}[2]{
  \frac{\del{#1}}{\d{#2}}}


[O] Warning (emacs): Please update your Org Protocol handler to deal with new-style links.

2017-06-03 Thread Samuel Wales
i am using the org-capture firefox extension.  org maint.  emacs 24.4.

finally, org capture is working properly.  i am grateful to everybody
who worked on it.

i am getting this warning:

Warning (emacs): Please update your Org Protocol handler to deal with
new-style links.

is it a concern?

-- 
The Kafka Pandemic: 

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
.



Re: [O] Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-497-g5bc540 @ /home/hs/.emacs.d/lib/org-mode/lisp/)]

2017-06-03 Thread Nicolas Goaziou
Hello,

"Stefan-W. Hahn"  writes:

> I use a minor mode (moccur-edit-mode, seems a little bit old) which
> initializes one variable in this way:
>
> ,
> | (defvar moccur-edit-old-content)
> | (make-local-variable 'moccur-edit-old-content)
> `
>
> This leads to following result in (buffer-local-variables):
>
> ,
> | ... (moccur-edit-file-overlays) moccur-edit-old-content (company-prefix) ...
> `
>
> I think this is correct and happens not only by the used minor-mode.
>
> When doing org-capture now I got a lisp error:
>
> Debugger entered--Lisp error: listp moccur-edit-old-content
>
> This error comes from org-clone-local-variables, because there the
> prediction for local variables is always to be a list.

Fixed. Thank you for the report and the analysis.

Regards,

-- 
Nicolas Goaziou



Re: [O] exporting markdown with tables

2017-06-03 Thread Peter Davis
Thanks, Vincente.

I'm specifically aiming at the Markdown syntax supported by the
Editorial app, which does include markup for tables. Unfortunately, it
looks like Editorial's Markdown doesn't use the initial '|', so simply
exporting the org markup won't work without some editing.
Thanks!
-pd

On Sat, Jun 3, 2017, at 12:31 PM, Vicente Vera wrote:
> There are several Markdown "forks" which have different sets of
> features.>
> AFAIK the markdown exporter in Org is based upon John Gruber's
> Markdown, which does not include a syntax for tables. Thus all tables> in Org 
> documents get exported as HTML.
>
> A workaround is to wrap your Org tables as:
>
> #+BEGIN_EXPORT md
> | Name   | Years |
> | Edward |44 |
> | Sylvia |45 |
> #+END_EXPORT
>
> On export to Markdown the tables will be kept unmodified as Org
> syntax.>
> It is important that you know which flavor of Markdown you're
> targeting, because not all versions accept tables in Org syntax.
> Pandoc's Markdown have a similar syntax for "pipe tables". However,
> you may type all tables in any syntax accepted by your Markdown
> version and keep them wrapped in #+BEGIN_EXPORT tags.
>
> 2017-06-03 13:41 GMT+00:00 Peter Davis :
> >
> > I'd like to be able to move easily between org-mode and the IOS app
> > Editorial, which is mainly based around markdown syntax. I can> > easily 
> > export markdown from org-mode, but the tables seems to come
> > through as straight HTML, as opposed to markdown's table> > syntax. This 
> > makes it more difficult to edit the resulting files.
> >
> > Is there a way to get org to export to markdown using md's table
> > syntax?> >
> > (FWIW, I tried using pandoc, but this just removed the table syntax
> > altogether, so an entire table would just run together into a> > paragraph 
> > of gibberish.)
> >
> > Thanks,
> > -pd
> >
> >


--
  Peter Davis
  www.techcurmudgeon.com



Re: [O] exporting markdown with tables

2017-06-03 Thread Vicente Vera
There are several Markdown "forks" which have different sets of features.

AFAIK the markdown exporter in Org is based upon John Gruber's
Markdown, which does not include a syntax for tables. Thus all tables
in Org documents get exported as HTML.

A workaround is to wrap your Org tables as:

#+BEGIN_EXPORT md
| Name   | Years |
| Edward |44 |
| Sylvia |45 |
#+END_EXPORT

On export to Markdown the tables will be kept unmodified as Org syntax.

It is important that you know which flavor of Markdown you're
targeting, because not all versions accept tables in Org syntax.
Pandoc's Markdown have a similar syntax for "pipe tables". However,
you may type all tables in any syntax accepted by your Markdown
version and keep them wrapped in #+BEGIN_EXPORT tags.

2017-06-03 13:41 GMT+00:00 Peter Davis :
>
> I'd like to be able to move easily between org-mode and the IOS app 
> Editorial, which is mainly based around markdown syntax. I can
> easily export markdown from org-mode, but the tables seems to come through as 
> straight HTML, as opposed to markdown's table
> syntax. This makes it more difficult to edit the resulting files.
>
> Is there a way to get org to export to markdown using md's table syntax?
>
> (FWIW, I tried using pandoc, but this just removed the table syntax 
> altogether, so an entire table would just run together into a
> paragraph of gibberish.)
>
> Thanks,
> -pd
>
>



Re: [O] clock-table property column empty

2017-06-03 Thread Nikolay Kudryavtsev

Cool, thanks.

--
Best Regards,
Nikolay Kudryavtsev




[O] exporting markdown with tables

2017-06-03 Thread Peter Davis

I'd like to be able to move easily between org-mode and the IOS app Editorial, 
which is mainly based around markdown syntax. I can
easily export markdown from org-mode, but the tables seems to come through as 
straight HTML, as opposed to markdown's table
syntax. This makes it more difficult to edit the resulting files.

Is there a way to get org to export to markdown using md's table syntax?

(FWIW, I tried using pandoc, but this just removed the table syntax altogether, 
so an entire table would just run together into a
paragraph of gibberish.)

Thanks,
-pd




[O] Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-497-g5bc540 @ /home/hs/.emacs.d/lib/org-mode/lisp/)]

2017-06-03 Thread Stefan-W. Hahn
Good day,

Emacs  : GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2017-05-20
Package: Org mode version 9.0.5 (release_9.0.5-497-g5bc540 @ 
/home/hs/.emacs.d/lib/org-mode/lisp/)

I use a minor mode (moccur-edit-mode, seems a little bit old) which
initializes one variable in this way:

,
| (defvar moccur-edit-old-content)
| (make-local-variable 'moccur-edit-old-content)
`

This leads to following result in (buffer-local-variables):

,
| ... (moccur-edit-file-overlays) moccur-edit-old-content (company-prefix) ...
`

I think this is correct and happens not only by the used minor-mode.

When doing org-capture now I got a lisp error:

Debugger entered--Lisp error: listp moccur-edit-old-content

This error comes from org-clone-local-variables, because there the
prediction for local variables is always to be a list.

I traced all other code points where (buffer-local-variables) is used:

,
| grep --color -nH -e buffer-local-var *.el
| 1. org-agenda.el:2158: (let ((save (buffer-local-variables)))
| 2. org.el:9401:  (buffer-local-variables)
| 3. org.el:9406:  (dolist (pair (buffer-local-variables from-buffer))
| 4. org-element.el:4091:   (t (let ((local-variables (buffer-local-variables)))
| 5. ox.el:2646: (dolist (entry (buffer-local-variables 
(buffer-base-buffer)) vars)
`

The code 2., 4. and 5. are correct, they use (consp v) or (symbolp v) to
decide what to do.

The code 1. and 3. are wrong. They both work directly with (car v) or
(cdr v).

For 1. and 3. I would like to suggest the following corrections:

modified   lisp/org-agenda.el
@@ -2159,11 +2159,12 @@ org-agenda-mode
   (kill-all-local-variables)
   (mapc 'make-local-variable org-agenda-local-vars)
   (dolist (elem save)
-(let ((var (car elem))
-  (val (cdr elem)))
-  (when (and val
- (member var org-agenda-local-vars))
-(set var val)
+(if (consp elem)
+(let ((var (car elem))
+  (val (cdr elem)))
+  (when (and val
+ (member var org-agenda-local-vars))
+(set var val))
 (setq-local org-agenda-this-buffer-is-sticky t))
(org-agenda-sticky
 ;; Creating a sticky Agenda buffer for the first time
modified   lisp/org.el
@@ -9404,11 +9404,12 @@ org-clone-local-variables
   "Clone local variables from FROM-BUFFER.
 Optional argument REGEXP selects variables to clone."
   (dolist (pair (buffer-local-variables from-buffer))
-(let ((name (car pair)))
-  (when (and (symbolp name)
-(not (memq name org-unique-local-variables))
-(or (null regexp) (string-match regexp (symbol-name name
-   (set (make-local-variable name) (cdr pair))
+(if (consp pair)
+   (let ((name (car pair)))
+ (when (and (symbolp name)
+(not (memq name org-unique-local-variables))
+(or (null regexp) (string-match regexp (symbol-name 
name
+   (set (make-local-variable name) (cdr pair)))
 
 ;;;###autoload
 (defun org-run-like-in-org-mode (cmd)


With kind regards,
Stefan

-- 
Stefan-W. Hahn  It is easy to make things.
It is hard to make things simple.