Re: [O] [bug] timed repeater shows up in wrong place

2016-11-26 Thread Samuel Wales
you recently fixed a few things from your patch.  dunno if it was
supposed to or not, but it seems to have cleared up a lot of bugs.

i found a lot of differences from org 8 to your patch, but only one
from org 8 to your recent fixes: a bare ts like <2016-11-23 Wed 12:00
.+1d> shows up twice in a 2-day span, but only showed up once in org
8.  i will post mce if needed.



[O] org-mode latex export - Links in multi-document files

2016-11-26 Thread mcg

Hello,

I have my PhD thesis divided into several documents (Intro, M, 
Results, Discussion...).

The document setup and the #+INCLUDE: commands are in my master file.

I sometimes make references to other sections which are in another 
section and document.
In order to not compile all the document (3 minutes +) every time I just 
comment out all the documents I do not need to.
If table and figure links are missing it exports fine (getting question 
marks in the pdf). However, the section links cause the compilation to 
stop entirely. Is there any workaround for that? Can I tell the exporter 
to ignore such minor missing crossreferences?






Re: [O] Bug: Windows-unfriendly filename in org-preview-latex-process-alist customization

2016-11-26 Thread Scott Otterson
Thanks Fabrice.  After more experimentation, I found that image-converter
field of the customization alist should be:

("dvipng -fg %F -bg %B -D %D -T tight -o \"%o%b\.png\" %f")

If this also works for *nix, then I hope that the org-mode maintainers will
make this string the new default.  If it doesn't work on linux, then I hope
that it's possible to come up with a string that works in both OS families
(and that could be the new default).  I'll be back on Linux in a few
months, and would love to keep a simple, cross-platform .emacs file.

On Sat, Nov 26, 2016 at 5:35 PM, Fabrice Popineau <
fabrice.popin...@supelec.fr> wrote:

