Re: [O] Citation processing via Zotero + zotxt

2015-12-02 Thread Richard Lawrence
Hi Matt and all,

Matt Lundin  writes:

> Given these complexities, it seems that if we went the zotero route we
> could end up with a fairly large installation chain (firefox, zotero,
> zotxt, plugin for zotero). And this would require installing items from
> multiple, heterogeneous sources.

Well, I would guess that many people who are interested in this already
have Firefox installed, and after that, you just need to install two
Firefox plugins: Zotero and zotxt.  Open a couple of links, give your
permission, and that's it.

If you're skeptical, I encourage you to try it:

https://www.zotero.org/download/
https://addons.mozilla.org/en-US/firefox/addon/zotxt/

It's pretty easy.  And removing the plugins via about:addons is just as
easy.

> I wonder at this point whether pandoc-citeproc (packaged with pandoc)
> would actually be the simpler route. It can parse bibtex files directly
> and (as a filter within pandoc) can output formatted citations in org
> format.

We have discussed this before, and in fact, I already started work along
this route: see https://github.com/wyleyr/org-citeproc

I stopped because people objected that distributing a Haskell program is
too difficult.  Even if you can install pandoc-citeproc via your
system's package manager, to build org-citeproc against it you need a
complete Haskell build environment, which is (somewhat notoriously)
difficult to work with, and too much to expect for the average person
who just wants citation support in their Org documents.  Nor has anyone
volunteered to take care of building and distributing a binary for every
platform we'd want to support (including, I assume, Windows and OS
X...).

> As a GNU/Linux user, I would find installing zotero and all the add-ons
> messier and more cumbersome than installing pandoc and/or node-js (were
> we to use citeproc-js) from the command line.

I'm a Debian user, so I can appreciate your concern here.  But it's only
simpler to use the system package manager if all the dependencies are
already packaged for $YOUR_DISTRO, in a version that's up-to-date enough
for you to use.  Given the diversity of Org users, it seems likely that
we won't be able come up with a solution that goes via system package
managers that will work for everybody, at least not without a lot of
work.

The nice thing about Firefox (and these days, Emacs) is that it's a sort
of cross-platform package manager.  If the citation processing
dependencies are just Firefox plugins, they'll be much more accessible
to a much wider group of people without a lot of work on our part.  So,
that's why I'd prefer depending on Zotero to depending on something like
org-citeproc or citeproc-node.

Best,
Richard



Re: [O] missing frame title using org beamer export

2015-12-02 Thread John Hendy
On Wed, Dec 2, 2015 at 12:17 PM, Jinli Feng  wrote:
>
>
> On Wed, Dec 2, 2015 at 11:21 AM, John Hendy  wrote:
>>
>> On Wed, Dec 2, 2015 at 9:46 AM, Jinli Feng  wrote:
>> >
>> >
>> > On Wed, Dec 2, 2015 at 8:19 AM, Eric S Fraga  wrote:
>> >>
>> >> On Wednesday,  2 Dec 2015 at 06:42, mypostgtd wrote:

[snip]

>> Quick answer: go to the second link above and copy that first code
>> block into your .emacs. Reload your config (or just restart emacs),
>> and do =C-c C-e l P=. See if that helps.
>
>
> Thanks, John! I added the beamer definition and used the Upper case P which
> almost did the trick, in the sense that all the headings are properly
> exported and the frames look as expected. However, the pdf file is missing
> the title and author, with only the date showing on the front page.  I don't
> see anything obviously wrong in the tex file:
>
> \author{dummy}
> \date{\today}
> \title{Test Frame title}
> \hypersetup{
>  pdfauthor={dummy},
>  pdftitle={Test Frame title},
>  pdfkeywords={},
>  pdfsubject={},
>  pdfcreator={Emacs 24.3.2 (Org mode 8.3.2)},
>  pdflang={English}}
> \begin{document}
>
> \maketitle
> \begin{frame}{Outline}
> \tableofcontents
> \end{frame}
>
> Any idea why?
>

I just used a minimal config (below), and I get what appears to be the
same! I have an author/date on the front page, though. No idea how to
explain that one... I attached my generated .pdf if that helps. Do you
get any errors during compilation, or perhaps want to see if there's
any output in the *Org LaTeX Errors* (or something like that) buffer?
I wonder if there's a package that you could be missing... though
beamer should be pretty standard/straightforward and with everything
else working, I don't understand why that wouldn't work.

> btw. I searched for hours about migrating from v7 to v8 of orgmode, but
> didn't come upon your blog. It could've saved me so much headache! Maybe we
> should add yours as a link on the worg page? I've avoided the migration as
> per the rule "not breaking what works", but it's time to take the plunge and
> living through the growing pain :) Thanks for the help!

Happy to help. I recall following along from a distance as the mailing
list elisp experts were formalizing everything, seriously having no
idea what was going on. Then it was released and seemed like I might
as well figure out what this was all about. Glad you were able to
migrate and hope there wasn't *too* much pain involved!


John

>
>>
>> Hope that gets you pointed in the right direction!
>>
>>
>> John
>>
>>
>> >>
>> >> --
>> >> : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org
>> >> release_8.3.2-359-g6b2c38
>> >
>> >
>
>


beamer-test.org
Description: Binary data


beamer-test.pdf
Description: Adobe PDF document


min-config
Description: Binary data


Re: [O] Citation processing via Zotero + zotxt

