Re: [O] Extract document structure from Org file

2015-07-04 Thread John Kitchin
I worked out a new version of the swish-e org indexer that indexes
custom xml representing the org file that you may find interesting for
your project.

http://kitchingroup.cheme.cmu.edu/blog/2015/07/04/An-xml-representation-of-an-org-document-for-indexing-with-swish-e/

It enables a search like this:

swish-e -f index-org2xml.swish-e -w src-block.language=python -w 
src-block=diffusion

to find org files with a python source block containing the word
diffusion.

I think swish-e supports ranking
(http://swish-e.org/docs/swish-faq.html#how_is_ranking_calculated_) too,
but I have not tried it.

It is pretty interesting overall!



Oleg Sivokon writes:

 John Kitchin jkitc...@andrew.cmu.edu writes:

 You would use org-element.  Try org-element-parse-buffer and
 org-element-map and maybe org-element-interpret-data.  There's also a
 bunch of regexp for identifying/finding particular types of elements.

 Thanks! I'm already looking into it.

 That sounds really cool. I recently hacked a swish-e index of my org
 files (there might have been 3000+!)
 http://kitchingroup.cheme.cmu.edu/blog/2015/06/25/Integrating-swish-e-and-Emacs/.
 and

 I just updated it to index the html version of an org-file so that I
 take advantage of the structure in the
 search. 
 http://kitchingroup.cheme.cmu.edu/blog/2015/07/03/Using-swish-e-to-index-org-files-as-html/.
  It
 would be cool to have more granular searching though.

 Is your info project visible
 anywhere? i can imagine a close-file hook function that updates the
 database automatically.

 Whoa, that's a lot of Org files :) What I wrote so far is on Github, but
 it's in a very early stage, so it's not something you could just drop
 into your Emacs directory and start using right away.
 https://github.com/wvxvw/sphinx-mode
 I've also looked into Swish some time ago.  I also thought about using
 Nepomuk, but, in the later case, I've to admit, I didn't make it through
 the documentation.

 The difference in using Sphinx is that it has ranking, and it has a
 relatively terse way of specifying searching criteria.  For example, you
 could ask to search for some words in this phrase/3 and it would look
 for occurances of 3 of 5 words given between the quotes.  Or, you could
 ask it to search for @node R @contents printf format, and this
 would search for node titles mentioning R and having contents with
 words printf and format.
 I've to admit I didn't master it fully (there are far more options and
 settings) but it does something that seems reasonable (if I compare it
 to M-x info-apropos).

 I'm also still trying to learn what's the best way to do indenxing, so
 the project is still very raw, but I'll get there one day :)

 The ultimate goal is also to write a more human-friendly interface to
 Sphinx, where one could ask questions in a subset of natural language :)
 (but that's a very long way into the future!)

 PS. I see that many posts on this list are titled with [O].  What does
 it mean, should I do that too?

 Best.

 Oleg

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

2015-07-04 Thread Charles Millar



On 07/04/2015 10:56 AM, Alan wrote:

Function orgtbl-setup (in lisp/org/org-table.el.gz, where my Emacs is GNU Emacs 24.5.1 
(x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org) has a number of key 
bindings that seem to get defined in minor mode orgtbl-mode, but don't get defined when using Org (as in 
editing a file that has extension .org).

My first use of Org was in creating a table of information.  I used the Org Mode Manual (Info node 
org on my distribution) as a guide.  In node (org) Built-in table editor some of 
these missing keymap definitions are listed.  The one of interest to me was 
org-table-insert-column.  I didn't find it bound to any key and wondered why isn't it bound.

So, my question is why isn't e.g. org-table-insert-colunn bound to a key when using 
Org?  And why does the Info manual suggest that such a key binding exists, without qualification?  
That function (and others) can be found in a keymap--as described above--but that binding seems to 
be reserved for minor mode orgtbl-mode (invoking that mode when in Org is not allowed).


Is this what you are looking for

shift-alt-rightarrrow

to insert column?

likewise shift-alt-leftarrow removes a column

Also org has a list

emacs-orgmode@gnu.org



[O] notes in org-mode export to beamer

2015-07-04 Thread Vicente
 Is it possible to have additional notes --references, explanations, 
quotations, etc-- outside the frame in an org-mode presentation and keep them 
in exports? Actually I'm thinking more of a handout than a strict beamer 
export. Graphically, I'd like to show the frames as images and the notes as 
text below them. 
  

Re: [O] [PATCH] org-contacts.el: Catch 'nextfile in org-contacts-db

2015-07-04 Thread phcrama . ebiz

Hi Greg,



thank you for your remarks.




I agree with all of them but like the idea that theres one central point checking what a valid org agenda file is (even if for now only the file existence is checked). So let me propose a different patch (attached).



Best regards,

--

Philippe Crama



0001-Refactor-org-check-agenda-file-to-use-only-its-inter.patch
Description: Binary data


[O] patch to add org-table-previous-row to org-table

2015-07-04 Thread prayner
I am working with the accessibility system emacspeak to improve
eyes-free access to org-mode tables. Most of this can be done outside
the org-mode tree by advising existing functions but I've run into a
need for a new function. I need org-table-previous-row analogous to
org-table-next-row. Below is a patch to add this. The behaviour is
almost identical to org-table-next-row except that
org-table-previous-row in the first row of the table is a no-op.
Please consider adding this to the repository. Comments and
corrections welcome but please send them to me directly as well as the
list.
regards
Peter

--
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 8a6e22b..f17d84d 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -1092,6 +1092,30 @@ Before doing so, re-align the table if necessary.
   (if (looking-at  ) (forward-char 1)
 
 ;;;###autoload
+(defun org-table-previous-row ()
+  Go to the previous row (same column) in the current table.
+Before doing so, re-align the table if necessary.
+  (interactive)
+  (org-table-maybe-eval-formula)
+  (org-table-maybe-recalculate-line)
+  (if (or (looking-at [ \t]*$)
+ (save-excursion (skip-chars-backward  \t) (bolp)))
+  (newline)
+(if (and org-table-automatic-realign
+org-table-may-need-update)
+   (org-table-align))
+(let ((col (org-table-current-column)))
+  (beginning-of-line 0)
+  (if (or (not (org-at-table-p))
+ (org-at-table-hline-p))
+ (progn
+   (beginning-of-line 1)))
+  (org-table-goto-column col)
+  (skip-chars-backward ^|\n\r)
+  (if (looking-at  ) (forward-char 1)
+
+
+;;;###autoload
 (defun org-table-copy-down (n)
   Copy the value of the current field one row below.
-- 
 


-- 
Peter Rayner
Leader, Clean Air and Urban Landscapes NESP hub.
room 343 
School of Earth Sciences, University of Melbourne, 3010, Vic, Australia
tel: work: +61 (0)3 8344 9708; fax: +61 (0)3 8344 7761 
mobile +61 402 752 379, skype: petermorag 
mail-to: pray...@unimelb.edu.au
google scholar profile 
http://scholar.google.com.au/citations?user=H3up71wJhl=en



Re: [O] Structuring and (cross)linking information in org-mode

2015-07-04 Thread Haider Rizvi
Pascal Fleury pas...@telefleuries.com writes:

 I think properties can be used for this. 

I use a yasnippet for writing down my meeting minutes, that also
creates some properties. Daniel may find it useful.

# -*- mode: snippet -*-
# name : mtgmins
# key : mtgmins
# contributor: Haider Rizvi
# --
`(org-insert-heading nil)`[`(format-time-string %Y-%m-%d %a (current-time))`] 
${1:Meeting title}
Attendees: Haider, ${2:Attendees}
`(org-set-property STYLE Meeting minutes)` `(org-set-property STARTED 
(format-time-string [%Y-%m-%d %H:%M:%S] (current-time)))`


- Haider




Re: [O] Unable to reuse the result of a cached function call as argument of a gnuplot call

2015-07-04 Thread Nicolas Goaziou
Hello,

bernardH org-m...@bernard-hugueney.org writes:

 Now a cached call.

 #+name: my-call-cached
 #+call: fun[:results table](nb=5) :cache yes 

 #+RESULTS[f2b650eb5296f72a1f7237c2a65b7fb3443acf5f]: my-call-cached
 | 1 |  2 |
 | 3 |  4 |
 | 5 |  6 |
 | 7 |  8 |
 | 9 | 10 |

[...]

 But if I try to use the cached call :

 #+name: plot-result-cached
 #+call: plotting[:file result-call-cached.png](data= my-call-cached) :results 
 file

Why can't you simply use the (cached) results of my-call instead of the
call itself, e.g.:


  #+name: my-call-cached
  #+call: fun[:results table](nb=5) :cache yes 

  #+name: my-cached-results
  #+RESULTS[f2b650eb5296f72a1f7237c2a65b7fb3443acf5f]: my-call-cached
  | 1 |  2 |
  | 3 |  4 |
  | 5 |  6 |
  | 7 |  8 |
  | 9 | 10 |

  #+name: plot-result-cached
  #+call: plotting[:file result-call-cached.png](data= my-cached-results) 
:results file


Regards,

-- 
Nicolas Goaziou