Re: orgformat.py: util library for generating Org mode from Python
Thanks for working on and sharing this, Karl. It's great to see the Org format getting more support in other languages and contexts.
Re: Anyone use 3rd party search tools w/org-mode?
Eric Abrahamsen writes: > I think this last point is key. Most full-text search engines provide > config options for defining fields, or "facets", which in theory we > could set up to parse tags/properties/timestamps. Of course it's an Emacs-based tool, but please note that org-ql has extensive, optimized support for searching Org-specific data like that. For example, you could search for those three data types in a single query, like: tags:Emacs,Org property:key1=val1,key2=val2 ts-active:on=2019-11-06
Re: Anyone use 3rd party search tools w/org-mode?
The way I got Swish to index org files was to create a script that generated an xml file (https://kitchingroup.cheme.cmu.edu/blog/2015/07/06/Indexing-headlines-in-org-files-with-swish-e-with-laser-sharp-results/) or html (http://kitchingroup.cheme.cmu.edu/blog/2015/07/03/Using-swish-e-to-index-org-files-as-html/) that it could index. This is probably a general strategy for these tools. Eric Abrahamsen writes: > Roland Everaert writes: > >> Hello all, >> >> I am interested in a search/indexing engine targeting the org format, >> too. >> >> My interest comes from the fact that I have a growing number of org >> files and as org-mode has no file archiving feature, AFAIK, searching >> needs more and more time to complete. >> >> Moving files, that are no more necessary, outside of my org-directories, >> can be tedious and prone to moving the wrong file to the wrong location. >> >> Hence, an indexer could comes in handy, especially if it is optimised >> for the Org format (i.e.: it knows what are categories, tags, >> properties, etc in an Org file). > > I think this last point is key. Most full-text search engines provide > config options for defining fields, or "facets", which in theory we > could set up to parse tags/properties/timestamps. My guess is that any > of the major contenders (solr, xapian, lucene) would work pretty much as > well as any of the others -- for our purposes, they probably only differ > in the details. Xapian might be considered "in the family" from a > license standpoint, but I don't know that that matters too much. > > It would be fun to provide an Org indexing config for one of these > engines, and then build the Agenda on top of it. -- 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: Anyone use 3rd party search tools w/org-mode?
Roland Everaert writes: > Hello all, > > I am interested in a search/indexing engine targeting the org format, > too. > > My interest comes from the fact that I have a growing number of org > files and as org-mode has no file archiving feature, AFAIK, searching > needs more and more time to complete. > > Moving files, that are no more necessary, outside of my org-directories, > can be tedious and prone to moving the wrong file to the wrong location. > > Hence, an indexer could comes in handy, especially if it is optimised > for the Org format (i.e.: it knows what are categories, tags, > properties, etc in an Org file). I think this last point is key. Most full-text search engines provide config options for defining fields, or "facets", which in theory we could set up to parse tags/properties/timestamps. My guess is that any of the major contenders (solr, xapian, lucene) would work pretty much as well as any of the others -- for our purposes, they probably only differ in the details. Xapian might be considered "in the family" from a license standpoint, but I don't know that that matters too much. It would be fun to provide an Org indexing config for one of these engines, and then build the Agenda on top of it.
Re: Anyone use 3rd party search tools w/org-mode?
I use Recoll. It has a GUI, a CLI, and I use a script with dialog to popup results. I index all my org files, all my PDFs (vendor technical documentation), email, etc. Works great, refreshes daily. On Wed, Nov 06, 2019 at 05:02:07PM +0100, Roland Everaert wrote: > Hello all, > > I am interested in a search/indexing engine targeting the org format, > too. > > My interest comes from the fact that I have a growing number of org > files and as org-mode has no file archiving feature, AFAIK, searching > needs more and more time to complete. > > Moving files, that are no more necessary, outside of my org-directories, > can be tedious and prone to moving the wrong file to the wrong location. > > Hence, an indexer could comes in handy, especially if it is optimised > for the Org format (i.e.: it knows what are categories, tags, > properties, etc in an Org file). > > > Regards, > > Roland. > > Nathan Neff writes: > > > Hello all, > > > > I'm considering "indexing" my org-mode files and haven't done any research > > into > > this. I'm sure there's 100 different ways to do this but wanted to ask the > > list if anyone > > is indexing their org-mode files and using a search tool like Solr, Elastic > > or smaller indexing engines to search their org-files. > > > > Emacs integration obviously would be a plus. > > > > Thanks for any feedback, > > --Nate > > > -- > Luke, use the FOSS > > Sent from Emacs > -- Russell Adamsrlad...@adamsinfoserv.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint:1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
Re: where to place caption so babel results include caption?
On 2019-11-06 at 17:05 +01, Berry, Charles wrote... > M-: (org-babel-map-src-blocks nil (org-babel-insert-result "" > '("replace"))) RET > > HTH, Yes that helps! A simple solution. Thank you. -k.
Re: where to place caption so babel results include caption?
> On Nov 6, 2019, at 1:55 AM, Ken Mankoff wrote: > > Hello, > > If I have a babel block that generates a table and I'd like latex attributes > associated with that table, it seems to work well if I do this: > > #+NAME: foo > #+BEGIN_SRC bash :results table > echo "${RANDOM}|${RANDOM}|" > echo "${RANDOM}|${RANDOM}|" > #+END_SRC > > #+caption: foo > #+latex_attr: :placement [!h] > #+RESULTS: foo > | 17326 | 29919 | > | 30565 | 9548 | > > > And I can re-run the babel block and CAPTION and ATTR_LATEX remain. > > But if I want to clean with =[C-u] C-c C-v k= or > (org-babel-remove-result-one-or-many) and regenerate =C-c C-v C-b= or > (org-babel-execute-buffer), then this happens: > > > #+RESULTS: foo > | 17225 | 29253 | > | 18433 | 27388 | > > #+caption: foo > #+latex_attr: :placement [!h] > > If I place CAPTION and LATEX_ATTR above the babel block it isn't exported > correctly. Is there some way to have this work? > Maybe use something like M-: (org-babel-map-src-blocks nil (org-babel-insert-result "" '("replace"))) RET to scrub the existing result values without removing the '#+RESULTS' line. ?? HTH, Chuck
Re: Anyone use 3rd party search tools w/org-mode?
Hello all, I am interested in a search/indexing engine targeting the org format, too. My interest comes from the fact that I have a growing number of org files and as org-mode has no file archiving feature, AFAIK, searching needs more and more time to complete. Moving files, that are no more necessary, outside of my org-directories, can be tedious and prone to moving the wrong file to the wrong location. Hence, an indexer could comes in handy, especially if it is optimised for the Org format (i.e.: it knows what are categories, tags, properties, etc in an Org file). Regards, Roland. Nathan Neff writes: > Hello all, > > I'm considering "indexing" my org-mode files and haven't done any research > into > this. I'm sure there's 100 different ways to do this but wanted to ask the > list if anyone > is indexing their org-mode files and using a search tool like Solr, Elastic > or smaller indexing engines to search their org-files. > > Emacs integration obviously would be a plus. > > Thanks for any feedback, > --Nate -- Luke, use the FOSS Sent from Emacs
orgformat.py: util library for generating Org mode from Python
Hi, In the recent days, I've been busy migrating orgformat[1] from Memacs[2] and lazyblorg[3] to a repository on its own. It's a utility library that provides a variety of Python functions that help dealing with generating non-trivial Org mode content such as date- or time-stamps. I've added good documentation, valuable unit tests to all functions and even added type annotations to the library itself (playing around with mypy[4] which I recommend). You may find some of the functions interesting for your project and I'm happy to receive pull requests of functions that you'll move out from your project to this general purpose Org mode library as well. Find the (horrible coloured) HTML docu at [5]. HTH [1] https://github.com/novoid/orgformat [2] https://github.com/novoid/Memacs [3] https://github.com/novoid/lazyblorg [4] https://mypy.readthedocs.io/en/latest/introduction.html [5] http://htmlpreview.github.io/?https://github.com/novoid/orgformat/blob/master/orgformat.html -- get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode: > get Memacs from https://github.com/novoid/Memacs < Personal Information Management > http://Karl-Voit.at/tags/pim/ Emacs-related > http://Karl-Voit.at/tags/emacs/
Re: Capture to heading of current cursor
Am 05.11.19 um 22:26 schrieb Nathan Neff: > Hello all, > > I know I've asked this before, but can't remember the quick & easy path (TM) > to creating an org-capture template which will capture to the current > heading? prepend the capture command (C-C C in my setting) by C-0 I think it puts the result before the next heading though. Remember to make sure the captured text ends with at least one newline. HTH, Julius > > Thanks, > --Nate
[PATCH] ob-java.el: Add header argument to pass command line args
... attached Jarmo >From bbc3f977d6b98240834af8fb009a2a080813f30b Mon Sep 17 00:00:00 2001 From: Jarmo Hurri Date: Wed, 6 Nov 2019 12:21:16 +0200 Subject: [PATCH] ob-java.el: Add header argument to pass command line args. * lisp/ob-java.el (org-babel-execute:java): Handle new header argument `:cmdargs` and pass its value as the last element in call to java. --- lisp/ob-java.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ob-java.el b/lisp/ob-java.el index b055f85e5..80308ec32 100644 --- a/lisp/ob-java.el +++ b/lisp/ob-java.el @@ -58,6 +58,7 @@ parameters may be used, like javac -verbose" (src-file (concat classname ".java")) (cmpflag (or (cdr (assq :cmpflag params)) "")) (cmdline (or (cdr (assq :cmdline params)) "")) + (cmdargs (or (cdr (assq :cmdargs params)) "")) (full-body (org-babel-expand-body:generic body params))) (with-temp-file src-file (insert full-body)) (org-babel-eval @@ -66,7 +67,7 @@ parameters may be used, like javac -verbose" (unless (or (not packagename) (file-exists-p packagename)) (make-directory packagename 'parents)) (let ((results (org-babel-eval (concat org-babel-java-command - " " cmdline " " classname) ""))) + " " cmdline " " classname " " cmdargs) ""))) (org-babel-reassemble-table (org-babel-result-cond (cdr (assq :result-params params)) (org-babel-read results) -- 2.21.0
[O] where to place caption so babel results include caption?
Hello, If I have a babel block that generates a table and I'd like latex attributes associated with that table, it seems to work well if I do this: #+NAME: foo #+BEGIN_SRC bash :results table echo "${RANDOM}|${RANDOM}|" echo "${RANDOM}|${RANDOM}|" #+END_SRC #+caption: foo #+latex_attr: :placement [!h] #+RESULTS: foo | 17326 | 29919 | | 30565 | 9548 | And I can re-run the babel block and CAPTION and ATTR_LATEX remain. But if I want to clean with =[C-u] C-c C-v k= or (org-babel-remove-result-one-or-many) and regenerate =C-c C-v C-b= or (org-babel-execute-buffer), then this happens: #+RESULTS: foo | 17225 | 29253 | | 18433 | 27388 | #+caption: foo #+latex_attr: :placement [!h] If I place CAPTION and LATEX_ATTR above the babel block it isn't exported correctly. Is there some way to have this work? Thanks, -k.