Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-19 Thread Ian Barton

On 19/11/13 01:40, Christopher W. Ryan wrote:

Not sure citational is even a word, but hopefully it conveys my meaning!

I've been using LaTeX for academic writing and reading for quite some
time, with emacs as my editor. I'm pretty familiar with managing a .bib
file containing all the references I've collected, and using it in LaTeX
\cite commands.

I've come to org-mode more recently. I'm trying to imagine how I might
use it to manage my personal library. I have a directory full of pdf
files, each a downloaded article. Some articles I reference in papers I
write; others I just read and want to keep.  I also have a .bib file
where I put the citational material for all those articles. Whenever I
download an article, I add its entry to my .bib file. I tend to manage
this with JabRef because it searches Medline so easily, but I also will
edit the .bib file directly when necessary.

I like the idea of an org file containing the citational information
(authors, title, journal, etc)  *plus* links to the pdfs on my hard
drive, or on the internet. I could also include my notes about the
articles. But what would that org file look like? How do I insert a
reference to an article into the org file which contains the article I
am writing?

I'd be grateful for any explanations, or links to tutorials.



Can't help with managing the citations in org, as the last time I had to 
do this I was using a card index file:)


However, to address your other questions one way of doing this would be 
to create an org file with a heading for each article:


* Article 1.
Here are some notes.

* Article 2
My notes

You can create hyperlinks to each article from org. See 
http://orgmode.org/org.html#Hyperlinks for more detailed information.


However, you should perhaps decide first how you might structure your 
org file. You might want to group articles under an author heading, or 
perhaps more likely by subject area, with a sub heading for each article 
under the main heading.


You may also want to tag each article. See 
http://orgmode.org/org.html#Tags Org lets you quickly narrow your view 
of an org file so that you are only seeing headings with specific tags.


Ian.





Re: [O] patch proposal for org-clock-time% with day

2013-11-19 Thread Bastien
Hi Marco,

can you send it as a patch?  It helps spotting the difference.

Clone the git repo, edit the file, save the buffer, then simply
do `C-x v =' to create a new buffer with the diff.  This is from
a recent Emacs, but not so recent.

Thanks,

-- 
 Bastien



Re: [O] [PATCH] org-compat: Support for getting data from Windows clipboard

2013-11-19 Thread Bastien
Hi Alexander,

can you test the attached patch and let me know if it works for you?

Thanks,

diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index b714f13..2eea724 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -350,7 +350,8 @@ Works on both Emacs and XEmacs.
 	 (or (x-get-selection value 'UTF8_STRING)
 		 (x-get-selection value 'COMPOUND_TEXT)
 		 (x-get-selection value 'STRING)
-		 (x-get-selection value 'TEXT))
+		 (x-get-selection value 'TEXT)
+		 (x-get-selection-value))
 	   (error nil)
 
 (defun org-propertize (string rest properties)

-- 
 Bastien


Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-19 Thread Karl Voit
Hi Christopher!

* Christopher W. Ryan cr...@binghamton.edu wrote:

 I've come to org-mode more recently. I'm trying to imagine how I might
 use it to manage my personal library. 

I have summarized how I manage my papers and references with
Org-mode here:
https://github.com/novoid/extract_pdf_annotations_to_orgmode

In case you don't use Android/RepliGo skip to Bonus: .emacs setup
where I describe my references.org.

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

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




Re: [O] links to attachments don't export anymore

2013-11-19 Thread Myles English

Nicolas,

 · Nicolas Goaziou n.goaz...@gmail.com wrote:


 Done for `org-entry-properties'. The regression should be fixed now.

 Thank you for the report.

Thanks very much, I'll test it soon.

Myles



[O] Is it possible to repeat a block of org-mode text on export, maybe with replacement?

2013-11-19 Thread Gary Oberbrunner
I don't know if this is beyond the capabilities of org-mode or not.  I'd
like to have a block of text repeated multiple times with slight
variations.  For the sake of the example, a numbered list:

1. this is the first line
1. this is the second line with %VARIANT% as the value
1. this is the third line

When exported, say as ASCII, I'd like this:

1. this is the first line
2. this is the second line with foo as the value
3. this is the third line

1. this is the first line
2. this is the second line with bar as the value
3. this is the third line

1. this is the first line
2. this is the second line with baz as the value
3. this is the third line

I'm not sure how to go about this; I assume I'd use org-babel with source
blocks that contain org-mode text or elisp or something.

Of course if the right answer is I should write a python script to generate
my org-mode text, well, that's OK too. :-)

-- 
Gary


Re: [O] Lisp code blocks fail

2013-11-19 Thread Eric Schulte
Hi Tom,

Sorry about the slow reply, I've been busy as usual.

I just pushed up a fix for this problem.  As you've discovered, the
slime function returns a two-element list holding any strings written to
STDOUT, and the value of the evaluated code.  In two different places
org-babel-execute:lisp was trying to split this list into the separate
values however by the second time the list had been reduced to 2.

I've just pushed up a fix.

Best,

