[O] Feature request: enable toggling of \centering in Latex figure export

2016-06-29 Thread Spencer Hill
Hello,

First time contributor.  Emacs 24.5.1, Org mode 8.3.4.

MWE:
#+CAPTION: Figure caption.
[[file:figure01.pdf]]

Issue:
When an image is exported to LaTeX as a float, the \centering command is 
hard-coded into the export: see org-latex--inline-image in ox-latex.el.  This 
is not the case for tables, for which centering can be toggled via 
#+ATTR_LATEX: centering t.  I would like for this same centering option to be 
made available for figure floats also.

Motivation:
I am attempting to render a .tex file for an article submission to a journal, 
and the publisher requires the figures to be left-aligned.

It seems like a simple enough patch, but I have 0 elisp experience so wouldn't 
be the person for the job.  Or let me know if I'm missing something.  Thanks!

Best,
Spencer

Spencer Hill
spencerah...@gmail.com
(913) 515-8527



Re: [O] ox-clip.el

2016-06-29 Thread Jiegec

I’m testing this in OS X. I can confirm this works though it seems to conflict 
with
some other packages here which constantly copy the selected region and then
overwrite the result of ox-clip. I have checked the output of textutil and use 
the 
same command in shell and that works. One feedback: are there internal functions
to manipulate the system clipboard? I am in favour of those instead of pbcopy.
As in mentioned in https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard 
,
pbcopy sometimes does not work. The link above says ‘Under Yosemite 
(and later) pasteboard access seems to work fine without the program from 
this repository.’ but this is not true in my laptop in OS X El Capitan 10.11.5.

> On Jun 29, 2016, at 9:16 PM, John Kitchin  wrote:
> 
> its not there yet. I would like some people to test it out a little
> maybe? get some feedback on it. Then it will probably go to MELPA.
> 
> Jiege Chen writes:
> 
>> John Kitchin  wrote:
>>> Hi everyone,
>>> 
>>> I extended the work I did here
>>> http://kitchingroup.cheme.cmu.edu/blog/2016/06/16/Copy-formatted-org-mode-text-from-Emacs-to-other-applications/
>>> on copying formatted org-mode to other applications so it is
>>> approximately cross-platform now. There is one command
>>> `ox-clip-formatted-copy' that should copy a region in an org-file with
>>> formatting to paste into other applications on Windows, Mac and Linux.
>>> 
>>> https://github.com/jkitchin/scimax/blob/master/ox-clip.el
>>> 
>>> Try it out!
>>> 
>> 
>> Impressive. I'd love ox-clip to be released in MELPA. Is that already done?
> 
> 
> -- 
> 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
> 



[O] citations not incoprporated from bib file when exporting from .org to pdflatex

2016-06-29 Thread David Abernethy
I am exporting a file stroke.org  using the bibliography 
file stroke.bib in the same directory
The citations are not being incorporated into the pdf file

An example from stroke.log: LaTeX Warning: Citation `Drummond:2014aa' on page 2 
undefined on input line 71.

The header for stroke.org  is:
#+LATEX_CLASS: article
#+BIBLIOGRAPHY: stroke vancouver option:-d

My emacs is from MacPorts  GNU Emacs 24.5.1 (x86_64-apple-darwin15.4.0, NS 
apple-appkit-1404.46)
 of 2016-05-01 on teneleven-slave.macports.org 