>
>
> 2016-11-26 16:41 GMT+01:00 Scott Otterson :
>
>> In my Windows build of emacs, when I put the cursor in a latex equation
>> and run
>>
>> M-x org-toggle-latex-fragment
>>
>>
>> then things chug along for a second but then fail.  In the *Org Preview
>> LaTex Output* buffer, I see the message:
>>
>> This is dvipng 1.15 Copyright 2002-2015 Jan-Ake Larsson
>> [1
>> dvipng: Fatal error, cannot open output file
>> c:/Users/scott/AppData/Local/Temp/"orgtex4628hQG.png
>>
>>
>> The reason for the failure is the leftover quote (...Temp/"orgtex...) in
>> the expected png output file.  With some hackery, I can see that the
>> command that's being run is:
>>
>> dvipng -fg "rgb 0 0 0" -bg "rgb 1 1 1" -D "102.0" -T tight -o
>> "c:/Users/scott/AppData/Local/Temp/""orgtex4628hQG".png
>> "c:/Users/scott/AppData/Local/Temp/orgtex4628hQG.dvi"
>>
>>
>> If I paste that into a cygwin xterm, it runs fine on the .dvi file that's
>> still in the Temp directory.  But the command fails in a Windows cmd
>> window; if I remove the extra quotes, then the command works in the cmd
>> window too.
>>
>> The extra quote comes from the default customization for the dvipng
>> image-converter field of org-preview-latex-process-alist:
>>
>> dvipng -fg %F -bg %B -D %D -T tight -o %o%b.png %f
>>
>>
>>
> This command should read :
>
> dvipng -fg %F -bg %B -D %D -T tight -o "%o%b.png" %f
>
> and the args shouldn't be quoted before.
> Unquoting those strings will possibly require to change other command
> strings.
>
> Fabrice
>


Re: [O] org.texi edits, patch attached

2016-11-26 Thread Nicolas Goaziou
Hello,

Lambda Coder  writes:

> Nicolas, attached is the revised edits for:
>
> * Working with source code (2nd review)
> * Miscellaneous
> * Hacking
> * MobileOrg
>
> The patch is against maint branch from today.

Thank you. Some comments and suggestions follow.

Before starting however, I have one question: isn't replacing "code
block" with "src code block" everywhere a bit obnoxious? Couldn't define
once and for all that a "src block" is a code block and simply use "code
block" everywhere?

Also, your patch inserts trailing white spaces throughout the document.
Could you double-check that?

> +Org can flexibly export just the @emph{code} from the @samp{src} code blocks,
> +just the @emph{results} of evaluation of the @samp{src} code block,
> +@emph{both} the code and the results of @samp{src} code block evaluation, or
> +@emph{none}.  Org defaults to exporting @emph{code} for most languages.  For
> +some languages, such as @code{ditaa}, Org defaults to @emph{results}.  Each
> +of these options is described below.  For details about exporting just the
> +body of @samp{src} code blocks, see @ref{Literal examples}.  For details
> +about exporting portions (sub-trees) of an Org document, see
> @ref{Exporting}

  code blocks, @pxref{Literal examples}.

and,

  Org document, @pxref{Exporting}.

also,

  about exporting parts of an Org document 

i.e., drop "sub-trees", "portions" and the parenthesis.

> -The @code{:exports} header arguments control the export of code blocks (and
> -not inline code):
> +The @code{:exports} header arguments control the export of @samp{src} code
> +blocks (and not inline code):

  code blocks---and not inline code:

> -After each evaluation, results are inserted after the end of code block in
> -the Org buffer.  Previous results are either replaced (default) or appended
> -to.  On export, Org includes only the results and not the code block.
> +After each evaluation, Org inserts the results at the end of @samp{src} code
> +block in the Org buffer.  Previous results are either replaced (default) or
> +appended to.  On export, Org includes only the results and not the @samp{src}
> +code block.

  replaced---which is the default---or appended to...

>  @vindex org-export-use-babel
> -To stop Org from evaluating code blocks during export, set
> -@code{org-export-use-babel} variable to @code{nil}.  Turning off evaluation
> -comes in handy when batch processing.  For example, markup languages for
> -wikis, which have a high risk of untrusted code.  In this case, Org doesn't
> -process header arguments either.  For this reason it is often better to set
> -@code{:eval never-export} (@pxref{eval}) to prevent code evaluation but still
> -allow headers to be honored.  To evaluate just the inline code blocks, set to
> -@code{inline-only}.  Isolating inline evaluations is not for security but for
> -avoiding any delays due to recalculations during exports, such as calls to
> -a remote database.
> -
> -Org never evaluates code blocks in commented sub-trees when exporting
> -(@pxref{Comment lines}).  On the other hand, Org does evaluate code blocks in
> -sub-trees excluded from export (@pxref{Export settings}).
> +
> +To stop Org from evaluating @samp{src} code blocks during export, set
> +@code{org-export-babel-evaluate} variable to @code{nil}.  Stopping evaluation
> +comes in handy when batch processing in environments with high risk of
> +untrusted code, such as markup languages for wikis.  To evaluate only the
> +inline @samp{src} code blocks, set the variable to @code{inline-only}.  This
> +isolates evaluation not for any security reasons but for avoiding delays due
> +to recalculations during exports, such as calls to a remote database.
> +
> +Org never evaluates @samp{src} code blocks in commented sub-trees when
> +exporting (@pxref{Comment lines}).  On the other hand, Org does evaluate
> +@samp{src} code blocks in sub-trees excluded from export (@pxref{Export
> +settings}).

There is a gotcha here. This part was modified in master. It would be
better to preserve as much as possible the parts of the original text,
in particular the reference to ":eval no-export".

I suggest to find a common paragraph, simply replacing
`org-export-use-babel' with `org-export-babel-evaluate' for maint branch.

> -them in the Org file, right after the @samp{src} code block.  The insertion
> -point is after a newline and the @code{#+RESULTS} label.  Org creates the
> -@code{#+RESULTS} label if one is not already there.
> +them in the Org file, immediately following the @samp{src} code block.  The
> +insertion point is after a newline and the @code{#+RESULTS} label.  Org
> +creates the @code{#+RESULTS} label if one is not already there.
>  
> -By default, Org enables only @code{emacs-lisp} source code blocks for
> -execution.  See @ref{Languages} for identifiers to enable other languages.
> +By default, Org enables execution for only @code{emacs-lisp} @samp{src} code
> +blocks.  To add 

Re: [O] Org-mode 9.0 : set tangle file in document PROPERTY

2016-11-26 Thread Grant Rettke
On Fri, Nov 25, 2016 at 5:23 PM, mcg  wrote:
> What is the syntax to set tangling for the whole file?
> #+PROPERTY: tangle ~/filepath.R does not work anymore...

Via http://orgmode.org/manual/Header-arguments-in-Org-mode-properties.html

#+PROPERTY: header-args:tangle ~/filepath.R



[O] Error publishing a simple html page

2016-11-26 Thread Leandro Noferini
Ciao a tutti,

I defined a project to publish my blog:

(setq org-publish-project-alist
  '(("Blog"
:base-directory "~/org/"
:publishing-directory "~/Documenti/Personali/Blog/"
:base-extension "org"
:section-numbers nil
:table-of-contents nil
:include ("blog.org")
:exclude ".*"
:tasks nil
:author "Leandro Noferini"
:email "lnofe...@cybervalley.org"
:link-up nil   
:convert-org-links t
:publishing-function org-html-publish-to-html
)

Trying to publish with C-c C-e P x now gives me this error:

Publishing file /home/leandro/org/blog.org using ‘org-html-publish-to-html’
org-babel-exp process nil at position 95260...
apply: Wrong type argument: listp, #("Leandro Noferini" 0 16 (:parent (#0)))

-- 
leandro
1A0B 125B 2E4D 2DAE 4E26  4551 88FB BBCC 7A29 640B
https://bbs.cybervalley.org/ChiaveLeandro/gpg.html
http://6xukrlqedfabdjrb.onion


signature.asc
Description: PGP signature


Re: [O] org-mode - export as folder structure possible?

2016-11-26 Thread Karl Voit
* mcg  wrote:
>
> Hello,
>
> I need to create a rather complex folder structure.
> It is OK to create that in dired but I think even nicer and faster it 
> would be to create an org-mode outline which then exports this folder 
> structure to the org document's directory.
>
> This could even be extended to create blank files with file extension 
> within the directory - maybe communicated to the exporter with list items.
> Can the org-mode exporter be used or easily programmed for this kind of 
> application?

Take a look at:
https://www.reddit.com/r/orgmode/comments/5emuzc/mount_orgmode_files_as_fuse_file_systems/

Not exactly your use-case but you might get ideas.

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Orgmode for managing OS configuration

2016-11-26 Thread Karl Voit
* Giacomo M  wrote:
>
> Dear all,
> I would like to clean up my Linux setup to be easily replicable. I am
> considering keeping everything in one org file, and then tangling files
> (e.g. exec scripts, systemd service unit files) and executing bash snippets
> (e.g. for installing packages and sed'ing config files). Then one would
> need just emacs and git (or rsync) to start with.
>
> Does anybody have experience with this? Is the experience positive or
> negative?

I posted my approach on this list in May:

> From: Karl Voit 
> Subject: Re: Using source blocks instead of Ansible
> Message-ID: <2016-05-05t22-49...@devnull.karl-voit.at>
> Date: Thu, 5 May 2016 23:02:28 +0200

(Since the web interface of gmane is down for the moment, I can't
give you a link.)


I am not using tangling. I limit myself to just install packages and
modify settings via search/replace instead.

HTH

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Bug: Windows-unfriendly filename in org-preview-latex-process-alist customization

2016-11-26 Thread Fabrice Popineau
2016-11-26 16:41 GMT+01:00 Scott Otterson :

> In my Windows build of emacs, when I put the cursor in a latex equation
> and run
>
> M-x org-toggle-latex-fragment
>
>
> then things chug along for a second but then fail.  In the *Org Preview
> LaTex Output* buffer, I see the message:
>
> This is dvipng 1.15 Copyright 2002-2015 Jan-Ake Larsson
> [1
> dvipng: Fatal error, cannot open output file c:/Users/scott/AppData/Local/
> Temp/"orgtex4628hQG.png
>
>
> The reason for the failure is the leftover quote (...Temp/"orgtex...) in
> the expected png output file.  With some hackery, I can see that the
> command that's being run is:
>
> dvipng -fg "rgb 0 0 0" -bg "rgb 1 1 1" -D "102.0" -T tight -o
> "c:/Users/scott/AppData/Local/Temp/""orgtex4628hQG".png
> "c:/Users/scott/AppData/Local/Temp/orgtex4628hQG.dvi"
>
>
> If I paste that into a cygwin xterm, it runs fine on the .dvi file that's
> still in the Temp directory.  But the command fails in a Windows cmd
> window; if I remove the extra quotes, then the command works in the cmd
> window too.
>
> The extra quote comes from the default customization for the dvipng
> image-converter field of org-preview-latex-process-alist:
>
> dvipng -fg %F -bg %B -D %D -T tight -o %o%b.png %f
>
>
>
This command should read :

dvipng -fg %F -bg %B -D %D -T tight -o "%o%b.png" %f

and the args shouldn't be quoted before.
Unquoting those strings will possibly require to change other command
strings.

Fabrice


[O] Bug: Windows-unfriendly filename in org-preview-latex-process-alist customization

2016-11-26 Thread Scott Otterson
In my Windows build of emacs, when I put the cursor in a latex equation and
run

M-x org-toggle-latex-fragment


then things chug along for a second but then fail.  In the *Org Preview
LaTex Output* buffer, I see the message:

This is dvipng 1.15 Copyright 2002-2015 Jan-Ake Larsson
[1
dvipng: Fatal error, cannot open output file
c:/Users/scott/AppData/Local/Temp/"orgtex4628hQG.png


The reason for the failure is the leftover quote (...Temp/"orgtex...) in
the expected png output file.  With some hackery, I can see that the
command that's being run is:

dvipng -fg "rgb 0 0 0" -bg "rgb 1 1 1" -D "102.0" -T tight -o
"c:/Users/scott/AppData/Local/Temp/""orgtex4628hQG".png
"c:/Users/scott/AppData/Local/Temp/orgtex4628hQG.dvi"


If I paste that into a cygwin xterm, it runs fine on the .dvi file that's
still in the Temp directory.  But the command fails in a Windows cmd
window; if I remove the extra quotes, then the command works in the cmd
window too.

The extra quote comes from the default customization for the dvipng
image-converter field of org-preview-latex-process-alist:

dvipng -fg %F -bg %B -D %D -T tight -o %o%b.png %f


where the %o%b part of the customization concatenates two strings that are
already quoted. That's OK for *nix but apparently not for Windows.

I don't see a way to change the customization to fix this; can anyone take
a look at the elisp?

Thanks,

Scott

--- A test org file --

* Put cursor in the equation below and type C-c C-x C-l

\[
e^{i\pi} = -1
\]

--- My setup ---
Emacs  : GNU Emacs 25.1.1 (i686-w64-mingw32) of 2016-09-17
Package: Org mode version 9.0.1 (9.0.1-elpaplus @
c:/Users/scott/OneDrive/scotto/.emacs.d/elpa/org-plus-contrib-20161118/)


current state:
==
(too huge to send)


[O] Frame-break with beamer

2016-11-26 Thread Peter Sterner
Hi,

I'm trying to  export an org-file to a beamer presentation. I would like to
divide a frame into two or more frames.

Suppose I have this org-file:

* Heading 1
** Subheading 1
** Subheading 2
* Heading 2

When I export subheadings are shown as blocks and headings as frames.

I would like each subheading to become a frame (but only for the
subheadings of Heading 1).

How is that possible?

Regards,
Peter


Re: [O] export to single html file (like reveal_single_file:t) in regular html export

2016-11-26 Thread John Kitchin
Here is some code lightly modified from a comment by Evgeny here:
http://kitchingroup.cheme.cmu.edu/blog/2016/10/29/Sending-html-emails-from-org-mode-with-org-mime/

It seems to do what you want. Of course, I only tested it with one
image, one time, so I hope it works for you too! It assumes png, but it
would not be too hard to generalize.

#+BEGIN_SRC emacs-lisp
(defun org-image-data-uri (path)
  (let ((data (with-temp-buffer (insert-file-contents path) (buffer-string
(concat "")))

(defun my-link (link contents info)
  (let ((type (org-element-property :type link))
(path (org-element-property :path link)))
(if (and (string= type "file")
 (f-ext? path "png"))
(org-image-data-uri path)
  (org-html-link link contents info

(org-export-define-derived-backend 'my-html 'html
  :translate-alist '((link . my-link)))

(browse-url (org-export-to-file 'my-html "embedded-image.html"))
#+END_SRC

Xebar Saram writes:

> ping anyone :) gotta prepare new assignments for students next week :)
>
> On Sat, Nov 19, 2016 at 7:46 AM, Xebar Saram  wrote:
>
>> Hi all
>>
>> i love the option in org revel (reveal_single_file:t) that allows me to
>> export a presentation to my students with image support embedded in the
>> html file./
>>
>> ive searched for a way to do it in the normal org to html exporter with no
>> success. any clue how that can be done?
>>
>> best
>>
>> Z
>>


-- 
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] [PATCH] org-mac-link: Add autoload cookies for all commands

2016-11-26 Thread Nicolas Goaziou
Hello,

Chunyang Xu  writes:

> I would like to add autoload cookies for commands in org-mac-link.el, so
> I don't have to autoload them manually in my init.el.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] [bug] timed repeater shows up in wrong place

2016-11-26 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> not sure what you mean by no repeat is active.

It means that either the scheduled date has no repeater or the repeat
doesn't happen "today" (e.g., "+2d" repeat starting yesterday).

> * NOTE test event
> <2015-06-03 Wed 12:00 .+1d>
>
> does not show up in an agenda for today and tomorrow.

I cannot reproduce it.

> * NEXT [#A] soon end test
> DEADLINE: <2016-12-01 Thu -30d>
>
> does not show up either.  this deadline is only a few days away.

I cannot reproduce it either.


Regards,

-- 
Nicolas Goaziou