t...@tsdye.com (Thomas S. Dye) writes:

 Hi Eric,

 I understand this a bit better now.

 In org-babel-execute:lisp, the local variable result is getting set to
 ( 2).

 With :results value, the call to read in org-babel-result-cond is being
 passed 2 when it expects a list.  With :results output, it gets ,
 which triggers the same error.

 As I noted earlier, slime-eval executes the lisp code properly, but for
 some reason it appears to be returning a string instead of a vector or a
 list.

 I'm not sure what I did to make this stop working.  It was fine
 a week ago. I haven't changed slime in six months AFAIK.

 Other babel languages work as usual. My problem appears to be confined
 to lisp.

 All the best,
 Tom

 t...@tsdye.com (Thomas S. Dye) writes:

 Hi Eric,

 An edebug adventure :)

 AFAICT, the error is thrown by this call to a macro:
 (org-babel-result-cond (replace) (car result)), where result has been
 set to 2 by the long (funcall) in (let).

 Specifically, (org-babel-lisp-vector-to-list 2) appears to trigger the
 (error)--at least that is the last code line edebug stops at before
 getting to the (error) line. The modeline says Result: 2 just before
 the error.

 Does this help?

 Tom

 Eric Schulte schulte.e...@gmail.com writes:

 Hi Tom,

 That example works for me.  Perhaps you could edebug (C-u C-M-x) the
 `org-babel-execute:lisp' function and then run that code block again to
 see at which statement the error is thrown.

 I'm not sure what the problem could be.

 Best,

 t...@tsdye.com (Thomas S. Dye) writes:

 Hi Eric,

 #+begin_src lisp
 (+ 1 1)
 #+end_src

 Debugger entered--Lisp error: (wrong-type-argument listp 2)
   byte-code(\211A@)\207 [result x] 2)
   org-babel-execute:lisp((+ 1 1) ((:comments . ) (:shebang . )
 (:cache . no) (:padline . ) (:noweb . yes) (:tangle . no)
 (:exports . code) (:results . replace) (:session . none)
 (:hlines . no) (:result-type . value) (:result-params replace)
 (:rowname-names) (:colname-names)))
   org-babel-execute-src-block(nil)
   org-babel-execute-src-block-maybe()
   org-babel-execute-maybe()
   org-babel-execute-safely-maybe()
   run-hook-with-args-until-success(org-babel-execute-safely-maybe)
   org-ctrl-c-ctrl-c(nil)
   ad-Orig-call-interactively(org-ctrl-c-ctrl-c nil nil)
   (with-no-warnings (ad-Orig-call-interactively function record-flag keys))
   (setq ad-return-value (with-no-warnings
 (ad-Orig-call-interactively function record-flag keys)))
   (let ((ido-ubiquitous-next-override
 (ido-ubiquitous-get-command-override function))) (setq ad-return-value
 (with-no-warnings (ad-Orig-call-interactively function record-flag
 keys
   (ido-ubiquitous-with-override (ido-ubiquitous-get-command-override
 function) (setq ad-return-value (with-no-warnings
 (ad-Orig-call-interactively function record-flag keys
   (let (ad-return-value) (ido-ubiquitous-with-override
 (ido-ubiquitous-get-command-override function) (setq ad-return-value
 (with-no-warnings (ad-Orig-call-interactively function record-flag
 keys ad-return-value)
   call-interactively(org-ctrl-c-ctrl-c nil nil)

 Org-mode version 8.2.3b (release_8.2.3b-200-gb6522a @
 /Users/dk/.emacs.d/src/org-mode/lisp/)

 All the best,
 Tom

 Eric Schulte schulte.e...@gmail.com writes:

 Hi Tom,

 Could you provide a minimal example?  I'm unable to debug from the stack
 trace alone.

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] Is it possible to repeat a block of org-mode text on export, maybe with replacement?

2013-11-19 Thread Thorsten Jolitz
Gary Oberbrunner ga...@oberbrunner.com writes:

 I don't know if this is beyond the capabilities of org-mode or not.
  I'd like to have a block of text repeated multiple times with slight
 variations.  For the sake of the example, a numbered list:

 1. this is the first line
 1. this is the second line with %VARIANT% as the value
 1. this is the third line

 When exported, say as ASCII, I'd like this:

 1. this is the first line
 2. this is the second line with foo as the value
 3. this is the third line

 1. this is the first line
 2. this is the second line with bar as the value
 3. this is the third line

 1. this is the first line
 2. this is the second line with baz as the value
 3. this is the third line

 I'm not sure how to go about this; I assume I'd use org-babel with
 source blocks that contain org-mode text or elisp or something.

 Of course if the right answer is I should write a python script to
 generate my org-mode text, well, that's OK too. :-)

Maybe something like this?

#+header: :var lst='(foo bar baz)
#+begin_src emacs-lisp :results raw value :exports results
  (mapconcat
   (lambda (--elem)
 (format 
  (concat
   1. this is The first line\n
   2. this is the second line with %s as the value\n
   3. this is the third line\n)
  --elem))
   lst \n)
#+end_src

#+results:
1. this is The first line
2. this is the second line with foo as the value
3. this is the third line

1. this is The first line
2. this is the second line with bar as the value
3. this is the third line

1. this is The first line
2. this is the second line with baz as the value
3. this is the third line

#+begin_src emacs-lisp :exports none :results raw 
  (org-export-as 'ascii)
#+end_src

#+results:
   _

  506

Thorsten Jolitz
   _


Table of Contents
_

1 --text follows this line--


1 --text follows this line--


  Gary Oberbrunner ga...@oberbrunner.com writes:

   I don't know if this is beyond the capabilities of org-mode or not.
    I'd like to have a block of text repeated multiple times with
   slight variations.  For the sake of the example, a numbered list: 1.
   this is the first line 1. this is the second line with %VARIANT% as
   the value 1. this is the third line When exported, say as ASCII, I'd
   like this: 1. this is the first line 2. this is the second line with
   foo as the value 3. this is the third line 1. this is the first line
   2. this is the second line with bar as the value 3. this is the
   third line 1. this is the first line 2. this is the second line with
   baz as the value 3. this is the third line I'm not sure how to go
   about this; I assume I'd use org-babel with source blocks that
   contain org-mode text or elisp or something. Of course if the right
   answer is I should write a python script to generate my org-mode
   text, well, that's OK too. :-)

  Maybe something like this?

  1. this is The first line
  2. this is the second line with foo as the value
  3. this is the third line

  4. this is The first line
  5. this is the second line with bar as the value
  6. this is the third line

  7. this is The first line
  8. this is the second line with baz as the value
  9. this is the third line

  -- cheers, Thorsten

-- 
cheers,
Thorsten




Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-19 Thread Eric Schulte
Ian Barton li...@wilkesley.net writes:

 On 19/11/13 01:40, Christopher W. Ryan wrote:
 Not sure citational is even a word, but hopefully it conveys my meaning!

 I've been using LaTeX for academic writing and reading for quite some
 time, with emacs as my editor. I'm pretty familiar with managing a .bib
 file containing all the references I've collected, and using it in LaTeX
 \cite commands.

 I've come to org-mode more recently. I'm trying to imagine how I might
 use it to manage my personal library. I have a directory full of pdf
 files, each a downloaded article. Some articles I reference in papers I
 write; others I just read and want to keep.  I also have a .bib file
 where I put the citational material for all those articles. Whenever I
 download an article, I add its entry to my .bib file. I tend to manage
 this with JabRef because it searches Medline so easily, but I also will
 edit the .bib file directly when necessary.

 I like the idea of an org file containing the citational information
 (authors, title, journal, etc)  *plus* links to the pdfs on my hard
 drive, or on the internet. I could also include my notes about the
 articles. But what would that org file look like? How do I insert a
 reference to an article into the org file which contains the article I
 am writing?

 I'd be grateful for any explanations, or links to tutorials.


 Can't help with managing the citations in org, as the last time I had
 to do this I was using a card index file:)

 However, to address your other questions one way of doing this would
 be to create an org file with a heading for each article:

 * Article 1.
 Here are some notes.

 * Article 2
 My notes


I've been using such an org file for most of grad school and I couldn't
be happier with the results.  I have a single reading.org file with one
top-level entry for each article I read.  Currently at 533 articles
(many still tagged TODO) and 16,558 lines.

To create each headline, I first copy the bibtex information onto my
clipboard, then I call `org-bibtex-yank' which converts the bibtex
information into a headline with properties. E.g.,

