Re: [O] org-clock-select-task: how does it work?

2015-01-28 Thread Marco Wahl
Hi!

torys.ander...@gmail.com (Tory S. Anderson) writes:

 2) As Peter originally mentioned, I see only five tasks on the list; I
 have more than that each week. Can this be expanded with some
 variable?

AFAICS this is variable org-clock-history-length.

 Having looked into problem 2 by going to `org-clock-select-task` in
 'org-clock.el', I found the following which is mostly beyond my
 current elisp capabilities:

   (insert (org-add-props Recent Tasks\n nil 'face 'bold))
   (mapc
(lambda (m)
  (when (marker-buffer m)
(setq i (1+ i)
  s (org-clock-insert-selection-line
 (if ( i 10)
 (+ i ?0)
   (+ i (- ?A 10))) m))
(if (fboundp 'int-to-char) (setf (car s) (int-to-char (car s
(push s sel-list)))
och)

 While I'd love it if someone could explain to me what the ? operator
 means with ?0 and ?A, one thing I get out of this is that a list
 length of something less than 10 seems hardcoded (right?). What would
 it take to be able customize this with a variable?

?0 is the integer representing character 0 see (info (elisp)Basic
Char Syntax).  The above is a possibility to map the numbers 0, 1,...,
9, 10, ... onto the characters '1', '2', ..., 'A', 'B',  AFAICS.

The letters should come into play when you have more than 9 items in the
clock-history.


HTH,  Marco
-- 
http://www.wahlzone.de
GPG: 0x49010A040A3AE6F2




Re: [O] [bug, ox-ascii][PATCH] description list and long links

2015-01-28 Thread Rasmus
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Thank you. I have applied a slightly different patch.

Thanks! 

 The formatting is still not optimal, however, as you can end up with
 something like
 [...]
 I guess a threshold would then be needed, though, as the following is
 still nice and probably desirable

   lorem: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
  do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
  enimad minim veniam, quis nostrud exercitation ullamco laboris nisi

 But I'm not sure if it is common to have such long tags in description
 lists.

I don't know.  If it is, maybe someone will complain.

—Rasmus

-- 
Me gusta la noche, me gustas tú




Re: [O] org-clock-select-task: how does it work?

2015-01-28 Thread Tory S. Anderson
Excellent answers, on both fronts. Thanks! I couldn't spot 
`org-clock-history-length` in the code. That does the trick!

Thanks for the answer about the ?A. It's devilishly hard to Google that kind 
of thing... time to RTM. 

Marco Wahl marcowahls...@gmail.com writes:

 Hi!

 torys.ander...@gmail.com (Tory S. Anderson) writes:

 2) As Peter originally mentioned, I see only five tasks on the list; I
 have more than that each week. Can this be expanded with some
 variable?

 AFAICS this is variable org-clock-history-length.

 Having looked into problem 2 by going to `org-clock-select-task` in
 'org-clock.el', I found the following which is mostly beyond my
 current elisp capabilities:

  (insert (org-add-props Recent Tasks\n nil 'face 'bold))
  (mapc
   (lambda (m)
 (when (marker-buffer m)
   (setq i (1+ i)
 s (org-clock-insert-selection-line
(if ( i 10)
(+ i ?0)
  (+ i (- ?A 10))) m))
   (if (fboundp 'int-to-char) (setf (car s) (int-to-char (car s
   (push s sel-list)))
   och)

 While I'd love it if someone could explain to me what the ? operator
 means with ?0 and ?A, one thing I get out of this is that a list
 length of something less than 10 seems hardcoded (right?). What would
 it take to be able customize this with a variable?

 ?0 is the integer representing character 0 see (info (elisp)Basic
 Char Syntax).  The above is a possibility to map the numbers 0, 1,...,
 9, 10, ... onto the characters '1', '2', ..., 'A', 'B',  AFAICS.

 The letters should come into play when you have more than 9 items in the
 clock-history.


 HTH,  Marco



Re: [O] [bug, ox-ascii][PATCH] description list and long links

2015-01-28 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 Consider the following example:

 (with-temp-buffer 
   (require 'ox-ascii)
   (insert
- 
 [[http://www.npr.org/blogs/monkeysee/2009/03/a_very_long_url_makes_a_very_s.html][A
  label with a long link]] :: Lorem ipsum dolor sit amet, consectetur 
 adipiscing elit\n)
   (org-ascii-export-as-ascii nil nil nil t))  

 With output:

 [A label with a long link]: Lorem
 ipsum
 dolor
 sit
 amet,
 consectetur
 adipiscing
 elit


 [A label with a long link]
 http://www.npr.org/blogs/monkeysee/2009/03/a_very_long_url_makes_a_very_s.html

 The reason for the wrong formatting is that org-ascii--current-text-width
 takes that there's is like -28 characters left for lorem ipsum...  It does
 that because it counts link and label.

 The patch fixes this by only counting the length of the label.

Thank you. I have applied a slightly different patch.

The formatting is still not optimal, however, as you can end up with
something like

  
[http://www.npr.org/blogs/monkeysee/2009/03/a_very_long_url_makes_a_very_s.html]:
 Lorem

ipsum

dolor

sit

amet,

consectetur

adipisicing

elit

A proper formatting would be, for example,

  
[http://www.npr.org/blogs/monkeysee/2009/03/a_very_long_url_makes_a_very_s.html]:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enimad minim veniam, quis nostrud exercitation ullamco laboris


I guess a threshold would then be needed, though, as the following is
still nice and probably desirable

  lorem: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
 do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
 enimad minim veniam, quis nostrud exercitation ullamco laboris nisi

But I'm not sure if it is common to have such long tags in description
lists.


Regards,

-- 
Nicolas Goaziou



Re: [O] org-clock-select-task: how does it work?

2015-01-28 Thread Tory S. Anderson
Now I'm loving this tool but I'm looking for two tweaks that would make a big 
difference. 

1) I use work.org to track my weekly work hours; each week is mostly the same 
tasks, but new time frames. I need to be able to make sure my recent clock 
list is talking about the item for this week, not the identically named item 
for a previous week. If I could see the tree-path of the items (in the same way 
putting the point over an item in agenda shows you the hierarchy) that would be 
great. 

2) As Peter originally mentioned, I see only five tasks on the list; I have 
more than that each week. Can this be expanded with some variable? 

Having looked into problem 2 by going to `org-clock-select-task` in 
'org-clock.el', I found the following which is mostly beyond my current elisp 
capabilities: 

(insert (org-add-props Recent Tasks\n nil 'face 'bold))
(mapc
 (lambda (m)
   (when (marker-buffer m)
 (setq i (1+ i)
   s (org-clock-insert-selection-line
  (if ( i 10)
  (+ i ?0)
(+ i (- ?A 10))) m))
 (if (fboundp 'int-to-char) (setf (car s) (int-to-char (car s
 (push s sel-list)))
 och)

While I'd love it if someone could explain to me what the ? operator means 
with ?0 and ?A, one thing I get out of this is that a list length of 
something less than 10 seems hardcoded (right?). What would it take to be able 
customize this with a variable? 


Sebastien Vauban sva-n...@mygooglest.com writes:

 Peter Münster wrote:
 On Sat, Jan 24 2015, Peter Münster wrote:

 - There are duplicates in the list.

 Not reproducible.

 I still do have duplicates in my list as well.  It never has been fixed,
 but I don't have either a reproducible recipe.

 See https://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg00568.html.

 Best regards,
   Seb



Re: [O] org-clock-select-task: how does it work?

2015-01-28 Thread Sebastien Vauban
Tory S. Anderson wrote:
 Sebastien Vauban sva-n...@mygooglest.com writes:
 Peter Münster wrote:
 On Sat, Jan 24 2015, Peter Münster wrote:

 - There are duplicates in the list.

 Not reproducible.

 I still do have duplicates in my list as well.  It never has been fixed,
 but I don't have either a reproducible recipe.

 See https://lists.gnu.org/archive/html/emacs-orgmode/2013-04/msg00568.html.

 Now I'm loving this tool but I'm looking for two tweaks that would
 make a big difference.

 1) I use work.org to track my weekly work hours; each week is mostly
 the same tasks, but new time frames. I need to be able to make sure my
 recent clock list is talking about the item for this week, not the
 identically named item for a previous week. If I could see the
 tree-path of the items (in the same way putting the point over an item
 in agenda shows you the hierarchy) that would be great.

Not sure I'd like that, or at least not always / by default. That'd make
tasks become truncated or going on multiple lines in my case.

Dunno what would be the best for all of us.

 2) As Peter originally mentioned, I see only five tasks on the list;
 I have more than that each week. Can this be expanded with some
 variable?

--8---cut here---start-8---
;; Number of clock tasks to remember in history.
(setq org-clock-history-length 35)  ; 1 to 9 + A to Z
--8---cut here---end---8---

Though, I don't understand why it's never that long -- while it should
grow up to that amount before forgetting about old tasks.

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Infojs deeply nested UUID based internal links do not work

2015-01-28 Thread Svjatoslav Agejenko
Hello!

I did HTML export with INFOJS enabled.
Document has deeply nested nodes.

When I link to relatively major nodes, generated URL looks like:
javascript:org_html_manager.go(3)

And clicking it works well. Corresponding node will open.


But when I link to even deeper node, URL now becomes like that:
.../bug%20demo.html#sec-1-1-1-1-2

And such links do not work with INFOJS.

I attached minimal example org file and generated HTML.

Is it known limitation of INFOJS ?
Any known workarounds ?

Best regards,
Svjatoslav

Title: bug demo






bug demo

Table of Contents


1. first

1.1. second

1.1.1. third








link to sixth element (broken)

link to third element




The culprit seems to be the URL like this. It does not work with
InfoJS:


.../bug%20demo.html#sec-1-1-1-1-2



While URL's like this work


_javascript_:org_html_manager.go(3)




1 first


Sed sit amet massa ipsum. Sed scelerisque, mauris eu porttitor auctor,
metus justo vulputate nibh, sit amet pharetra lorem leo in
ipsum. Phasellus sed dui eu eros consequat efficitur. Phasellus a
felis leo. Pellentesque suscipit diam ac condimentum finibus. Sed
ornare eu nibh sed semper. Proin et dui tortor. Phasellus consectetur
volutpat bibendum. Pellentesque in eros massa. Aliquam et leo
lectus. Donec lobortis, dui ac laoreet dapibus, massa velit accumsan
purus, sit amet elementum augue nulla sit amet ante. Sed a egestas
urna. Aenean ac aliquam dui, at volutpat erat.




1.1 second


1.1.1 third



fourthsixth - random stuff

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at
blandit neque. Nulla a leo auctor, malesuada sapien in, cursus
massa. Maecenas a nibh augue. Nulla facilisi. Donec ultrices
sollicitudin dui ac elementum. Praesent semper varius bibendum. Cum
sociis natoque penatibus et magnis dis parturient montes, nascetur
ridiculus mus. Fusce hendrerit ultrices urna, a tincidunt enim finibus
sed. Integer posuere leo quis urna vulputate dapibus.




sixth - target

Praesent at tellus tincidunt, dapibus purus vitae, molestie
orci. Curabitur consectetur, felis eu condimentum consectetur, nunc
risus interdum orci, id eleifend arcu nunc sed ex. Donec cursus
laoreet lectus vitae consequat. Donec eleifend eu eros sodales
scelerisque. Sed et faucibus nisi. Donec nec quam sit amet odio
fermentum efficitur. Nullam gravida at nunc sed vestibulum. Mauris
consectetur orci ac quam tristique sollicitudin. Mauris eget augue ut
nibh venenatis fringilla et sit amet dui. Donec id felis eget tellus
eleifend vulputate dignissim ac sem. Nullam iaculis enim ut orci
lacinia pharetra. Etiam tristique ac lectus vel semper. Aliquam
iaculis, metus molestie tincidunt bibendum, orci tortor condimentum
lectus, ut venenatis lorem eros et eros. Suspendisse molestie, erat
non auctor convallis, nunc turpis accumsan urna, in fermentum dolor
urna ac ante. Nam scelerisque, lectus nec efficitur viverra, dolor
nibh tempor lorem, ac pellentesque risus diam eget nibh.




sixth - random stuff 2

Vivamus leo nulla, accumsan ut finibus sit amet, porttitor at
neque. Maecenas in pellentesque massa. Quisque pulvinar facilisis
purus, at mattis augue ultricies a. Quisque fringilla quam a mi
tempor, vel hendrerit quam facilisis. Vivamus vitae velit elementum,
congue est ut, sagittis mi. Phasellus rutrum lorem tortor, sit amet
tincidunt turpis tincidunt sed. Aliquam at quam quis turpis consequat
luctus. Vivamus vestibulum urna est, et dignissim dui viverra
nec. Duis posuere mattis vehicula. Nunc ac volutpat nisl, sit amet
condimentum mi. Praesent malesuada odio in velit bibendum, vitae
ullamcorper ex aliquam.









Author: Svjatoslav Agejenko
Created: 2015-01-28 Wed 21:46
Emacs 24.4.1 (Org mode 8.2.10)
Validate



#+INFOJS_OPT: view:t toc:t ltoc:t


- link to [[id:06704d05-0da1-410e-86ab-bc49d65b2b1a][sixth]] element (broken)
- link to [[id:70bde97d-07c7-4c84-a337-c86b52f94ff3][third]] element

The culprit seems to be the URL like this. It does not work with
InfoJS:
: .../bug%20demo.html#sec-1-1-1-1-2

While URL's like this work
: javascript:org_html_manager.go(3)


* first
Sed sit amet massa ipsum. Sed scelerisque, mauris eu porttitor auctor,
metus justo vulputate nibh, sit amet pharetra lorem leo in
ipsum. Phasellus sed dui eu eros consequat efficitur. Phasellus a
felis leo. Pellentesque suscipit diam ac condimentum finibus. Sed
ornare eu nibh sed semper. Proin et dui tortor. Phasellus consectetur
volutpat bibendum. Pellentesque in eros massa. Aliquam et leo
lectus. Donec lobortis, dui ac laoreet dapibus, massa velit accumsan
purus, sit amet elementum augue nulla sit amet ante. Sed a egestas
urna. Aenean ac aliquam dui, at volutpat erat.

** second
*** third
:PROPERTIES:
:ID:   70bde97d-07c7-4c84-a337-c86b52f94ff3
:END:

 fourth

* sixth - random stuff
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at
blandit neque. Nulla a leo auctor, malesuada sapien in, cursus
massa. Maecenas a nibh augue. Nulla facilisi. Donec ultrices
sollicitudin dui ac 

[O] Customize html formatting tags for export

2015-01-28 Thread Tory S. Anderson
Right now I see that =formatted= and ~formatted~ both produce 
codeformatted/code when exported to html. How can I change one of these, 
perhaps to a custom tag (in particular, I'm hoping to produce 
kbdformatted/kbd)? 



Re: [O] HTML -- Org-mode?

2015-01-28 Thread Wim Oudshoorn
 Thank you Willem,

 This looks very helpful.

 I am trying the code out in a scratch buffer and I am unable to gnerate
 org
 syntax, e.g. with this test string:

 (h-2-o-insert-org-source-for-html  pa
 href=\http://example.org/\;hello/a
 span style=\font-style:italic;\worldbr/ foo/span/p )


 Am I doing something wrong?  Thanks,
 Matt


No you are not doing anything wrong.
What happens is that:

1. I have not implemented links.  This should be easy
   to fix and I will do this when I get home.
2. Similarly for the span element.   However I do not
   exactly know what the corresponding Org syntax should be?
   Would you expect:

   /world/
   /foo/

   Or is there a structured element in org mode that renders
   a block as italics?

I will see what I can do about point 2.

In general, I am a bit torn between:

- faithful transformation.
- Getting readable org source.

I am leaning towards the readable org source and
sacrificing the faithfulness.

Wim Oudshoorn.




Re: [O] exporting zotxt or orgref links to HTML and ODF

2015-01-28 Thread Matt Price
i think I may have seen it these on the list at one point, but it's very
helpful to be reminded.

I do think that the default fonts, etc., are a bit of an acquired taste for
humanists; and I've gotten used to using custom styles in html  odt for
size  placing of images; but even without following the instructions
carefully, export seems to work, which is pretyt amazing!

Vikas recommends involving pandoc manually, as Erik H. has also suggested
to me; I would like to aovid doing that if possible, but if it has to be
done i guess I can find some way of automating it.

There are clearly a lot of options in this space; I am still interested in
using Zotero if I can, so will continue working with zotxt, but hopefully
in a way that gets me closer to other people's usage patterns.

thanks,
Matt


On Wed, Jan 28, 2015 at 3:31 PM, Vicente Vera vicente...@gmail.com wrote:

 Hello. Interesting thread!
 Matt, have you read Vikas guide to writing papers with Org?
 https://github.com/vikasrawal/orgpaper
 From my point of view, using LaTeX through Org isn't difficult at all.
 You'll need to tweak a few things (packages, figures, etc.), but it's
 definitely easier for a beginner that starting a LaTeX document from
 scratch.
 Here's another article about writing LaTeX (social science) papers:
 https://github.com/kjhealy/workflow-paper



[O] bug#19606: 24.4; Emacs hangs when editing a 5-line Org file

2015-01-28 Thread Dani Moncayo
  Looks like an infloop due to display or overlay strings with text
  properties.  Can you reproduce this in an unoptimized build?

 Sure, if you can point me to such a version I can download.

https://sourceforge.net/projects/emacs-bin/files/snapshots/debug/

HTH

-- 
Dani Moncayo





[O] Special tags?

2015-01-28 Thread Marcin Borkowski
Hello fellow Orgers,

can I find a list of special tags somewhere?  By special I mean
e.g. :export:, :noexport: and :archive: - they are treated specially by
Org.  Are there any others like that?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] Customize html formatting tags for export

2015-01-28 Thread Marcin Borkowski

On 2015-01-28, at 21:40, Tory S. Anderson torys.ander...@gmail.com wrote:

 Right now I see that =formatted= and ~formatted~ both produce 
 codeformatted/code when exported to html. How can I change one of these, 
 perhaps to a custom tag (in particular, I'm hoping to produce 
 kbdformatted/kbd)? 

See ox-html.  There are functions org-html-verbatim and org-html-code.
If you look at those, you can see that (even though it might be
a quick-and-dirty hack) customizing org-html-text-markup-alist should
work.  You might even utilize the strike-through, if you never use it.

Hth,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



[O] org export to org

2015-01-28 Thread John Kitchin
All the discussion about citations has gotten me thinking. It is easy
enough to export cite links to the pandoc format, including pre and post
text. I have done a proof of concept of this in a markdown export.

I would like to do an org export to org, with the goal of the exported
org document to no longer have cite:KEY1,KEY2 but rather [@KEY1; @KEY2]. So far 
my
investigations of exporting org to org have not led anywhere; the links are
untouched, even with an org format option in the link definition.

Are links ignored in an org export to org? If not, is there some trick
to converting them to another format?

Thanks!
--
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] exporting zotxt or orgref links to HTML and ODF

2015-01-28 Thread John Kitchin
With the latest version of org-ref, I can automate export from org
through markdown to docx via pandoc like this:

#+BEGIN_SRC emacs-lisp
(defun ox-export-to-docx-and-open ()
 Export the current org file as a docx via markdown.
 (interactive)
(let* ((bibfile (expand-file-name (car (org-ref-find-bibliography
   ;; this is probably a full path
   (current-file (buffer-file-name))
   (basename (file-name-sans-extension current-file))
   (md-file (concat basename .md))
   (docx-file (concat basename .docx)))

  (when (file-exists-p docx-file) (delete-file docx-file))
  (org-export-to-file 'md md-file)
  (shell-command (format
  pandoc -s -S --bibliography=%s %s -o %s
  bibfile md-file docx-file))
  (org-open-file docx-file '(16
#+END_SRC


this works because i defined a markdown format function that converts
the cite link to pandoc format on export. I could avoid the markdown
translation if I could do an org to org export that would do that. With
a little work we could define file tags like:

#+PANDOC_CSL: some-csl-file

that would also get passed to the pandoc command to determine the style
of the citation and bibliography.




Matt Price writes:

 i think I may have seen it these on the list at one point, but it's very
 helpful to be reminded.

 I do think that the default fonts, etc., are a bit of an acquired taste for
 humanists; and I've gotten used to using custom styles in html  odt for
 size  placing of images; but even without following the instructions
 carefully, export seems to work, which is pretyt amazing!

 Vikas recommends involving pandoc manually, as Erik H. has also suggested
 to me; I would like to aovid doing that if possible, but if it has to be
 done i guess I can find some way of automating it.

 There are clearly a lot of options in this space; I am still interested in
 using Zotero if I can, so will continue working with zotxt, but hopefully
 in a way that gets me closer to other people's usage patterns.

 thanks,
 Matt


 On Wed, Jan 28, 2015 at 3:31 PM, Vicente Vera vicente...@gmail.com wrote:

 Hello. Interesting thread!
 Matt, have you read Vikas guide to writing papers with Org?
 https://github.com/vikasrawal/orgpaper
 From my point of view, using LaTeX through Org isn't difficult at all.
 You'll need to tweak a few things (packages, figures, etc.), but it's
 definitely easier for a beginner that starting a LaTeX document from
 scratch.
 Here's another article about writing LaTeX (social science) papers:
 https://github.com/kjhealy/workflow-paper


--
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] How to check whether an element (really) has some tag?

2015-01-28 Thread Marcin Borkowski
Hi there again,

I can do
(member-ignore-case sometag (org-element-property :tags element)),
but I'd like to know whether some element has the tag, not taking
inheritance into account.  Is there a simple way to do it?  (If not,
I'll consider using properties instead of tags for my purpose - but tags
are simpler to use/edit and visible...)

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] exporting zotxt or orgref links to HTML and ODF

2015-01-28 Thread Matt Price
John,

this does look very powerful.  Do you see a path forward that would help
add zotero support to org-ref, probably using Erik's zotxt library?  Does
that seem like a worthwhile goal for you?

Matt


On Wed, Jan 28, 2015 at 6:01 PM, John Kitchin johnrkitc...@gmail.com
wrote:

 With the latest version of org-ref, I can automate export from org
 through markdown to docx via pandoc like this:

 #+BEGIN_SRC emacs-lisp
 (defun ox-export-to-docx-and-open ()
  Export the current org file as a docx via markdown.
  (interactive)
 (let* ((bibfile (expand-file-name (car (org-ref-find-bibliography
;; this is probably a full path
(current-file (buffer-file-name))
(basename (file-name-sans-extension current-file))
(md-file (concat basename .md))
(docx-file (concat basename .docx)))

   (when (file-exists-p docx-file) (delete-file docx-file))
   (org-export-to-file 'md md-file)
   (shell-command (format
   pandoc -s -S --bibliography=%s %s -o %s
   bibfile md-file docx-file))
   (org-open-file docx-file '(16
 #+END_SRC


 this works because i defined a markdown format function that converts
 the cite link to pandoc format on export. I could avoid the markdown
 translation if I could do an org to org export that would do that. With
 a little work we could define file tags like:

 #+PANDOC_CSL: some-csl-file

 that would also get passed to the pandoc command to determine the style
 of the citation and bibliography.




 Matt Price writes:

  i think I may have seen it these on the list at one point, but it's very
  helpful to be reminded.
 
  I do think that the default fonts, etc., are a bit of an acquired taste
 for
  humanists; and I've gotten used to using custom styles in html  odt for
  size  placing of images; but even without following the instructions
  carefully, export seems to work, which is pretyt amazing!
 
  Vikas recommends involving pandoc manually, as Erik H. has also suggested
  to me; I would like to aovid doing that if possible, but if it has to be
  done i guess I can find some way of automating it.
 
  There are clearly a lot of options in this space; I am still interested
 in
  using Zotero if I can, so will continue working with zotxt, but hopefully
  in a way that gets me closer to other people's usage patterns.
 
  thanks,
  Matt
 
 
  On Wed, Jan 28, 2015 at 3:31 PM, Vicente Vera vicente...@gmail.com
 wrote:
 
  Hello. Interesting thread!
  Matt, have you read Vikas guide to writing papers with Org?
  https://github.com/vikasrawal/orgpaper
  From my point of view, using LaTeX through Org isn't difficult at all.
  You'll need to tweak a few things (packages, figures, etc.), but it's
  definitely easier for a beginner that starting a LaTeX document from
  scratch.
  Here's another article about writing LaTeX (social science) papers:
  https://github.com/kjhealy/workflow-paper
 

 --
 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] org export to org

2015-01-28 Thread Nick Dokos
John Kitchin johnrkitc...@gmail.com writes:

 All the discussion about citations has gotten me thinking. It is easy
 enough to export cite links to the pandoc format, including pre and post
 text. I have done a proof of concept of this in a markdown export.

 I would like to do an org export to org, with the goal of the exported
 org document to no longer have cite:KEY1,KEY2 but rather [@KEY1; @KEY2]. So 
 far my
 investigations of exporting org to org have not led anywhere; the links are
 untouched, even with an org format option in the link definition.

 Are links ignored in an org export to org? If not, is there some trick
 to converting them to another format?


ox-org.el defines the org backend with  (link . org-org-identity) -
actually just about everything is tied to org-org-identity (with a few
exceptions of course). Maybe you can derive a backend which munges links
appropriately (for some value of appropriately)?

-- 
Nick




Re: [O] Japanese popularity of orgmode

2015-01-28 Thread heroxbd
Hey Tory,

torys.ander...@gmail.com (Tory S. Anderson) writes:

 There seems to be (and has been for a while) a growing Japanese
 presence online with orgmode materials, documentation, addons,
 etc. Most recenlty I found this blog:
 http://paper.li/highfrontier/1300501273 . I had also noticed many of
 the page titles on the orgmode website/wiki had Japanese content. This
 has me curious. Does anyone know the story of what's causing it to
 take off in Japan, or whether taking off is even the right word? Is
 it just a few people or a department at a university that are using
 it?

Well, just my 2 cents.  I attended a Japanese university and wrote my
PhD thesis in org-mode.

Cheers,
Benda



[O] [sort-of OT] Help with request and deferred

2015-01-28 Thread Matt Price
in pursuit of the zotero integration I discussed in other threads, I am
trying to write one simple little function to extend Erik's code, and
failing.  Since I'm flailing and going to bed soon:  can anyone see what's
wrong with this function?

The results are generated perfectly well, but the return value of hte
function is

[cl-struct-deferred deferred:default-callback deferred:default-errorback
deferred:default-cancel nil nil nil] [2 times]


whereas I want something like:

div style=\line-height: 1.35; padding-left: 2em; text-indent:-2em;\
class=\csl-bib-body\
  div class=\csl-entry\Suchman, Lucy. “Subject Objects.” iFeminist
Theory/i 12, no. 2 (August 1, 2011): 119–45.
http://resolver.scholarsportal.info/resolve/14647001/v12i0002/119_so.xml
./div
  span class=\Z3988\
title=\url_ver=Z39.88-2004amp;ctx_ver=Z39.88-2004amp;rfr_id=info%3Asid%2Fzotero.org%3A2amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournalamp;rft.genre=articleamp;rft.atitle=Subject%20objectsamp;rft.jtitle=Feminist%20Theoryamp;rft.volume=12amp;rft.issue=2amp;rft.aufirst=Lucyamp;rft.aulast=Suchmanamp;rft.au=Lucy%20Suchmanamp;rft.date=2011-08-01amp;rft.pages=119-145amp;rft.spage=119amp;rft.epage=145amp;rft.issn=14647001\/span
/div


---

(defun org-zotxt-get-html-bib (key)
  ;; (with-output-to-temp-buffer *help2*
  ;;   (print key))
  (lexical-let ((d (deferred:new)))
(request
 (format %s/items zotxt-url-base)
 :params `((key . ,key)
   (format . bibliography))
 :parser 'json-read
 :success  (function*
(lambda (key data allow-other-keys)
  ;; (with-output-to-temp-buffer *debug*
  ;;   (print data))

  (let* ((results (mapcar (lambda (e)
(cdr (assq 'html e))
)
  data))
 )
(with-output-to-temp-buffer *debug*
  (print results))
(results)
(deferred:callback-post
  d (if (null results) nil
  ;; `((:key ,key :citation ,results))
  (results)
  ))
  ))
)

  )
d))
---

thanks again!

Matt


Re: [O] exporting zotxt or orgref links to HTML and ODF

2015-01-28 Thread John Kitchin
I can see how you could have a command insert links from a zotero database.
You just need some way to get a list of the keys for that. it looks like
zotxt could provide that. if not, it could be a few sqlite commands to get
it.

Lets say we have citations like: zotero:zotero-key or [@zotero-key]. These
are easy to get I think.

I am still unclear on what you do after that. So far I only have used
bibtex as the backend database, and there are programs like bibtex and
pandox that create the bibliography from it. What is the end format you
want? and how would zotero be used to generate the bibliography?

John

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


On Wed, Jan 28, 2015 at 8:34 PM, Matt Price mopto...@gmail.com wrote:

 John,

 this does look very powerful.  Do you see a path forward that would help
 add zotero support to org-ref, probably using Erik's zotxt library?  Does
 that seem like a worthwhile goal for you?

 Matt


 On Wed, Jan 28, 2015 at 6:01 PM, John Kitchin johnrkitc...@gmail.com
 wrote:

 With the latest version of org-ref, I can automate export from org
 through markdown to docx via pandoc like this:

 #+BEGIN_SRC emacs-lisp
 (defun ox-export-to-docx-and-open ()
  Export the current org file as a docx via markdown.
  (interactive)
 (let* ((bibfile (expand-file-name (car (org-ref-find-bibliography
;; this is probably a full path
(current-file (buffer-file-name))
(basename (file-name-sans-extension current-file))
(md-file (concat basename .md))
(docx-file (concat basename .docx)))

   (when (file-exists-p docx-file) (delete-file docx-file))
   (org-export-to-file 'md md-file)
   (shell-command (format
   pandoc -s -S --bibliography=%s %s -o %s
   bibfile md-file docx-file))
   (org-open-file docx-file '(16
 #+END_SRC


 this works because i defined a markdown format function that converts
 the cite link to pandoc format on export. I could avoid the markdown
 translation if I could do an org to org export that would do that. With
 a little work we could define file tags like:

 #+PANDOC_CSL: some-csl-file

 that would also get passed to the pandoc command to determine the style
 of the citation and bibliography.




 Matt Price writes:

  i think I may have seen it these on the list at one point, but it's very
  helpful to be reminded.
 
  I do think that the default fonts, etc., are a bit of an acquired taste
 for
  humanists; and I've gotten used to using custom styles in html  odt for
  size  placing of images; but even without following the instructions
  carefully, export seems to work, which is pretyt amazing!
 
  Vikas recommends involving pandoc manually, as Erik H. has also
 suggested
  to me; I would like to aovid doing that if possible, but if it has to be
  done i guess I can find some way of automating it.
 
  There are clearly a lot of options in this space; I am still interested
 in
  using Zotero if I can, so will continue working with zotxt, but
 hopefully
  in a way that gets me closer to other people's usage patterns.
 
  thanks,
  Matt
 
 
  On Wed, Jan 28, 2015 at 3:31 PM, Vicente Vera vicente...@gmail.com
 wrote:
 
  Hello. Interesting thread!
  Matt, have you read Vikas guide to writing papers with Org?
  https://github.com/vikasrawal/orgpaper
  From my point of view, using LaTeX through Org isn't difficult at all.
  You'll need to tweak a few things (packages, figures, etc.), but it's
  definitely easier for a beginner that starting a LaTeX document from
  scratch.
  Here's another article about writing LaTeX (social science) papers:
  https://github.com/kjhealy/workflow-paper
 

 --
 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] Full path figure export to latex

2015-01-28 Thread Leu Zhe
Hi, when I export a full path figure,
like: [[file:c:/Users/admin/Desktop/1.png]]
to LaTex. Unfortunately I got the result of
{//c:/Users/admin/Desktop/1.png},
one more // was generated in front of c:, which is an error in LaTex.
How can I solve this problem?


Re: [O] exporting zotxt or orgref links to HTML and ODF

2015-01-28 Thread Vikas Rawal

 
 With the latest version of org-ref, I can automate export from org
 through markdown to docx via pandoc like this:

Great job, once again!

Vikas




[O] http://orgmode.org/worg/code/org-info-js/ broken

2015-01-28 Thread Svjatoslav Agejenko
Button Show Org source on page
http://orgmode.org/worg/code/org-info-js/ 
does not work.

When I click it, some text quickly flashes and disappears.
Tried on recent Google Chrome and Opera browsers.


Best regards,
Svjatoslav