My .emacs file contains
(setq org-latex-pdf-process '("latexmk -pdflatex='pdflatex -interaction 
nonstopmode' -pdf -bibtex -f %f"))

Org-mode version 8.3.4 (8.3.4-93-g0d72c3-elpaplus (I updated it as suggested 
here http://orgmode.org/elpa.html  but it made no 
difference)
I’m using TexLive 2016 with fully up to date packages

Here is the preamble from stroke.tex (no mention of the .bib file)
% Created 2016-06-27 Mon 22:50
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
..
\usepackage{wrapfig}
\author{David Abernethy}
\date{\today}
\title{}
\hypersetup{
pdfauthor={David Abernethy},
pdfcreator={Emacs 24.5.1 (Org mode 8.3.4)},..}
\begin{document}

My set up (Latex header in the .org file and .bib file with the .emacs entry) 
used to work for this file but I have probably updated emacs since.
Can anyone see what is wrong?  help much appreciated

David

[O] [PATCH] Reschedule "++" repeaters on same day if in future

2016-06-29 Thread Don March
If you have a task with the following timestamp:

SCHEDULED: <2016-06-19 Sun 21:00 ++1w>

then marking it as DONE at [2016-06-27 at 07:00] should (debatably) result in

SCHEDULED: <2016-06-26 Sun 21:00 ++1w>

but instead it becomes

SCHEDULED: <2016-07-03 Sun 21:00 ++1w>

The attached patch changes the behavior to not skip a repeat occurrence that
would occur on the day that a task is completed, if there is a time in the
timestamp and it is after the current time. This is really useful, at least for
me, and also matches a literal reading of the docs. They say (regarding a "++1w"
repeater)

#+BEGIN_QUOTE
Marking this DONE will shift the date by at least one week, but also by as many
weeks as it takes to get this date into the future.
#+END_QUOTE

With a time before the repeater

SCHEDULED: <2016-06-19 Sun 21:00 ++1w>

you seem to be saying that you don't start working on this task until Sunday
evening every week. If you get busy and don't mark it DONE until the next Sunday
morning, then you must be talking about the previous instance, not the repeat
occurrence which will become available later that day. So it makes sense to
increase the timestamp to later that day:

SCHEDULED: <2016-06-26 Sun 21:00 ++1w>

For another example,  suppose you empty the kitchen trash every night:

SCHEDULED: <2016-06-19 Sun 22:00 ++1d>

If you don't complete that occurrence for two days and then empty the trash on
Tuesday morning, you would still want to empty it that night:

SCHEDULED: <2016-06-21 Tue 22:00 ++1d>

as opposed to skipping Tuesday night and repeating on Wednesday.

These examples seem useful to me. But this change could, in theory, lead to the
absurd situation of rescheduling a task for just a couple minutes after its
completion. But to me that seems the lesser of two evils; you just mark it DONE
again, versus the alternative of thinking that you'll be reminded of a task only
to forget all about it.

If the task is *already* scheduled for later today, this patch does not affect
the current behavior--the task will still be rescheduled on the next occurrence
on some future day.
From 59328aa0089bb376df86c89128a741a59d41c378 Mon Sep 17 00:00:00 2001
From: Don March 
Date: Sun, 26 Jun 2016 23:35:44 -0700
Subject: [PATCH] Reschedule "++" repeaters on same day if in future

* lisp/org.el (org-auto-repeat-maybe): Include a time in a
  timestamp (hours and minutes) when checking if a repeat occurrence is
  in the future.
---
 lisp/org.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index e13e82d..0b102fb 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13287,8 +13287,8 @@ has been set"
 			(let ((nshiftmax 10)
 			  (nshift 0))
 			  (while (or (= nshift 0)
- (<= (time-to-days time)
-	 (time-to-days (current-time
+ (or (time-less-p time (current-time))
+	 (equal time (current-time
 			(when (= (cl-incf nshift) nshiftmax)
 			  (or (y-or-n-p
    (format "%d repeater intervals were not \
-- 
2.8.1



[O] citations not incoprporated from bib file when exporting from .org to pdflatex

2016-06-29 Thread David Abernethy

I am exporting a file stroke.org using the bibliography file stroke.bib in the 
same directory
The citations are not being incorporated into the pdf file

An example from stroke.log: LaTeX Warning: Citation `Drummond:2014aa' on page 2 
undefined on input line 71.

The header for stroke.org is:
#+LATEX_CLASS: article
#+BIBLIOGRAPHY: stroke vancouver option:-d

My emacs is from MacPorts  GNU Emacs 24.5.1 (x86_64-apple-darwin15.4.0, NS 
apple-appkit-1404.46)
 of 2016-05-01 on teneleven-slave.macports.org

My .emacs file contains
(setq org-latex-pdf-process '("latexmk -pdflatex='pdflatex -interaction 
nonstopmode' -pdf -bibtex -f %f"))

Org-mode version 8.3.4 (8.3.4-93-g0d72c3-elpaplus (I updated it as suggested 
here http://orgmode.org/elpa.html  but it made no 
difference)
I’m using TexLive 2016 with fully up to date packages

Here is the preamble from stroke.tex (no mention of the .bib file)
% Created 2016-06-27 Mon 22:50
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
..
\usepackage{wrapfig}
\author{David Abernethy}
\date{\today}
\title{}
\hypersetup{
pdfauthor={David Abernethy},
pdfcreator={Emacs 24.5.1 (Org mode 8.3.4)},..}
\begin{document}

My set up (Latex header in the .org file and .bib file with the .emacs entry) 
used to work for this file but I have probably updated emacs since.
Can anyone see what is wrong?  help much appreciated

David

Re: [O] [BUG] src code block header does not override buffer-wide header in property

2016-06-29 Thread Nick Dokos
"Charles C. Berry"  writes:

> Not a bug. See below.
>
> On Wed, 29 Jun 2016, Nick Dokos wrote:
>
>> This was reported on SO:
>>
>> http://stackoverflow.com/questions/37414837/org-mode-overwriting-globals-properties-in-block-headers
>>
>> The ECM is as follows:
>>
>> --8<---cut here---start->8---
>> #+PROPERTY: header-args :results silent
>>
>> #+BEGIN_SRC elisp
>> ;; this one is silent
>> (setq foo "bar)
>> #+END_SRC
>>
>> #+BEGIN_SRC elisp :results output
>> ;; this one is being outputted
>> (princ "foo")
>> #+END_SRC
>> --8<---cut here---end--->8---
>>
>> The second code block *should* output "foo" as its result, but it does
>> not: the :results silent header in the property seems to be in conrol.
>
> Maybe you meant
>
> #+BEGIN_SRC elisp :results output replace :exports both
> ;; this one is being outputted
> (princ "foo")
> #+END_SRC
>

OK - I can never remember the meaning of all the results permutations
but replace does reverse the result of silent (I don't care about export
in this case).

>
> i.e. export code and results and replace the existing result or insert a 
> new result.
>
> See (info "(org) results") and scroll down to the 'Handling' paragraph.
>

Thanks for the reference - I obviously need to re-read this a few times.

-- 
Nick




Re: [O] ipython not working in org mode

2016-06-29 Thread Lawrence Bottorff
Not sure I know how to "change python-shell-interpreter to python from
ipython." I did the change to the ob-ipython.el suggested -- with no
improvement. . .

On Wed, Jun 29, 2016 at 12:52 PM, Naupaka Zimmerman 
wrote:

> Hi Lawrence -
>
> The fix on this page worked for me:
> https://github.com/gregsexton/ob-ipython/issues/63
>
> I had to change python-shell-interpreter to python from ipython. It's just
> a temporary fix until they update the codebase. Hope that helps...
>
> Best,
> Naupaka
>
> Date: Wed, 29 Jun 2016 10:58:46 -0400
>> From: Lawrence Bottorff 
>> To: emacs-orgmode Mailinglist 
>> Subject: [O] ipython not working in org mode
>> Message-ID:
>> > grjuejntyckpbj...@mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> I've followed everything here (https://github.com/gregsexton/ob-ipython)
>> in
>> order to set up ipython in org mode. But I keep getting the error:
>>
>> ...executing Ipython code block...
>> apply: Searching for program: no such file or directory, ipython
>>
>> when I try the sample code block
>>
>> #+BEGIN_SRC ipython :session myip
>>   %matplotlib inline
>>   import matplotlib.pyplot as plt
>>   import numpy as np
>> #+END_SRC
>>
>> Other samples don't work either. I've gotten ipython from Enthought, which
>> should have all the necessities. Starting ipython from my (Ubuntu)
>> terminal
>> brings up:
>>
>> Python 2.7.11 | 64-bit | (default, Jun 11 2016, 10:32:30)
>> Type "copyright", "credits" or "license" for more information.
>> IPython 4.1.2 -- An enhanced Interactive Python.
>> ...
>> as it is on my path. I even installed exec-path-from-shell to make sure
>> Emacs would see my path. Not sure how to proceed.
>>
>> LB
>>
>


Re: [O] [BUG] src code block header does not override buffer-wide header in property

2016-06-29 Thread Charles C. Berry


Not a bug. See below.

On Wed, 29 Jun 2016, Nick Dokos wrote:


This was reported on SO:

http://stackoverflow.com/questions/37414837/org-mode-overwriting-globals-properties-in-block-headers

The ECM is as follows:

--8<---cut here---start->8---
#+PROPERTY: header-args :results silent

#+BEGIN_SRC elisp
;; this one is silent
(setq foo "bar)
#+END_SRC

#+BEGIN_SRC elisp :results output
;; this one is being outputted
(princ "foo")
#+END_SRC
--8<---cut here---end--->8---

The second code block *should* output "foo" as its result, but it does
not: the :results silent header in the property seems to be in conrol.


Maybe you meant

#+BEGIN_SRC elisp :results output replace :exports both
;; this one is being outputted
(princ "foo")
#+END_SRC


i.e. export code and results and replace the existing result or insert a 
new result.


See (info "(org) results") and scroll down to the 'Handling' paragraph.

Chuck



[O] ipython not working in org mode

2016-06-29 Thread Lawrence Bottorff
I've followed everything here (https://github.com/gregsexton/ob-ipython) in
order to set up ipython in org mode. But I keep getting the error:

...executing Ipython code block...
apply: Searching for program: no such file or directory, ipython

when I try the sample code block

#+BEGIN_SRC ipython :session myip
  %matplotlib inline
  import matplotlib.pyplot as plt
  import numpy as np
#+END_SRC

Other samples don't work either. I've gotten ipython from Enthought, which
should have all the necessities. Starting ipython from my (Ubuntu) terminal
brings up:

Python 2.7.11 | 64-bit | (default, Jun 11 2016, 10:32:30)
Type "copyright", "credits" or "license" for more information.
IPython 4.1.2 -- An enhanced Interactive Python.
...
as it is on my path. I even installed exec-path-from-shell to make sure
Emacs would see my path. Not sure how to proceed.

LB


Re: [O] ox-clip.el

2016-06-29 Thread John Kitchin

Jiegec writes:

> I’m testing this in OS X. I can confirm this works though it seems to 
> conflict with
> some other packages here which constantly copy the selected region and then
> overwrite the result of ox-clip.
What kind of package is that? None of the kill commands can use the
clipboard that ox-clip sends things too as far as I know. I don't see
how this is possible.

> I have checked the output of textutil and use the 
> same command in shell and that works. One feedback: are there internal 
> functions
> to manipulate the system clipboard? I am in favour of those instead of
> pbcopy.

There are none that I know of (or I would have used them ;).

> As in mentioned in https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard 
> ,
> pbcopy sometimes does not work. The link above says ‘Under Yosemite 
> (and later) pasteboard access seems to work fine without the program from 
> this repository.’ but this is not true in my laptop in OS X El Capitan
> 10.11.5.

That could be true. I don't have access to anything that modern yet. 

>
>> On Jun 29, 2016, at 9:16 PM, John Kitchin  wrote:
>> 
>> its not there yet. I would like some people to test it out a little
>> maybe? get some feedback on it. Then it will probably go to MELPA.
>> 
>> Jiege Chen writes:
>> 
>>> John Kitchin  wrote:
 Hi everyone,
 
 I extended the work I did here
 http://kitchingroup.cheme.cmu.edu/blog/2016/06/16/Copy-formatted-org-mode-text-from-Emacs-to-other-applications/
 on copying formatted org-mode to other applications so it is
 approximately cross-platform now. There is one command
 `ox-clip-formatted-copy' that should copy a region in an org-file with
 formatting to paste into other applications on Windows, Mac and Linux.
 
 https://github.com/jkitchin/scimax/blob/master/ox-clip.el
 
 Try it out!
 
>>> 
>>> Impressive. I'd love ox-clip to be released in MELPA. Is that already done?
>> 
>> 
>> -- 
>> 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
>> 


-- 
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] ox-clip.el

2016-06-29 Thread John Kitchin
its not there yet. I would like some people to test it out a little
maybe? get some feedback on it. Then it will probably go to MELPA.

Jiege Chen writes:

> John Kitchin  wrote:
>> Hi everyone,
>> 
>> I extended the work I did here
>> http://kitchingroup.cheme.cmu.edu/blog/2016/06/16/Copy-formatted-org-mode-text-from-Emacs-to-other-applications/
>> on copying formatted org-mode to other applications so it is
>> approximately cross-platform now. There is one command
>> `ox-clip-formatted-copy' that should copy a region in an org-file with
>> formatting to paste into other applications on Windows, Mac and Linux.
>> 
>> https://github.com/jkitchin/scimax/blob/master/ox-clip.el
>> 
>> Try it out!
>> 
>
> Impressive. I'd love ox-clip to be released in MELPA. Is that already done?


-- 
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



[O] ox-bibtex.el regexp is not correct when finding bibtex keys

2016-06-29 Thread Xiaolong Zhang (HKUCS)
Hi list,

On line 237-241 of ox-bibtex.el of function org-bibtex-process-bib-files:

;; Update `org-bibtex-html-entries-alist'.
(goto-char (point-min))
(while (re-search-forward
  "a name=\"\\([-_a-zA-Z0-9:]+\\)\">\\(\\w+\\)" nil t)
   (push (cons (match-string 1) (match-string 2))

The regexp does not allow the forward slash character, which is
actually allowed for bibtex keys and is the format for DBLP. For
example, "DBLP:journals/corr/VeitWVBDAACCCDD15"
(http://dblp.uni-trier.de/rec/bibtex/journals/corr/VeitWVBDAACCCDD15)

I hope it could be fixed as the current exporting to HTML using
ox-bibtex.el does not process citation keys from DBLP. Thank you.

Regards,
Xiaolong



Re: [O] Why no secure code retrieval

2016-06-29 Thread Arun Isaac

> However, gpg signing release tag commits is dead simple and would
> take a total of maybe 10 minutes of work over the lifetime of the project
> (please correct me if I'm wrong).

I second this statement. GPG signing sounds good to me. We should do this.

> I know that https can be a bit tedious to setup so I am not asking for it
> (though I do think it would be great if it was enabled on the site in some
> fashion).

HTTPS is not so tedious these days with Let's Encrypt.

https://letsencrypt.org/

We should set up HTTPS as well.


signature.asc
Description: PGP signature