* Software mutational robustness
  :PROPERTIES:
  :TITLE:Software mutational robustness
  :BTYPE:article
  :CUSTOM_ID: schulte2013software
  :YEAR: 2013
  :ISSN: 1389-2576
  :JOURNAL:  Genetic Programming and Evolvable Machines
  :DOI:  10.1007/s10710-013-9195-8
  :URL:  http://dx.doi.org/10.1007/s10710-013-9195-8
  :PUBLISHER: Springer US
  :KEYWORDS: Mutational robustness; Genetic programming; Mutation testing; 
Proactive diversity; N-version programming; Neutral landscapes
  :AUTHOR:   Schulte, Eric and Fry, ZacharyP. and Fast, Ethan and Weimer, 
Westley and Forrest, Stephanie
  :PAGES:1-32
  :LANGUAGE: English
  :END:
file:papers/10.1007_s10710-013-9195-8.pdf

The arXiv preprint is up at http://arxiv.org/abs/1204.4224.

More notes...


 You can create hyperlinks to each article from org. See
 http://orgmode.org/org.html#Hyperlinks for more detailed information.


This is handy, I start every entry with a hyperlink to the pdf file.


 However, you should perhaps decide first how you might structure your
 org file. You might want to group articles under an author heading, or
 perhaps more likely by subject area, with a sub heading for each
 article under the main heading.


Personally I'm a fan of the flat file organization.  Whenever I want to
find a particular paper I just search for the first string that comes to
mind.


 You may also want to tag each article. See
 http://orgmode.org/org.html#Tags Org lets you quickly narrow your view
 of an org file so that you are only seeing headings with specific
 tags.


This is a good idea.  I've not used tags much previously but it looks
like Org-mode has wonderful tag search functionality.  I wonder if
there's an easy way to automatically include the content of the
:KEYWORDS: property in tag searches.

Best,


 Ian.




-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] Is it possible to repeat a block of org-mode text on export, maybe with replacement?

2013-11-19 Thread Eric Schulte
Gary Oberbrunner ga...@oberbrunner.com writes:

 I don't know if this is beyond the capabilities of org-mode or not.  I'd
 like to have a block of text repeated multiple times with slight
 variations.  For the sake of the example, a numbered list:

 1. this is the first line
 1. this is the second line with %VARIANT% as the value
 1. this is the third line

 When exported, say as ASCII, I'd like this:

 1. this is the first line
 2. this is the second line with foo as the value
 3. this is the third line

 1. this is the first line
 2. this is the second line with bar as the value
 3. this is the third line

 1. this is the first line
 2. this is the second line with baz as the value
 3. this is the third line

 I'm not sure how to go about this; I assume I'd use org-babel with source
 blocks that contain org-mode text or elisp or something.


The following Org-mode file.

#+Title: Example demonstrating repetition of a block of text

* Top

When exported, say as ASCII, I'd like this:

#+call: w/replacement(replacement=foo) :results list
#+call: w/replacement(replacement=bar) :results list
#+call: w/replacement(replacement=baz) :results list

* COMMENT Support

#+name: lines
1. this is the first line
2. this is the second line with %VARIANT% as the value
3. this is the third line