2015-12-02 Thread Christian Wittern
On 2015-12-03 8:27, Matt Lundin wrote:
> Given these complexities, it seems that if we went the zotero route we
> could end up with a fairly large installation chain (firefox, zotero,
> zotxt, plugin for zotero). And this would require installing items from
> multiple, heterogeneous sources.
I guess it depends on where you come from.  For those who already maintain
the bibliography in Zotero this is not much of an extra load.
>
> I wonder at this point whether pandoc-citeproc (packaged with pandoc)
> would actually be the simpler route. It can parse bibtex files directly
> and (as a filter within pandoc) can output formatted citations in org
> format.
This sounds like those maintaining a BibTex bibliography would be better
served here.  That also means that the Zotero route would not have to worry
about importing a bibtex file into Zotero behind the scenes.
>
> As a GNU/Linux user, I would find installing zotero and all the add-ons
> messier and more cumbersome than installing pandoc and/or node-js (were
> we to use citeproc-js) from the command line.
Maybe the best situation would be to support both the pandoc and zotero
toolchain as backends and let the user decide what to use. If the result is
in both cases org-formated citations, that should not make it too difficult, no?

All the best,

Christian

-- 
Christian Wittern, Kyoto




Re: [O] Citation processing via Zotero + zotxt

2015-12-02 Thread Matt Lundin
Richard Lawrence  writes:

> Eric S Fraga  writes:
>
>> 2. How would I use this starting from an org-bibtex database (which I
>>typically export to bibtex)?
>
> I can envision a couple of possibilities.  One simple option would be to
> switch to managing your reference database with Zotero, by exporting
> from org-bibtex to .bib, and then importing the .bib into Zotero.
>
> I don't want to force that on anyone, though.  Another option is to
> use the org-bibtex to produce .bib at export time, and then use Zotero
> to read the .bib and process citations when exporting to non-LaTeX formats.
>
> This second option is more work, as I don't know of any API for loading
> items into Zotero's citation processor in BibTeX format.  But given that
> Zotero is able to import .bib files, I imagine this API would not be too
> much work to build.

Given these complexities, it seems that if we went the zotero route we
could end up with a fairly large installation chain (firefox, zotero,
zotxt, plugin for zotero). And this would require installing items from
multiple, heterogeneous sources.

I wonder at this point whether pandoc-citeproc (packaged with pandoc)
would actually be the simpler route. It can parse bibtex files directly
and (as a filter within pandoc) can output formatted citations in org
format.

As a GNU/Linux user, I would find installing zotero and all the add-ons
messier and more cumbersome than installing pandoc and/or node-js (were
we to use citeproc-js) from the command line.

Best,
Matt

Footnotes:



Re: [O] problem with org-capture

2015-12-02 Thread Charles Millar

Hi,

On 12/02/2015 04:24 PM, Nicolas Goaziou wrote:

Hello,

Eric S Fraga  writes:


However, it only partially fixed.  The system does now prompt as it
should but the mini-buffer input only allows single words.  Hitting
space bar attempts to do completion.  I believe the input should be free
form?

Fixed (again). Thank you.


Regards,


I think it is still broken in another way

my template for capturing time as I work on a files -

("s" "timeslip" table-line
 (file "/mnt/Data/ActiveFiles/EmacsFiles/timeslips.org")
 "\| %(org-read-date)\| %^{FileName} %i\| %^{Narrative} 
%i\| %^{Time} %i\| %^{Expense} %i"


Last week the prompt org-read-date would pull up the calendar first; now 
the template jumps first to FileName, then Narrative,then Time, then 
Expense, then back to org-read-date.  After C-c C-c there is anywhere 5 
to 20 second delay.


Charlie Millar



Re: [O] problem with org-capture

2015-12-02 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

> However, it only partially fixed.  The system does now prompt as it
> should but the mini-buffer input only allows single words.  Hitting
> space bar attempts to do completion.  I believe the input should be free
> form?

Fixed (again). Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] org-protocol: Allow optional port specification

2015-12-02 Thread Rasmus
Hi Sacha,

Thanks for your patch.

Sacha Chua  writes:

> I was trying to get org-protocol to work on KDE Plasma 5.4.2. I set up
> my ~/.kde/share/kde4/services/org.protocol, but the standard
> org-protocol sample syntax:
>
>org-protocol://store-link://URL/TITLE
>
> resulted in the error:
>
>Malformed URL
>Port field was empty; source was "..."; scheme = "org-protocol",
>host = "store-link", path = "// ..."
>
> Modifying my Javascript to create links of the form:
>
>org-protocol://store-link:0//URL/TITLE
>
> made org-protocol correctly pass the link to emacsclient KDE 5.4.2. This
> patch allows the optional specification of a port in the URI. What do
> you think?

First, I’m not familiar with org-protocol or messaging systems in general
so I cannot offer input on this. 

> @@ -532,7 +532,7 @@ as filename."
>  (when (string-match the-protocol fname)
>(dolist (prolist sub-protocols)
>  (let ((proto (concat the-protocol
> -  (regexp-quote (plist-get (cdr prolist) 
> :protocol)) ":/+")))
> +  (regexp-quote (plist-get (cdr prolist) 
> :protocol)) ":[^/]*/+")))

This seems pretty general.  Are there any dangerous of accepting
everything but /?  Is this only meant to capture a port?  If so, is there
any disadvantage in only allowing numbers?  As said, I don’t know anything
about these topics.

> +;;; test-org-protocol.el --- tests for org-protocol.el
Tests

Also, I guess you should add -*- lexical-binding: t; -*- these days.