#+name: w/replacement
#+begin_src emacs-lisp :var lines=lines :var replacement=rep :results list
  (mapcar (lambda (line)
(replace-regexp-in-string
 (regexp-quote %VARIANT%) replacement line 'fixedcase))
  lines)
#+end_src

#+RESULTS: w/replacement
- this is the first line
- this is the second line with rep as the value
- this is the third line

exports to the following ASCII

   __

 EXAMPLE DEMONSTRATING REPETITION OF A BLOCK OF
  TEXT
   __


Table of Contents
_

1 Top





1 Top
=

  When exported, say as ASCII, I'd like this:

  - this is the first line
  - this is the second line with foo as the value
  - this is the third line

  - this is the first line
  - this is the second line with bar as the value
  - this is the third line

  - this is the first line
  - this is the second line with baz as the value
  - this is the third line

Cheers,


 Of course if the right answer is I should write a python script to generate
 my org-mode text, well, that's OK too. :-)

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D


Re: [O] Is it possible to repeat a block of org-mode text on export, maybe with replacement?

2013-11-19 Thread Thomas S. Dye
Hi Gary,

I came up with this, which uses example blocks.

#+name: example
#+begin_example
 1. this is the first line
 2. this is the second line with %VARIANT% as the value
 3. this is the third line
#+end_example

#+name: repeated-text
#+header: :results raw
#+header: :var x= 
#+header: :var eg=example
#+begin_src emacs-lisp
  (let ((result))
(setf result (replace-regexp-in-string %VARIANT% x eg t))
result)
#+end_src

#+call: repeated-text(x=foo) :results raw

#+results:
1. this is the first line
 2. this is the second line with foo as the value
 3. this is the third line

#+call: repeated-text(x=bar) :results raw
#+results:
1. this is the first line
 2. this is the second line with bar as the value
 3. this is the third line

#+call: repeated-text(x=baz) :results raw

#+results:
1. this is the first line
 2. this is the second line with baz as the value
 3. this is the third line

All the best,
Tom

Gary Oberbrunner ga...@oberbrunner.com writes:

 I don't know if this is beyond the capabilities of org-mode or not.  I'd
 like to have a block of text repeated multiple times with slight
 variations.  For the sake of the example, a numbered list:

 1. this is the first line
 1. this is the second line with %VARIANT% as the value
 1. this is the third line

 When exported, say as ASCII, I'd like this:

 1. this is the first line
 2. this is the second line with foo as the value
 3. this is the third line

 1. this is the first line
 2. this is the second line with bar as the value
 3. this is the third line

 1. this is the first line
 2. this is the second line with baz as the value
 3. this is the third line

 I'm not sure how to go about this; I assume I'd use org-babel with source
 blocks that contain org-mode text or elisp or something.

 Of course if the right answer is I should write a python script to generate
 my org-mode text, well, that's OK too. :-)

 -- 
 Gary
 I don't know if this is beyond the capabilities of org-mode or not. I'd
 like to have a block of text repeated multiple times with slight
 variations. For the sake of the example, a numbered list:

 1. this is the first line
 1. this is the second line with %VARIANT% as the value
 1. this is the third line

 When exported, say as ASCII, I'd like this:

 1. this is the first line
 2. this is the second line with foo as the value
 3. this is the third line

 1. this is the first line
 2. this is the second line with bar as the value
 3. this is the third line

 1. this is the first line
 2. this is the second line with baz as the value
 3. this is the third line

 I'm not sure how to go about this; I assume I'd use org-babel with
 source blocks that contain org-mode text or elisp or something.

 Of course if the right answer is I should write a python script to
 generate my org-mode text, well, that's OK too. :-)

-- 
Thomas S. Dye
http://www.tsdye.com



[O] [Exporter] Application order of transcode and filter functions?

2013-11-19 Thread Thorsten Jolitz

Hi List, 

when exporting an Org file, is the order in which things happen:

1. transcode all elements
2. filter all elements

or rather

1. transcode and filter one element
2. transcode and filter the next element
3. ...

?

-- 
cheers,
Thorsten





Re: [O] [Exporter] Application order of transcode and filter functions?

2013-11-19 Thread Nicolas Goaziou
Hello,

Thorsten Jolitz tjol...@gmail.com writes:

 when exporting an Org file, is the order in which things happen:

 1. transcode all elements
 2. filter all elements

 or rather

 1. transcode and filter one element
 2. transcode and filter the next element

The latter.


Regards,

-- 
Nicolas Goaziou



Re: [O] Lisp code blocks fail

2013-11-19 Thread Thomas S. Dye
Hi Eric,

No problem with the slow reply. Thanks for the fix, which gets me back
up and running.

All the best,
Tom

Eric Schulte schulte.e...@gmail.com writes:

 Hi Tom,

 Sorry about the slow reply, I've been busy as usual.

 I just pushed up a fix for this problem.  As you've discovered, the
 slime function returns a two-element list holding any strings written to
 STDOUT, and the value of the evaluated code.  In two different places
 org-babel-execute:lisp was trying to split this list into the separate
 values however by the second time the list had been reduced to 2.

 I've just pushed up a fix.

 Best,

 t...@tsdye.com (Thomas S. Dye) writes:

 Hi Eric,

 I understand this a bit better now.

 In org-babel-execute:lisp, the local variable result is getting set to
 ( 2).

 With :results value, the call to read in org-babel-result-cond is being
 passed 2 when it expects a list.  With :results output, it gets ,
 which triggers the same error.

 As I noted earlier, slime-eval executes the lisp code properly, but for
 some reason it appears to be returning a string instead of a vector or a
 list.

 I'm not sure what I did to make this stop working.  It was fine
 a week ago. I haven't changed slime in six months AFAIK.

 Other babel languages work as usual. My problem appears to be confined
 to lisp.

 All the best,
 Tom

 t...@tsdye.com (Thomas S. Dye) writes:

 Hi Eric,

 An edebug adventure :)

 AFAICT, the error is thrown by this call to a macro:
 (org-babel-result-cond (replace) (car result)), where result has been
 set to 2 by the long (funcall) in (let).

 Specifically, (org-babel-lisp-vector-to-list 2) appears to trigger the
 (error)--at least that is the last code line edebug stops at before
 getting to the (error) line. The modeline says Result: 2 just before
 the error.

 Does this help?

 Tom

 Eric Schulte schulte.e...@gmail.com writes:

 Hi Tom,

 That example works for me.  Perhaps you could edebug (C-u C-M-x) the
 `org-babel-execute:lisp' function and then run that code block again to
 see at which statement the error is thrown.

 I'm not sure what the problem could be.

 Best,

 t...@tsdye.com (Thomas S. Dye) writes:

 Hi Eric,

 #+begin_src lisp
 (+ 1 1)
 #+end_src

 Debugger entered--Lisp error: (wrong-type-argument listp 2)
   byte-code(\211A@)\207 [result x] 2)
   org-babel-execute:lisp((+ 1 1) ((:comments . ) (:shebang . )
 (:cache . no) (:padline . ) (:noweb . yes) (:tangle . no)
 (:exports . code) (:results . replace) (:session . none)
 (:hlines . no) (:result-type . value) (:result-params replace)
 (:rowname-names) (:colname-names)))
   org-babel-execute-src-block(nil)
   org-babel-execute-src-block-maybe()
   org-babel-execute-maybe()
   org-babel-execute-safely-maybe()
   run-hook-with-args-until-success(org-babel-execute-safely-maybe)
   org-ctrl-c-ctrl-c(nil)
   ad-Orig-call-interactively(org-ctrl-c-ctrl-c nil nil)
   (with-no-warnings (ad-Orig-call-interactively function record-flag 
 keys))
   (setq ad-return-value (with-no-warnings
 (ad-Orig-call-interactively function record-flag keys)))
   (let ((ido-ubiquitous-next-override
 (ido-ubiquitous-get-command-override function))) (setq ad-return-value
 (with-no-warnings (ad-Orig-call-interactively function record-flag
 keys
   (ido-ubiquitous-with-override (ido-ubiquitous-get-command-override
 function) (setq ad-return-value (with-no-warnings
 (ad-Orig-call-interactively function record-flag keys
   (let (ad-return-value) (ido-ubiquitous-with-override
 (ido-ubiquitous-get-command-override function) (setq ad-return-value
 (with-no-warnings (ad-Orig-call-interactively function record-flag
 keys ad-return-value)
   call-interactively(org-ctrl-c-ctrl-c nil nil)

 Org-mode version 8.2.3b (release_8.2.3b-200-gb6522a @
 /Users/dk/.emacs.d/src/org-mode/lisp/)

 All the best,
 Tom

 Eric Schulte schulte.e...@gmail.com writes:

 Hi Tom,

 Could you provide a minimal example?  I'm unable to debug from the stack
 trace alone.

-- 
T.S. Dye  Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



[O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-19 Thread Sebastien Vauban
Glenn Morris wrote:
 Apparently this is fixed:

 http://lists.gnu.org/archive/html/emacs-orgmode/2013-11/msg00682.html

Sadly, it's only partially fixed: if it is WELL fixed for the original code,
the problem comes BACK with the following minimized Emacs file:

--8---cut here---start-8---
(add-to-list 'load-path ~/Public/Repositories/org-mode/testing)
(add-to-list 'load-path ~/Public/Repositories/org-mode/contrib/lisp)
(add-to-list 'load-path ~/Public/Repositories/org-mode/lisp)

;; getting started
(require 'org-loaddefs)
(add-to-list 'auto-mode-alist '(\\.txt\\' . org-mode))
(add-to-list 'auto-mode-alist '(\\.org\\' . org-mode))

(with-eval-after-load ob-lob
  ;; load some code blocks into the library of Babel
  (let ((lob-file (concat (file-name-directory (locate-library org))
  ../doc/library-of-babel.org)))
(when (file-exists-p lob-file)
  (org-babel-lob-ingest lob-file

(with-eval-after-load org
  (message Eval this when Org is loaded)
  (sit-for 3)
  (message ))

(message End of minimal .emacs)
--8---cut here---end---8---

FYI, I just added the lines 10-15 (expression with `ob-lob').

That's only reproducible with a development branch of Org mode, as
library-of-babel.org is not copied into the official Emacs release.

Best regards,
  Seb

-- 
Sebastien Vauban





Re: [O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-19 Thread Sebastien Vauban
Josh wrote:
 On Wed, Nov 13, 2013 at 1:27 PM, Sebastien Vauban wrote:

 (with-eval-after-load org
   (message Eval this when Org is loaded)
   (sit-for 3)
   (message ))

 the code block in the `with-eval-after-load' is eval'ed twice whenever an Org
 file is loaded.

 Have you checked to see what happens if you specify 'org (a symbol
 designating a feature) rather than org (a string representing a
 file name) above?

Yes, same problem with 'org, as shown with the following ECM.

--8---cut here---start-8---
(add-to-list 'load-path ~/Public/Repositories/org-mode/testing)
(add-to-list 'load-path ~/Public/Repositories/org-mode/contrib/lisp)
(add-to-list 'load-path ~/Public/Repositories/org-mode/lisp)

;; getting started
(require 'org-loaddefs)
(add-to-list 'auto-mode-alist '(\\.txt\\' . org-mode))
(add-to-list 'auto-mode-alist '(\\.org\\' . org-mode))

(with-eval-after-load 'ob-lob
  ;; load some code blocks into the library of Babel
  (let ((lob-file (concat (file-name-directory (locate-library org))
  ../doc/library-of-babel.org)))
(when (file-exists-p lob-file)
  (org-babel-lob-ingest lob-file

(with-eval-after-load 'org
  (message Eval this when Org is loaded)
  (sit-for 3)
  (message ))

(message End of minimal .emacs)
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




[O] Refresh buffer properties and local variables

2013-11-19 Thread Thomas S. Dye
Aloha all,

I just discovered that refreshing buffer properties, C-c C-c at the top
of my Org mode file, resets Local Variables to their default values (I
think). At any rate, the Local Variables I set at the end of the file
are changed by refreshing buffer properties.

Is this intended? 

I end up running M-x normal-mode afterwards, which is sometimes
difficult to remember.

All the best,
Tom

-- 
T.S. Dye  Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com



Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-19 Thread Alan L Tyree

On 20/11/13 03:25, Eric Schulte wrote:

Ian Barton li...@wilkesley.net writes:


On 19/11/13 01:40, Christopher W. Ryan wrote:

Not sure citational is even a word, but hopefully it conveys my meaning!

I've been using LaTeX for academic writing and reading for quite some
time, with emacs as my editor. I'm pretty familiar with managing a .bib
file containing all the references I've collected, and using it in LaTeX
\cite commands.

I've come to org-mode more recently. I'm trying to imagine how I might
use it to manage my personal library. I have a directory full of pdf
files, each a downloaded article. Some articles I reference in papers I
write; others I just read and want to keep.  I also have a .bib file
where I put the citational material for all those articles. Whenever I
download an article, I add its entry to my .bib file. I tend to manage
this with JabRef because it searches Medline so easily, but I also will
edit the .bib file directly when necessary.

I like the idea of an org file containing the citational information
(authors, title, journal, etc)  *plus* links to the pdfs on my hard
drive, or on the internet. I could also include my notes about the
articles. But what would that org file look like? How do I insert a
reference to an article into the org file which contains the article I
am writing?

I'd be grateful for any explanations, or links to tutorials.


Can't help with managing the citations in org, as the last time I had
to do this I was using a card index file:)

However, to address your other questions one way of doing this would
be to create an org file with a heading for each article:

* Article 1.
Here are some notes.

* Article 2
My notes


I've been using such an org file for most of grad school and I couldn't
be happier with the results.  I have a single reading.org file with one
top-level entry for each article I read.  Currently at 533 articles
(many still tagged TODO) and 16,558 lines.

To create each headline, I first copy the bibtex information onto my
clipboard, then I call `org-bibtex-yank' which converts the bibtex
information into a headline with properties. E.g.,

 * Software mutational robustness
   :PROPERTIES:
   :TITLE:Software mutational robustness
   :BTYPE:article
   :CUSTOM_ID: schulte2013software
   :YEAR: 2013
   :ISSN: 1389-2576
   :JOURNAL:  Genetic Programming and Evolvable Machines
   :DOI:  10.1007/s10710-013-9195-8
   :URL:  http://dx.doi.org/10.1007/s10710-013-9195-8
   :PUBLISHER: Springer US
   :KEYWORDS: Mutational robustness; Genetic programming; Mutation testing; 
Proactive diversity; N-version programming; Neutral landscapes
   :AUTHOR:   Schulte, Eric and Fry, ZacharyP. and Fast, Ethan and Weimer, 
Westley and Forrest, Stephanie
   :PAGES:1-32
   :LANGUAGE: English
   :END:
 file:papers/10.1007_s10710-013-9195-8.pdf

 The arXiv preprint is up at http://arxiv.org/abs/1204.4224.

 More notes...



Is there some easy way to import entire bibtex files in this way?

I find citations to be frustrating. Is there some way that bibtex (or 
org files such as the above) can be used to enter citations in an org 
file so that they are exported correctly by the different exporters?


Or is there someplace where all this information is gathered and I just 
am too blind to see it?


Thanks for any help.
Alan

SNIP

--
Alan L Tyreehttp://www2.austlii.edu.au/~alan
Tel:  04 2748 6206  sip:typh...@iptel.org




Re: [O] how to make relative file links?

2013-11-19 Thread Samuel Wales
I find that capture creates an absolute file link regardless of the variable.

On 11/6/13, David Belohrad da...@belohrad.ch wrote:
 | org-link-file-path-type is a variable defined in `org.el'.
 | Its value is adaptive



Re: [O] Refresh buffer properties and local variables

2013-11-19 Thread Nick Dokos
t...@tsdye.com (Thomas S. Dye) writes:

 Aloha all,

 I just discovered that refreshing buffer properties, C-c C-c at the top
 of my Org mode file, resets Local Variables to their default values (I
 think). At any rate, the Local Variables I set at the end of the file
 are changed by refreshing buffer properties.


Indeed: by the time org-mode is called, the variables have been
forgotten.

 Is this intended? 


I doubt it.

 I end up running M-x normal-mode afterwards, which is sometimes
 difficult to remember.

Looking at what normal-mode does, I came up with the following hack.
Does it fix things for you?

--8---cut here---start-8---
diff --git a/lisp/org.el b/lisp/org.el
index febee75..caf0348 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5512,7 +5512,8 @@ The following commands are available:
  (unless org-inhibit-startup-visibility-stuff
(org-set-startup-visibility
   ;; Try to set org-hide correctly
-  (set-face-foreground 'org-hide (org-find-invisible-foreground)))
+  (set-face-foreground 'org-hide (org-find-invisible-foreground))
+  (hack-local-variables))
 
 ;; Update `customize-package-emacs-version-alist'
 (add-to-list 'customize-package-emacs-version-alist
--8---cut here---end---8---

-- 
Nick




Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-19 Thread Eric Schulte
Alan L Tyree alanty...@gmail.com writes:

 On 20/11/13 03:25, Eric Schulte wrote:
 Ian Barton li...@wilkesley.net writes:

 On 19/11/13 01:40, Christopher W. Ryan wrote:
 Not sure citational is even a word, but hopefully it conveys my meaning!

 I've been using LaTeX for academic writing and reading for quite some
 time, with emacs as my editor. I'm pretty familiar with managing a .bib
 file containing all the references I've collected, and using it in LaTeX
 \cite commands.

 I've come to org-mode more recently. I'm trying to imagine how I might
 use it to manage my personal library. I have a directory full of pdf
 files, each a downloaded article. Some articles I reference in papers I
 write; others I just read and want to keep.  I also have a .bib file
 where I put the citational material for all those articles. Whenever I
 download an article, I add its entry to my .bib file. I tend to manage
 this with JabRef because it searches Medline so easily, but I also will
 edit the .bib file directly when necessary.

 I like the idea of an org file containing the citational information
 (authors, title, journal, etc)  *plus* links to the pdfs on my hard
 drive, or on the internet. I could also include my notes about the
 articles. But what would that org file look like? How do I insert a
 reference to an article into the org file which contains the article I
 am writing?

 I'd be grateful for any explanations, or links to tutorials.

 Can't help with managing the citations in org, as the last time I had
 to do this I was using a card index file:)

 However, to address your other questions one way of doing this would
 be to create an org file with a heading for each article:

 * Article 1.
 Here are some notes.

 * Article 2
 My notes

 I've been using such an org file for most of grad school and I couldn't
 be happier with the results.  I have a single reading.org file with one
 top-level entry for each article I read.  Currently at 533 articles
 (many still tagged TODO) and 16,558 lines.

 To create each headline, I first copy the bibtex information onto my
 clipboard, then I call `org-bibtex-yank' which converts the bibtex
 information into a headline with properties. E.g.,

  * Software mutational robustness
:PROPERTIES:
:TITLE:Software mutational robustness
:BTYPE:article
:CUSTOM_ID: schulte2013software
:YEAR: 2013
:ISSN: 1389-2576
:JOURNAL:  Genetic Programming and Evolvable Machines
:DOI:  10.1007/s10710-013-9195-8
:URL:  http://dx.doi.org/10.1007/s10710-013-9195-8
:PUBLISHER: Springer US
:KEYWORDS: Mutational robustness; Genetic programming; Mutation 
 testing; Proactive diversity; N-version programming; Neutral landscapes
:AUTHOR:   Schulte, Eric and Fry, ZacharyP. and Fast, Ethan and 
 Weimer, Westley and Forrest, Stephanie
:PAGES:1-32
:LANGUAGE: English
:END:
  file:papers/10.1007_s10710-013-9195-8.pdf

  The arXiv preprint is up at http://arxiv.org/abs/1204.4224.

  More notes...


 Is there some easy way to import entire bibtex files in this way?


org-bibtex-import-from-file


 I find citations to be frustrating. Is there some way that bibtex (or
 org files such as the above) can be used to enter citations in an org
 file so that they are exported correctly by the different exporters?

 Or is there someplace where all this information is gathered and I
 just am too blind to see it?


I don't know, I personally use org-bibtex-export-to-kill-ring to convert
citations to bibtex individually and manually.


 Thanks for any help.
 Alan

 SNIP

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] how to make relative file links?

2013-11-19 Thread Nick Dokos
Samuel Wales samolog...@gmail.com writes:

 I find that capture creates an absolute file link regardless of the variable.


That's correct: the variable is only used by org-insert-link. Capture
uses org-store-link which stores an absolute link.

Since you can initiate a capture from an arbitrary location in the file
system and store the capture in some other arbitrary location, it would
be a bit more difficult to use anything but absolute links (and things
like symbolic links might make it quite a bit more difficult). It
probably could be done, but I'm not sure it's worth it.

 On 11/6/13, David Belohrad da...@belohrad.ch wrote:
 | org-link-file-path-type is a variable defined in `org.el'.
 | Its value is adaptive



-- 
Nick




Re: [O] bug#15888: 24.3.50; Eval-after-load eval'ed twice

2013-11-19 Thread Nick Dokos
Sebastien Vauban sva-n...@mygooglest.com
writes:

 Glenn Morris wrote:
 Apparently this is fixed:

 http://lists.gnu.org/archive/html/emacs-orgmode/2013-11/msg00682.html

 Sadly, it's only partially fixed: if it is WELL fixed for the original code,
 the problem comes BACK with the following minimized Emacs file:

 (add-to-list 'load-path ~/Public/Repositories/org-mode/testing)
 (add-to-list 'load-path ~/Public/Repositories/org-mode/contrib/lisp)
 (add-to-list 'load-path ~/Public/Repositories/org-mode/lisp)

 ;; getting started
 (require 'org-loaddefs)
 (add-to-list 'auto-mode-alist '(\\.txt\\' . org-mode))
 (add-to-list 'auto-mode-alist '(\\.org\\' . org-mode))

 (with-eval-after-load ob-lob
   ;; load some code blocks into the library of Babel
   (let ((lob-file (concat (file-name-directory (locate-library org))
   ../doc/library-of-babel.org)))
 (when (file-exists-p lob-file)
   (org-babel-lob-ingest lob-file

 (with-eval-after-load org
   (message Eval this when Org is loaded)
   (sit-for 3)
   (message ))

 (message End of minimal .emacs)

 FYI, I just added the lines 10-15 (expression with `ob-lob').

 That's only reproducible with a development branch of Org mode, as
 library-of-babel.org is not copied into the official Emacs release.


Well, Nicolas warned us that we are not out of the woods yet. I repeated
the previous exercise, this time with the following file:

--8---cut here---start-8---
(add-to-list 'load-path (expand-file-name ~/src/emacs/org/org-mode/lisp))
(add-to-list 'load-path (expand-file-name 
~/src/emacs/org/org-mode/contrib/lisp))

(add-to-list 'auto-mode-alist '(\\.\\(org\\|org_archive\\|txt\\)$ . org-mode))

(require 'org-loaddefs)

(with-eval-after-load ob-lob
  ;; load some code blocks into the library of Babel
  (let ((lob-file (concat (file-name-directory (locate-library org))
  ../doc/library-of-babel.org)))
(when (file-exists-p lob-file)
  (org-babel-lob-ingest lob-file

(defun foobar ()
  (message LOADED) (sit-for 3) (message ))

(setq org-load-hook (function foobar))
--8---cut here---end---8---

started emacs with

  emacs -Q -l ./double-load.el

edebugged foobar and C-x C-f foo.org. It stopped at foobar twice
and I got the following backtraces at the two stopping points.

The first backtrace looks like this:

--8---cut here---start-8---
  foobar()
  run-hooks(org-load-hook)
  eval-buffer(#buffer  *load*-648596 nil 
/home/nick/src/emacs/org/org-mode/lisp/org.el nil t)
  load-with-code-conversion(/home/nick/src/emacs/org/org-mode/lisp/org.el 
/home/nick/src/emacs/org/org-mode/lisp/org.el nil t)
  org-mode()
  set-auto-mode-0(org-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#buffer library-of-babel.org 
~/src/emacs/org/org-mode/doc/library-of-babel.org nil nil 
~/src/emacs/org/org-mode/doc/library-of-babel.org (16393680 2097))
  
find-file-noselect(/home/nick/src/emacs/org/org-mode/lisp/../doc/library-of-babel.org
 nil nil nil)
  
find-file(/home/nick/src/emacs/org/org-mode/lisp/../doc/library-of-babel.org)
  (progn (find-file file))
  (if file (progn (find-file file)))
  (progn (if file (progn (find-file file))) (setq to-be-removed 
(current-buffer)) (goto-char (point-min)) (while (re-search-forward 
org-babel-src-block-regexp nil t) (if (org-babel-active-location-p) (progn 
(goto-char (match-beginning 0)) (let ((full-block (match-string 0)) (beg-block 
(match-beginning 0)) (end-block (match-end 0)) (lang (match-string 2)) 
(beg-lang (match-beginning 2)) (end-lang (match-end 2)) (switches (match-string 
3)) (beg-switches (match-beginning 3)) (end-switches (match-end 3)) 
(header-args (match-string 4)) (beg-header-args (match-beginning 4)) 
(end-header-args (match-end 4)) (body (match-string 5)) (beg-body 
(match-beginning 5)) (end-body (match-end 5))) (let* ((info ...) (source-name 
...)) (if source-name (progn ...))) (goto-char end-block))
  (unwind-protect (progn (if file (progn (find-file file))) (setq to-be-removed 
(current-buffer)) (goto-char (point-min)) (while (re-search-forward 
org-babel-src-block-regexp nil t) (if (org-babel-active-location-p) (progn 
(goto-char (match-beginning 0)) (let ((full-block ...) (beg-block ...) 
(end-block ...) (lang ...) (beg-lang ...) (end-lang ...) (switches ...) 
(beg-switches ...) (end-switches ...) (header-args ...) (beg-header-args ...) 
(end-header-args ...) (body ...) (beg-body ...) (end-body ...)) (let* (... ...) 
(if source-name ...)) (goto-char end-block)) (set-window-configuration 
wconfig))
  (let ((wconfig (current-window-configuration))) (unwind-protect (progn (if 
file (progn (find-file file))) (setq to-be-removed (current-buffer)) (goto-char 
(point-min)) (while (re-search-forward org-babel-src-block-regexp nil t) (if 
(org-babel-active-location-p) (progn (goto-char (match-beginning 0)) 

Re: [O] how to make relative file links?

2013-11-19 Thread Samuel Wales
Actually, I wanted a link to a headline in the same file.

On 11/19/13, Nick Dokos ndo...@gmail.com wrote:
 Samuel Wales samolog...@gmail.com writes:

 I find that capture creates an absolute file link regardless of the
 variable.


 That's correct: the variable is only used by org-insert-link. Capture
 uses org-store-link which stores an absolute link.

 Since you can initiate a capture from an arbitrary location in the file
 system and store the capture in some other arbitrary location, it would
 be a bit more difficult to use anything but absolute links (and things
 like symbolic links might make it quite a bit more difficult). It
 probably could be done, but I'm not sure it's worth it.

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY can get it.

Denmark: free Karina Hansen NOW.



[O] How to publish a whole website resource with org-publish, and how to set :components () ?

2013-11-19 Thread chris
1. What I want to do:

I want to publish *all* my resources(which I choose) to public.
It means any filetype files under the :base-directory.
And I hope my org file inline source code, babel, inline images etc can be
displayed correctly. Anyway, just like a normal website. (This sentence is not a
good description, but it is my purpose)

Here is what I set.

#+BEGIN_SRC emacs-lisp
(setq org-publish-project-alist
  '((Blog
 :base-directory ~/Org/Diary/Public
 :recursive t
 )
(Wiki
 :base-directory ~/Org/Wiki
 :base-extension 'any
 ;; :exclude
 ;; :include
 :recursive t
 )
;; (Gallery
;;  ;; TODO :base-directory ~/Org/
;;  :recursive t
;;  )
(Website
 :components (Blog Gallery)
 ;; TODO can I set those variable at here for all of above publishings ?
 :publishing-directory ~/WWW/Org-publish
 :publishing-function org-html-publish-to-html
 :htmlized-source t
 :section-number t
 ;; :language
 ;;; [ author ]
 :with-author stardiviner
 :with-email numbch...@gmail.com
 :with-footnotes Get over the world!
 ;; :with-latex
 :with-sub-superscript t
 :with-tables t
 :with-tags t
 ;;; [ tasks ]
 ;; :with-tasks t
 ;; :with-planning
 :with-todo-keywords
 ;; :with-priority
 :with-timestamps t
 ;; :with-toc
 ;;; [ html ]
 :html-doctype html5
 :html-xml-declaration t
 ;;; [ sitemap ]
 :auto-sitemap t
 ;; When non-nil, remove filenames' extensions from the generated 
sitemap. Useful to have cool URIs.
 :sitemap-sans-extension t
 ;;; [ index ]
 :makeindex t
 )
)
  )
#+END_SRC

2. Question one:
Can I set some properties in the *meta-project* (which has :components) ?

3. Question two:
I feel my setting is not good. Does anyone have a good template for my situation
to let me reference?

I have checked out http://orgmode.org documentation, and it's example.


-- 
[ stardiviner ] Kill the world if you want. That's it.
IRC(freenode): stardiviner \\ Twitter:  @numbchild \\


signature.asc
Description: Digital signature


[O] How to get notify from Org-mode's clock, timestamps, and appointments etc with in modeline or with notify-send etc programs ?

2013-11-19 Thread chris
I want to good way to notify me about Org-mode's clock, timestamps, effort
estimates and appointments etc with in Emacs's modeline or with notify programs
like notify-send.  And I hope this notify solution also can work for calendar
events, new email's arrival, and IRC notification.

(I know maybe there is no this ready-made solution)

I know that Org-mode has a library called `org-clock` has a function
`org-notify' can notify with program *notify-send*.

I hope you can suggest some solutions, and provide some more details about your
solution too. (Thanks in advanced)

-- 
[ stardiviner ] Kill the world if you want. That's it.
IRC(freenode): stardiviner \\ Twitter:  @numbchild \\


signature.asc
Description: Digital signature


Re: [O] managing articles in my personal library, and their citational material, using org mode instead of bibtex

2013-11-19 Thread Alan L Tyree

On 20/11/13 14:37, Eric Schulte wrote:

Alan L Tyree alanty...@gmail.com writes:


On 20/11/13 03:25, Eric Schulte wrote:

Ian Barton li...@wilkesley.net writes:


On 19/11/13 01:40, Christopher W. Ryan wrote:

Not sure citational is even a word, but hopefully it conveys my meaning!

I've been using LaTeX for academic writing and reading for quite some
time, with emacs as my editor. I'm pretty familiar with managing a .bib
file containing all the references I've collected, and using it in LaTeX
\cite commands.

I've come to org-mode more recently. I'm trying to imagine how I might
use it to manage my personal library. I have a directory full of pdf
files, each a downloaded article. Some articles I reference in papers I
write; others I just read and want to keep.  I also have a .bib file
where I put the citational material for all those articles. Whenever I
download an article, I add its entry to my .bib file. I tend to manage
this with JabRef because it searches Medline so easily, but I also will
edit the .bib file directly when necessary.

I like the idea of an org file containing the citational information
(authors, title, journal, etc)  *plus* links to the pdfs on my hard
drive, or on the internet. I could also include my notes about the
articles. But what would that org file look like? How do I insert a
reference to an article into the org file which contains the article I
am writing?

I'd be grateful for any explanations, or links to tutorials.


Can't help with managing the citations in org, as the last time I had
to do this I was using a card index file:)

However, to address your other questions one way of doing this would
be to create an org file with a heading for each article:

* Article 1.
Here are some notes.

* Article 2
My notes


I've been using such an org file for most of grad school and I couldn't
be happier with the results.  I have a single reading.org file with one
top-level entry for each article I read.  Currently at 533 articles
(many still tagged TODO) and 16,558 lines.

To create each headline, I first copy the bibtex information onto my
clipboard, then I call `org-bibtex-yank' which converts the bibtex
information into a headline with properties. E.g.,

  * Software mutational robustness
:PROPERTIES:
:TITLE:Software mutational robustness
:BTYPE:article
:CUSTOM_ID: schulte2013software
:YEAR: 2013
:ISSN: 1389-2576
:JOURNAL:  Genetic Programming and Evolvable Machines
:DOI:  10.1007/s10710-013-9195-8
:URL:  http://dx.doi.org/10.1007/s10710-013-9195-8
:PUBLISHER: Springer US
:KEYWORDS: Mutational robustness; Genetic programming; Mutation 
testing; Proactive diversity; N-version programming; Neutral landscapes
:AUTHOR:   Schulte, Eric and Fry, ZacharyP. and Fast, Ethan and Weimer, 
Westley and Forrest, Stephanie
:PAGES:1-32
:LANGUAGE: English
:END:
  file:papers/10.1007_s10710-013-9195-8.pdf

  The arXiv preprint is up at http://arxiv.org/abs/1204.4224.

  More notes...


Is there some easy way to import entire bibtex files in this way?


org-bibtex-import-from-file


I find citations to be frustrating. Is there some way that bibtex (or
org files such as the above) can be used to enter citations in an org
file so that they are exported correctly by the different exporters?

Or is there someplace where all this information is gathered and I
just am too blind to see it?


I don't know, I personally use org-bibtex-export-to-kill-ring to convert
citations to bibtex individually and manually.
I think I have a terminology problem. What I mean is to enter something 
like \cite{mann82} in the text and have it spit out (Mann 1982) in each 
and every export as well as constructing an entry for the bibliography.


Of course, the actual form of the output should be configurable to some 
extent, but I'd be happy with one form that always comes out the same.


Is that possible? I'm currently fudging the issue by entering a Markdown 
style entry in the text, for example [@mann82:_legal_aspec_money], 
exporting to Markdown and then using Pandoc to get the final result.


Not elegant.

Cheers,
Alan


Thanks for any help.
Alan

SNIP



--
Alan L Tyreehttp://www2.austlii.edu.au/~alan
Tel:  04 2748 6206  sip:typh...@iptel.org




[O] ob-python session output

2013-11-19 Thread Kyle Meyer
Hello,

I've been having some issues with the output of babel python session
blocks. They do not seem to be properly processing python shell
characters and leading spaces in the output.

For the examples that follow, the only user configuration is the loading
of python.

#+BEGIN_SRC elisp :results none
  (org-babel-do-load-languages
   'org-babel-load-languages
   '((python . t)))
#+END_SRC

When the session is first started up, python shell character ('' and
'...') make it into the output.

#+BEGIN_SRC python :session :results output
  for i in range(2):
  print(i)
#+END_SRC

#+RESULTS:
:
:... ... 0
: 1

When ran a second time, only '...' remains.

#+BEGIN_SRC python :session :results output
  for i in range(2):
  print(i)
#+END_SRC

#+RESULTS:
:
: ... 0
: 1

The other issue I'm seeing is that leading spaces in the output are
being discarded.

#+BEGIN_SRC python :session :results output
  print(' one leading space')
#+END_SRC

#+RESULTS:
: one leading space

#+BEGIN_SRC python :session :results output
  print(' many leading spaces')
#+END_SRC

#+RESULTS:
: many leading spaces

I've made the following changes for a quick fix. It's ugly and certainly
not a proper solution, but it seems to take care of all the above cases
except for the one leading space.

---
 lisp/ob-python.el | 22 +-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index 3c3f664..5cda5d6 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -307,7 +307,8 @@ last statement in BODY, as elisp.
   (case result-type
 (output
  (mapconcat
-  #'org-babel-trim
+ #'(lambda (string) (org-babel-chomp
+ (org-babel-python-leading-chomp string)))
   (butlast
(org-babel-comint-with-output
(session org-babel-python-eoe-indicator t body)
@@ -339,6 +340,25 @@ last statement in BODY, as elisp.
   (match-string 1 string)
 string))

+(defun org-babel-python-leading-chomp (string)
+  Strip the leading python output characters from STRING
+
+This is different from `org-babel-chomp' (where '' and '.' are
+added to the regex) because it considers a bit more of the
+context. If only single characters are matched against, then
+meaningful spaces are often deleted from the output. However, if
+spaces are not trimmed at all, extra spaces creep into the
+output (particularly when the output source line is indented). To
+get around this, only leading spaces that are followed by a
+non-space character are deleted. This completely fails on cases
+where the intended output acutally has one space before non-space
+character.
+  (let ((regexp  *+\\|\\( \\)*\\.+\\| \\w ))
+(while (and (/= (length string) 0)
+(eq (string-match regexp string) 0))
+  (setq string (substring string 1)))
+string))
+
 (provide 'ob-python)


--
1.8.4.2

I'm using the following versions of emacs and org mode.

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

#+RESULTS:
: GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.2)
:  of 2013-08-06 on -mnt-storage-buildroots-staging-x86_64-eric

#+BEGIN_SRC elisp
  (org-version nil t)
#+END_SRC

#+RESULTS:
: Org-mode version 8.2.3c (release_8.2.3c-251-gbb97f5 @ 
/home/kyle/src/emacs/org-mode/lisp/)

Thanks

--
Kyle Meyer