> +;;; Code:
> +
> +(ert-deftest test-org-protocol/org-protocol-check-filename-for-protocol ()
> +  "Test `org-protocol-check-filename-for-protocol' specifications."
> +  ;; Store link
> +  (let ((uri "/some/directory/org-protocol:/store-link:/URL/TITLE"))
> +(should (null (org-protocol-check-filename-for-protocol uri (list uri) 
> nil
> +  (should (equal (car org-stored-links) '("URL" "TITLE")))
> +  ;; Handle multiple slashes
> +  (let ((uri "/some/directory/org-protocol://store-link://URL2//TITLE2"))
> +(should (null (org-protocol-check-filename-for-protocol uri (list uri) 
> nil
> +  (should (equal (car org-stored-links) '("URL2" "TITLE2")))
> +  ;; Ignore port - useful for KDE

> +  (let ((uri "/some/directory/org-protocol:/store-link:0//URL3//TITLE3"))
> +(should (null (org-protocol-check-filename-for-protocol uri (list uri) 
> nil
> +  (should (equal (car org-stored-links) '("URL3" "TITLE3"

I don't know org-protocol well enough to comment on your tests.  But I
guess you should add something like this, extrapolating from other test
files,

(unless (featurep 'org-protocol)
  (signal 'missing-test-dependency "org-protocol"))

Cheers,
Rasmus

-- 
⠠⠵







Re: [O] missing frame title using org beamer export

2015-12-02 Thread Jinli Feng
On Wed, Dec 2, 2015 at 1:03 PM, Eric S Fraga  wrote:

> On Wednesday,  2 Dec 2015 at 10:46, Jinli Feng wrote:
>
> [...]
>
> > Thanks for the rely. I used "C-c C-e l p" to export the file. For some
>
> You want to do "C-c C-e l P" for beamer export.  Otherwise, you get
> LaTeX export.  Your output may look like beamer in that it has used the
> LaTeX beamer class (because that's what you told it to do) but it did
> not parse the structure of the org file.
>
> If you use "P" instead of "p", ox-beamer will interpret the headlines
> properly and you do not need to set LATEX_CLASS.
>

Thanks Eric. Yes, even though I thought I'd checked all the available
export options, I failed to distinguish the nuances between p and P. Your
initial answer pointed me to the right direction, as I found that pdflatex
on the exported tex would give a different pdf from the export command (C-c
C-e l p). Now one more step closer to the destination, if only I can figure
out how to get the missing title and author in the pdf.

Thanks for all the help!

>
> You may need to add
>
> (require 'ox-beamer)
>
> to your emacs initialisation code.
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-355-g18f083
>


Re: [O] missing frame title using org beamer export

2015-12-02 Thread Jinli Feng
On Wed, Dec 2, 2015 at 11:21 AM, John Hendy  wrote:

> On Wed, Dec 2, 2015 at 9:46 AM, Jinli Feng  wrote:
> >
> >
> > On Wed, Dec 2, 2015 at 8:19 AM, Eric S Fraga  wrote:
> >>
> >> On Wednesday,  2 Dec 2015 at 06:42, mypostgtd wrote:
> >> > - issue: org mode beamer export ignored all frame titles
> >> >
> >> > I've tried searching online for couple of hours, but couldn't find a
> >> > solution.
> >> > Can someone please advise?
> >>
> >> How did you actually export the file to beamer?  Your LaTeX file seems
> >> to be the result of a LaTeX export, not beamer.  Your org file exports
> >> just fine for me.
> >
> >
> > Eric,
> >
> > Thanks for the rely. I used "C-c C-e l p" to export the file. For some
> > reason "C-c C-e p" no longer works in orgmode v8.3. I'm yet to figure out
> > how to bind that key directly to pdf output. Is this the same as how you
> > exported the file?
>
> As you may well be aware, Org changed a lot from 7.x -> 8.x. Have you
> been through the various upgrade documents out there? This will be one
> of many "surprises" you'll run into if you don't take a look.
> - Official upgrade notes: http://orgmode.org/worg/org-8.0.html
> - Walkthrough attempt I made:
>
> http://jwhendy.blogspot.com/2013/03/migrating-to-new-org-mode-exporter-org.html
> - Beamer for Org 8.x:
> http://orgmode.org/worg/exporters/beamer/ox-beamer.html
>
> In particular, I'm guessing you don't have the beamer class defined
> and aren't aware of =C-c C-e l P= (note capital P), which is the
> beamer export function now. It's just sufficient to just define the
> class as beamer and export to LaTeX.
>
> Quick answer: go to the second link above and copy that first code
> block into your .emacs. Reload your config (or just restart emacs),
> and do =C-c C-e l P=. See if that helps.
>

Thanks, John! I added the beamer definition and used the Upper case P which
almost did the trick, in the sense that all the headings are properly
exported and the frames look as expected. However, the pdf file is missing
the title and author, with only the date showing on the front page.  I
don't see anything obviously wrong in the tex file:

\author{dummy}
\date{\today}
\title{Test Frame title}
\hypersetup{
 pdfauthor={dummy},
 pdftitle={Test Frame title},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 24.3.2 (Org mode 8.3.2)},
 pdflang={English}}
\begin{document}

\maketitle
\begin{frame}{Outline}
\tableofcontents
\end{frame}

Any idea why?

btw. I searched for hours about migrating from v7 to v8 of orgmode, but
didn't come upon your blog. It could've saved me so much headache! Maybe we
should add yours as a link on the worg page? I've avoided the migration as
per the rule "not breaking what works", but it's time to take the plunge
and living through the growing pain :) Thanks for the help!


> Hope that gets you pointed in the right direction!
>
>
> John
>
>
> >>
> >> --
> >> : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-359-g6b2c38
> >
> >
>


Re: [O] missing frame title using org beamer export

2015-12-02 Thread Eric S Fraga
On Wednesday,  2 Dec 2015 at 10:46, Jinli Feng wrote:

[...]

> Thanks for the rely. I used "C-c C-e l p" to export the file. For some

You want to do "C-c C-e l P" for beamer export.  Otherwise, you get
LaTeX export.  Your output may look like beamer in that it has used the
LaTeX beamer class (because that's what you told it to do) but it did
not parse the structure of the org file.

If you use "P" instead of "p", ox-beamer will interpret the headlines
properly and you do not need to set LATEX_CLASS.

You may need to add

(require 'ox-beamer)

to your emacs initialisation code.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-355-g18f083



Re: [O] [bug] inline task contents not indented with org-indent-mode

2015-12-02 Thread Eric S Fraga
On Wednesday,  2 Dec 2015 at 18:39, Nicolas Goaziou wrote:

[...]

> IIRC, this is a feature, as it is consistent with real indentation.

Ah, okay.  I thought I remembered the indentation following the headline
but that could just be my old age...

I can live with it the way it is.

Thanks,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-355-g18f083



Re: [O] [bug] inline task contents not indented with org-indent-mode

2015-12-02 Thread Nicolas Goaziou
Hello,

Eric S Fraga  writes:

> with a recent org, the contents of an inline task are not indented when
> using org-indent-mode.  By contents, I mean the text between the two
> special headlines:
>
> #+begin_src org
>   ,* a heading
>   This is a test
>   ,*** TODO something to do
>   and this line is not indendent.
>   ,*** END
> #+end_src

IIRC, this is a feature, as it is consistent with real indentation.

Regards,

-- 
Nicolas Goaziou



Re: [O] missing frame title using org beamer export

2015-12-02 Thread John Hendy
On Wed, Dec 2, 2015 at 9:46 AM, Jinli Feng  wrote:
>
>
> On Wed, Dec 2, 2015 at 8:19 AM, Eric S Fraga  wrote:
>>
>> On Wednesday,  2 Dec 2015 at 06:42, mypostgtd wrote:
>> > - issue: org mode beamer export ignored all frame titles
>> >
>> > I've tried searching online for couple of hours, but couldn't find a
>> > solution.
>> > Can someone please advise?
>>
>> How did you actually export the file to beamer?  Your LaTeX file seems
>> to be the result of a LaTeX export, not beamer.  Your org file exports
>> just fine for me.
>
>
> Eric,
>
> Thanks for the rely. I used "C-c C-e l p" to export the file. For some
> reason "C-c C-e p" no longer works in orgmode v8.3. I'm yet to figure out
> how to bind that key directly to pdf output. Is this the same as how you
> exported the file?

As you may well be aware, Org changed a lot from 7.x -> 8.x. Have you
been through the various upgrade documents out there? This will be one
of many "surprises" you'll run into if you don't take a look.
- Official upgrade notes: http://orgmode.org/worg/org-8.0.html
- Walkthrough attempt I made:
http://jwhendy.blogspot.com/2013/03/migrating-to-new-org-mode-exporter-org.html
- Beamer for Org 8.x: http://orgmode.org/worg/exporters/beamer/ox-beamer.html

In particular, I'm guessing you don't have the beamer class defined
and aren't aware of =C-c C-e l P= (note capital P), which is the
beamer export function now. It's just sufficient to just define the
class as beamer and export to LaTeX.

Quick answer: go to the second link above and copy that first code
block into your .emacs. Reload your config (or just restart emacs),
and do =C-c C-e l P=. See if that helps.

Hope that gets you pointed in the right direction!


John


>>
>> --
>> : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-359-g6b2c38
>
>



[O] [PATCH] org-protocol: Allow optional port specification

2015-12-02 Thread Sacha Chua
I was trying to get org-protocol to work on KDE Plasma 5.4.2. I set up
my ~/.kde/share/kde4/services/org.protocol, but the standard
org-protocol sample syntax:

   org-protocol://store-link://URL/TITLE

resulted in the error:

   Malformed URL
   Port field was empty; source was "..."; scheme = "org-protocol",
   host = "store-link", path = "// ..."

Modifying my Javascript to create links of the form:

   org-protocol://store-link:0//URL/TITLE

made org-protocol correctly pass the link to emacsclient KDE 5.4.2. This
patch allows the optional specification of a port in the URI. What do
you think?

>From 0533b2e76a9cb965ea8f4ea5b3804d17c2bd3b5d Mon Sep 17 00:00:00 2001
From: Sacha Chua 
Date: Wed, 2 Dec 2015 10:53:07 -0500
Subject: [PATCH] org-protocol: Allow optional port specification

* lisp/org-protocol.el (org-protocol-check-filename-for-protocol):
  Recognize and ignore ports specified as part of the protocol or
  sub-protocol. This seems to be necessary to avoid "Port field was
  empty" errors in newer versions of KDE.
* testing/lisp/test-org-protocol.el: New file with a test for
  `org-protocol-check-filename-for-protocol'.
---
 lisp/org-protocol.el  |  2 +-
 testing/lisp/test-org-protocol.el | 39 +++
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 testing/lisp/test-org-protocol.el

diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el
index 339f2b7..150f458 100644
--- a/lisp/org-protocol.el
+++ b/lisp/org-protocol.el
@@ -532,7 +532,7 @@ as filename."
 (when (string-match the-protocol fname)
   (dolist (prolist sub-protocols)
 (let ((proto (concat the-protocol
- (regexp-quote (plist-get (cdr prolist) :protocol)) ":/+")))
+ (regexp-quote (plist-get (cdr prolist) :protocol)) ":[^/]*/+")))
   (when (string-match proto fname)
 (let* ((func (plist-get (cdr prolist) :function))
(greedy (plist-get (cdr prolist) :greedy))
diff --git a/testing/lisp/test-org-protocol.el b/testing/lisp/test-org-protocol.el
new file mode 100644
index 000..94be520
--- /dev/null
+++ b/testing/lisp/test-org-protocol.el
@@ -0,0 +1,39 @@
+;;; test-org-protocol.el --- tests for org-protocol.el
+
+;; Copyright (c)  Sacha Chua
+;; Authors: Sacha Chua
+
+;; This file is not part of GNU Emacs.
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see .
+
+;;; Code:
+
+(ert-deftest test-org-protocol/org-protocol-check-filename-for-protocol ()
+  "Test `org-protocol-check-filename-for-protocol' specifications."
+  ;; Store link
+  (let ((uri "/some/directory/org-protocol:/store-link:/URL/TITLE"))
+(should (null (org-protocol-check-filename-for-protocol uri (list uri) nil
+  (should (equal (car org-stored-links) '("URL" "TITLE")))
+  ;; Handle multiple slashes
+  (let ((uri "/some/directory/org-protocol://store-link://URL2//TITLE2"))
+(should (null (org-protocol-check-filename-for-protocol uri (list uri) nil
+  (should (equal (car org-stored-links) '("URL2" "TITLE2")))
+  ;; Ignore port - useful for KDE
+  (let ((uri "/some/directory/org-protocol:/store-link:0//URL3//TITLE3"))
+(should (null (org-protocol-check-filename-for-protocol uri (list uri) nil
+  (should (equal (car org-stored-links) '("URL3" "TITLE3"
+
+
+;;; test-org-protocol.el ends here
-- 
2.6.3


(Copyright papers are on file.)

Sacha


Re: [O] Citation processing via Zotero + zotxt

2015-12-02 Thread Richard Lawrence
Hi Rasmus and all,

Rasmus  writes:

> Also, last I checked Zotero also existed as a standalone manager.  If this
> also works re your points below, using Zotero is a non-issue.  There
> exists a plugin to keep a bibtex file up to date.  I don’t know if it’s
> two way, though.

I haven't looked into whether things work the same way when Zotero is
installed as a standalone program, but I don't imagine they'd be
significantly different.  (What do you mean by "using Zotero is a
non-issue"?  Do you think installing as a standalone program would be
better, or did I misunderstand?)


>> Previously, I thought that it would be a similar amount of work to
>> communicate with Zotero from Emacs as any of the other CSL
>> implementations out there.  However, after looking at zotxt a bit more
>> closely, I discovered that it has an (undocumented) API endpoint [3]
>
> This sounds amazing, but also dangerous.  Do you know whether stabilizing
> the API has been discussed upstream?

As Matt mentioned, "upstream" in this case is zotxt, not Zotero.  I have
heard from Erik that he's open to changing and stabilizing this API.

>> that pretty much does exactly what we need: it accepts a list of
>> citation objects, and returns a list of formatted citations and a
>> formatted bibliography, which can be inserted into the exported
>> document.
>
> Could you give an example of the sort of input you give?  I.e. is it based
> on keys?  From my bibtex-centric world view I imagine something like:
>
>I send key or pointer @K to a DB entry as well as a CSL-file pointer C,
>and maybe a desired output format F.  I get a string back that is the
>formatting of the data behind @K formatted according to the rules in C,
>adapted to F.

Yes, that's correct, except that ideally you send the data for all
citations at once (because context is important).  So for example, if
Erik accepts a patch for some small changes I wrote, one can query

/zotxt/bibliography?outputFormat=html&style=chicago-fullnote-bibliography

sending POST data like

[
{ "citationItems": [{"key": "0_ZOTKEY1"}],
  "properties": {"noteIndex": 0}},
{ "citationItems": [{"key": "0_ZOTKEY2"}]
  "properties": {"noteIndex": 0}},
...
]

and get back data that basically looks like

{
  "bibliography": [
{
  ...
  "bibstart": "\n",
  "bibend": ""
},
[
  "  Formatted entry for 0_ZOTKEY1\n",
  "  Formatted entry for 0_ZOTKEY2\n",
  ...
]
  ],
  "citationClusters": [
"Formatted citation for 0_ZOTKEY1",
"Formatted citation for 0_ZOTKEY2",
...
  ]
}

> Is that correct?  If so, does it support html, text and odt?

At the moment it supports html and text.  I suppose it could be made to
support ODT, though I'm not sure how difficult it is.  However, I think
a better solution would actually be to have it return *Org* markup, and
then replace citation objects in the document with that.  The main
problem this solves concerns note-based styles: we can insert Org
footnotes into the document at the beginning of the export process, and
then let Org figure out how to number the total set of footnotes in its
usual way.  I think it's a lot harder to deal with citation footnotes if
they come already-formatted in the output format.

>> Erik has also written a package for communicating with zotxt from Emacs,
>> zotxt-emacs [4], which is available on MELPA.  This package already
>> contains a lot of useful functions for querying the Zotero database and
>> inserting reference data into documents, including links in Org
>> documents.  I think it would be pretty straightforward to extend this
>> package to provide a nice UI for writers who are inserting citations
>> into Org documents, including search-based lookups of keys, etc.
>> Perhaps org-ref could also be taught to communicate with zotxt (with or
>> without zotxt-emacs) without too much work.
>
> I guess we’d need to convince Erik to move it to GELPA.  Fortunately (from
> that point of view), neither zotxt nor zotxt-emacs seems to have too many
> contributors.

Is the concern here that Org should not officially depend on anything
that isn't in GELPA?  Or just that it would make installing easier for
users?

>> I know that many people (perhaps especially the `power users' who have
>> been active in the citations discussion so far) prefer to maintain their
>> reference database without the aid of a GUI reference manager like
>> Zotero.
>
> I think this solves part of that issue.  Again it could be a dangerous
> solution.  Alternatively, perhaps it’s possible to feed-in a bibtex file
> to Zotero via an API.  This would also limit the damage.

I am hoping it will prove simple to feed a .bib file to Zotero via an
existing API, or to add such an API to zotxt.  But at the moment that's
just a hope.  (If anyone knows more about how to access a BibTeX
translator in a Zotero plugin, please get in touch!)

> IMO we can leverage zotero as a tool, but we cannot enforce it as a
> bib

[O] [bug] inline task contents not indented with org-indent-mode

2015-12-02 Thread Eric S Fraga
Dear all,

with a recent org, the contents of an inline task are not indented when
using org-indent-mode.  By contents, I mean the text between the two
special headlines:

#+begin_src org
  ,* a heading
  This is a test
  ,*** TODO something to do
  and this line is not indendent.
  ,*** END
#+end_src

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-344-g12c118



Re: [O] missing frame title using org beamer export

2015-12-02 Thread Jinli Feng
On Wed, Dec 2, 2015 at 8:19 AM, Eric S Fraga  wrote:

> On Wednesday,  2 Dec 2015 at 06:42, mypostgtd wrote:
> > - issue: org mode beamer export ignored all frame titles
> >
> > I've tried searching online for couple of hours, but couldn't find a
> solution.
> > Can someone please advise?
>
> How did you actually export the file to beamer?  Your LaTeX file seems
> to be the result of a LaTeX export, not beamer.  Your org file exports
> just fine for me.
>

Eric,

Thanks for the rely. I used "C-c C-e l p" to export the file. For some
reason "C-c C-e p" no longer works in orgmode v8.3. I'm yet to figure out
how to bind that key directly to pdf output. Is this the same as how you
exported the file?

> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-359-g6b2c38
>


[O] Bug: org-publish-find-title called before cache initialization signals "no cache present" [8.3.1 (release_8.3.1-505-g6b2c38 @ /home/arunisaac/.emacs.d/org-mode/lisp/)]

2015-12-02 Thread Arun Isaac

If org-publish-find-title is called before org-publish-cache is
initialized (by some routine calling org-publish-initialize-cache), a
"no cache present" error is signalled.

This happens because org-publish-find-title does not pass a PROJECT-NAME
argument to org-publish-cache-get-file-property. Only if a PROJECT-NAME
argument is passed to org-publish-cache-get-file-property does it
initialize the cache.

Can this be considered a bug? Is org-publish-cache-get-file-property
supposed to automatically initialize the cache if it is not present? Or
is the user supposed to initialize the cache manually if required?

In my use case, my preparation-function calls
org-publish-find-title. However org-publish-projects initializes the
cache only after executing the preparation function. Hence I get a "no
cache present" error.

I could work around this problem by simply initializing the cache on my
own. But, I'm wondering if this can be fixed at a more fundamental
level.

Thank you,
Arun Isaac.

Emacs  : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6)
 of 2015-09-10 on foutrelis
Package: Org-mode version 8.3.1 (release_8.3.1-505-g6b2c38 @ 
/home/arunisaac/.emacs.d/org-mode/lisp/)



Re: [O] Fwd: Citation processing via Zotero + zotxt

2015-12-02 Thread Richard Lawrence
Hi Matt and all,

Matt Lundin  writes:

> One question (based on complete ignorance of either zotero or zotxt) is
> whether those of us who maintain bibtex databases solely in emacs would
> have to interact with the zotero GUI.

My goal would be that you wouldn't need to interact with it at all.
(You would need to have Firefox running in the background, but that's it
-- no need to actually interact with the window as a user.)

> Let's say I have a bib file and an org document containing
> citations. Would everything place transparently in the background
> without ever having to interact with zotero? Can zotero query a bib
> file without requiring the user manually to import/export the
> database?

I do not know of a way to do this at the moment.  But it may already
exist somewhere, and if it doesn't, I don't think it will be too hard to
build.  (If anyone knows better, please let me know!)
 
Best,
Richard



Re: [O] Problems with org-drill

2015-12-02 Thread Marco Wahl
Sven Bretfeld  writes:

> I don't know how many of you guys use org-drill as vocabulary learning
> software. I have started some weeks ago to learn Norwegian. The concept
> and flexibility of the extension (contrib) are great. But there is a
> problem (bug?).
>
> During drill-sessions empty cards continue to show up. About 30-40% of
> the questions show an empty screen. These empty screens are fully
> counted as cards in the mini-buffer counter. I use to skip those "cards"
> with "s" but I have the feeling that this skips real questions which
> just are not displayed properly. This would mean I'm creating
> knowledge-gaps in each session.
>
> Editing these cards with "e" doesn't seems to work. It only stops the
> drill-session with the point in the line where I started. There seems to
> be no rule involved in those "empty screens" showing up. (But I have the
> feeling they often occur after I give a card score (0-5) differing from
> the score of the last question.) Neither can I see that there are
> malformed entries which could explain the phenomenon.
>
> Does anyone else have this problem and know how to fix it?

Yes and you can remove the line

(set-window-start nil window-start)

from defun org-toggle-latex-fragment in org.el for a fix.  I use this
fix for a while and have not seen any (unwanted) side effects yet.

The real issue may be somewhere else though.


HTH,
-- 
Marco Wahl
GPG: 0x49010A040A3AE6F2




[O] Problems with org-drill

2015-12-02 Thread Sven Bretfeld
Hi

I don't know how many of you guys use org-drill as vocabulary learning
software. I have started some weeks ago to learn Norwegian. The concept
and flexibility of the extension (contrib) are great. But there is a
problem (bug?).

During drill-sessions empty cards continue to show up. About 30-40% of
the questions show an empty screen. These empty screens are fully
counted as cards in the mini-buffer counter. I use to skip those "cards"
with "s" but I have the feeling that this skips real questions which
just are not displayed properly. This would mean I'm creating
knowledge-gaps in each session.

Editing these cards with "e" doesn't seems to work. It only stops the
drill-session with the point in the line where I started. There seems to
be no rule involved in those "empty screens" showing up. (But I have the
feeling they often occur after I give a card score (0-5) differing from
the score of the last question.) Neither can I see that there are
malformed entries which could explain the phenomenon.

Does anyone else have this problem and know how to fix it?

Sven

-- 
Sven Bretfeld
Department of Philosophy and Religious Studies
NTNU Trondheim




Re: [O] missing frame title using org beamer export

2015-12-02 Thread Eric S Fraga
On Wednesday,  2 Dec 2015 at 06:42, mypostgtd wrote:
> - issue: org mode beamer export ignored all frame titles
>
> I've tried searching online for couple of hours, but couldn't find a 
> solution. 
> Can someone please advise? 

How did you actually export the file to beamer?  Your LaTeX file seems
to be the result of a LaTeX export, not beamer.  Your org file exports
just fine for me.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-359-g6b2c38



Re: [O] problem with org-capture

2015-12-02 Thread Eric S Fraga
On Tuesday,  1 Dec 2015 at 23:22, Nicolas Goaziou wrote:
> Hello,
>
> Eric S Fraga  writes:
>
>> at the risk of again raising an issue that is actually my fault :-(, I
>> am having a problem with org-capture.  I have been using the same
>> templates for yonks but, all of a sudden, my templates don't work.  For
>> instance,
>>
>> #+begin_src emacs-lisp
>>   (setq org-capture-templates
>> '(("t" "todo" entry (file+datetree "~/s/notes/tasks.org")
>>"* TODO %^{Task} %^G\nSCHEDULED: %t\n%i%?")))
>> #+end_src
>>
>> I do not get prompted for the task nor asked for tags.
>
> Fixed. Thank you.

Thanks Nicolas,

However, it only partially fixed.  The system does now prompt as it
should but the mini-buffer input only allows single words.  Hitting
space bar attempts to do completion.  I believe the input should be free
form?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-359-g6b2c38



Re: [O] a post-processing export hook?

2015-12-02 Thread Rasmus
John Kitchin  writes:

> Rasmus writes:
>
>> John Kitchin  writes:
>>
>>> Hi all,
>>>
>>> I tried using org-export-before-parsing-hook to modify an org-file prior
>>> to export to replace some regular expressions with html.
>>>
>>> I ran into the following issue. For short substitutions,
>>> @@html:replacement@@ worked fine. If the replacement text got too long,
>>> this broke. I did wrap it in a #+begin_html: block, but that introduced
>>> line breaks that were undesireable. The replacement text was long
>>> because I had a large tool tip to put on some text.
>>>
>>> I ended up doing a post-process like this:
>>>
>>> (with-current-buffer (org-html-export-as-html)
>>>   (org-process-key-bindings 'html)
>>>   (org-process-emacs-commands 'html)
>>>   (write-file "blog.html")
>>>   (browse-url "blog.html"))
>>>
>>> But, I wondered if there should be a post-export hook? I can see some
>>> challenge for pdf export, for example. The hook should run after the
>>> latex export, not after the pdf is made.
>>
>> I don't think your example warrant an extra hook.  Replacing strings is
>> something that org-export-filter-final-output-functions is perfectly
>> capable of doing IMO.  It’s a bit of a hassle to work with transcoded
>> strings, but having a hook would not change this.
>
> True enough. I tried it with a paragraph filter and it worked fine. I
> didn't know about the org-export-filter-final-output-functions, that is
> pretty much the hook I was looking for. Thanks,

OK.  Now OP makes more sense.  All filters are listed in:

   org-export-filters-alist

The documentation is mostly in the source of ox.el.

—Rasmus

-- 
Lasciate ogni speranza o voi che entrate: siete nella mani di'machellaio




Re: [O] a post-processing export hook?

2015-12-02 Thread John Kitchin

Rasmus writes:

> John Kitchin  writes:
>
>> Hi all,
>>
>> I tried using org-export-before-parsing-hook to modify an org-file prior
>> to export to replace some regular expressions with html.
>>
>> I ran into the following issue. For short substitutions,
>> @@html:replacement@@ worked fine. If the replacement text got too long,
>> this broke. I did wrap it in a #+begin_html: block, but that introduced
>> line breaks that were undesireable. The replacement text was long
>> because I had a large tool tip to put on some text.
>>
>> I ended up doing a post-process like this:
>>
>> (with-current-buffer (org-html-export-as-html)
>>   (org-process-key-bindings 'html)
>>   (org-process-emacs-commands 'html)
>>   (write-file "blog.html")
>>   (browse-url "blog.html"))
>>
>> But, I wondered if there should be a post-export hook? I can see some
>> challenge for pdf export, for example. The hook should run after the
>> latex export, not after the pdf is made.
>
> I don't think your example warrant an extra hook.  Replacing strings is
> something that org-export-filter-final-output-functions is perfectly
> capable of doing IMO.  It’s a bit of a hassle to work with transcoded
> strings, but having a hook would not change this.

True enough. I tried it with a paragraph filter and it worked fine. I
didn't know about the org-export-filter-final-output-functions, that is
pretty much the hook I was looking for. Thanks,

>
> Rasmus

--
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] Jumping between source blocks in a file

2015-12-02 Thread Rainer M Krug
Andreas Leha  writes:

> Rainer M Krug  writes:
>> Rainer M Krug  writes:
>>
>>> Andreas Leha  writes:
>>>
 Hi Andrew,

 Martin Yrjölä  writes:
> Hi Andrew!
>
> Andrew Kirkpatrick writes:
>
>> If this is deemed useful, I'm happy to make changes suitable for
>> inclusion in the project.
>
> Thanks for sharing! I would certainly want these functions included in
> org-mode by default. They streamline at least my literate programming
> workflow substantially.
>

 Sorry for joining late.  I too find these useful.
>>>
>>> Absolutely - very useful. Please include!

 (Also useful would be the possibility to jump to noweb references
 directly from the src buffer...)
>>>
>>> Very nice idea indeed - or possibly even expand them when executing? But
>>> I think this would be a job for the mode in the source buffer...
>>
>> Actually, expand them when opening the Source Buffer (C-c ') and
>> possibly update them when closing?
>>
>
> This might conflict with open Source Buffers for the referenced code
> block.

True - than simply deliminate them with something like

## <> BEGIN
...
## <> END

and *don't* update them at the end?

Probably better: language specific - for R one could write the block to
a temporary file and then insert a =source()= to execute it:


## DO NOT EDIT - AUTO INSERTED - BEGIN
source("<>.R")
## DO NOT EDIT - AUTO INSERTED - END

Would make debugging much easier, if they would be in the source block
where they are used.

And if no language specific behavior is supplied, use the present
behavior.

>
>>>
>>> At the moment, these noweb references are very nice, but not so nice when
>>> debugging a source block where they are used.
>
> Exactly.

Let's do some brainstorming how this could be solved.

Cheers,

Rainer

>
> Regards,
> Andreas
>
>

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] a post-processing export hook?

2015-12-02 Thread Rasmus
John Kitchin  writes:

> Hi all,
>
> I tried using org-export-before-parsing-hook to modify an org-file prior
> to export to replace some regular expressions with html.
>
> I ran into the following issue. For short substitutions,
> @@html:replacement@@ worked fine. If the replacement text got too long,
> this broke. I did wrap it in a #+begin_html: block, but that introduced
> line breaks that were undesireable. The replacement text was long
> because I had a large tool tip to put on some text.
>
> I ended up doing a post-process like this:
>
> (with-current-buffer (org-html-export-as-html)
>   (org-process-key-bindings 'html)
>   (org-process-emacs-commands 'html)
>   (write-file "blog.html")
>   (browse-url "blog.html"))
>
> But, I wondered if there should be a post-export hook? I can see some
> challenge for pdf export, for example. The hook should run after the
> latex export, not after the pdf is made.

I don't think your example warrant an extra hook.  Replacing strings is
something that org-export-filter-final-output-functions is perfectly
capable of doing IMO.  It’s a bit of a hassle to work with transcoded
strings, but having a hook would not change this.

Rasmus


-- 
Tack, ni svenska vakttorn. Med plutonium tvingar vi dansken på knä!




Re: [O] Jumping between source blocks in a file

2015-12-02 Thread Andreas Leha
Rainer M Krug  writes:
> Rainer M Krug  writes:
>
>> Andreas Leha  writes:
>>
>>> Hi Andrew,
>>>
>>> Martin Yrjölä  writes:
 Hi Andrew!

 Andrew Kirkpatrick writes:

> If this is deemed useful, I'm happy to make changes suitable for
> inclusion in the project.

 Thanks for sharing! I would certainly want these functions included in
 org-mode by default. They streamline at least my literate programming
 workflow substantially.

>>>
>>> Sorry for joining late.  I too find these useful.
>>
>> Absolutely - very useful. Please include!
>>>
>>> (Also useful would be the possibility to jump to noweb references
>>> directly from the src buffer...)
>>
>> Very nice idea indeed - or possibly even expand them when executing? But
>> I think this would be a job for the mode in the source buffer...
>
> Actually, expand them when opening the Source Buffer (C-c ') and
> possibly update them when closing?
>

This might conflict with open Source Buffers for the referenced code
block.

>>
>> At the moment, these noweb references are very nice, but not so nice when
>> debugging a source block where they are used.

Exactly.

Regards,
Andreas




Re: [O] Jumping between source blocks in a file

2015-12-02 Thread Rainer M Krug
Rainer M Krug  writes:

> Andreas Leha  writes:
>
>> Hi Andrew,
>>
>> Martin Yrjölä  writes:
>>> Hi Andrew!
>>>
>>> Andrew Kirkpatrick writes:
>>>
 If this is deemed useful, I'm happy to make changes suitable for
 inclusion in the project.
>>>
>>> Thanks for sharing! I would certainly want these functions included in
>>> org-mode by default. They streamline at least my literate programming
>>> workflow substantially.
>>>
>>
>> Sorry for joining late.  I too find these useful.
>
> Absolutely - very useful. Please include!
>>
>> (Also useful would be the possibility to jump to noweb references
>> directly from the src buffer...)
>
> Very nice idea indeed - or possibly even expand them when executing? But
> I think this would be a job for the mode in the source buffer...

Actually, expand them when opening the Source Buffer (C-c ') and
possibly update them when closing?

>
> At the moment, these noweb references are very nice, but not so nice when
> debugging a source block where they are used.
>
> Cheers,
>
> Rainer
>
>>
>> Regards,
>> Andreas
>>
>>
>>

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] Jumping between source blocks in a file

2015-12-02 Thread Rainer M Krug
Andreas Leha  writes:

> Hi Andrew,
>
> Martin Yrjölä  writes:
>> Hi Andrew!
>>
>> Andrew Kirkpatrick writes:
>>
>>> If this is deemed useful, I'm happy to make changes suitable for
>>> inclusion in the project.
>>
>> Thanks for sharing! I would certainly want these functions included in
>> org-mode by default. They streamline at least my literate programming
>> workflow substantially.
>>
>
> Sorry for joining late.  I too find these useful.

Absolutely - very useful. Please include!
>
> (Also useful would be the possibility to jump to noweb references
> directly from the src buffer...)

Very nice idea indeed - or possibly even expand them when executing? But
I think this would be a job for the mode in the source buffer...

At the moment, these noweb references are very nice, but not so nice when
debugging a source block where they are used.

Cheers,

Rainer

>
> Regards,
> Andreas
>
>
>

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] Jumping between source blocks in a file

2015-12-02 Thread Andreas Leha
Hi Andrew,

Martin Yrjölä  writes:
> Hi Andrew!
>
> Andrew Kirkpatrick writes:
>
>> If this is deemed useful, I'm happy to make changes suitable for
>> inclusion in the project.
>
> Thanks for sharing! I would certainly want these functions included in
> org-mode by default. They streamline at least my literate programming
> workflow substantially.
>

Sorry for joining late.  I too find these useful.

(Also useful would be the possibility to jump to noweb references
directly from the src buffer...)

Regards,
Andreas