[O] working with tables can be quite painful...
Hello, I am working with a table. It has approximately 130 rows and 20 columns so it's not huge but also not small. Three columns are text but the rest are all numbers with some degree of sparsity. Instrumenting org while working on this table, manipulating the entries in just one row, I get the following: | Function | calls | elapsed time | average time | |--+---+--+--| | org-cycle|20 | 41.550963140 | 2.0775481570 | | org-table-next-field |20 | 41.544266727 | 2.0772133363 | | org-table-align | 5 | 41.470595702 | 8.2941191404 | | org-mode-flyspell-verify |52 | 1.0647362189 | 0.0204756965 | | org-do-latex-and-related |21 | 0.6656267140 | 0.0316965101 | | org-element-at-point | 125 | 0.6356939890 | 0.0050855519 | | org-element--parse-to| 125 | 0.6086256940 | 0.0048690055 | | org-element--cache-put | 1399 | 0.4963533770 | 0.0003547915 | >From this, it would seem that the table align function is killing the performance. 8 seconds per call? On an 8 core Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz... so not my wee Pandora where I expect slowness! This is with a not quite up to date org. I'm avoiding upgrading as I am preparing material for teaching which starts soon and I don't want to run into issues due to changes in org... so I apologise if things have changed recently. This performance issue has existed for quite some time now, however. Any suggestions on speeding things up? Thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.5-1070-g190476
[O] Equations in table cells are automatically warped in HTML export
Hi, I was writing equations using latex fragments in org table. When exported to html, some equations in the table cells were automatically wrapped. The following is a minimal example, | a | b | c | | \\( a-1 \\) | \\( b-1 \\) | \\( c-1 \\) | When I opened the exported html file in chrome, "a-1", "b-1", and "c-1" were all broken into two lines. The result looks like a b c a b c -1 -1 -1 which is ugly and confusing. Can you reproduce this? I am not sure if this is related to org or just my browser. I have tried Safari though, which gave the same result. Jiang
Re: [O] iOrg
Adam Porter writes: Hi Adam, > Thorsten Jolitz writes: > >> [WARNING: this is an extremely long post with lots of boxquotes that >> might turn out unreadable, you might want to consider this as spam >> and just ignore it] > > Hi Thorsten, > > I guess I have missed iOrg before, because this looks very interesting! > If I understand correctly, iOrg runs a web server written in PicoLisp > which presents a set of Org files as an editable wiki in a browser? iOrg is two things: - the PicoLisp Wiki (which is a lightweight but complete application with user-, role-, document-, version-management, authentication, etc.) with Org-mode syntax, where you can create, edit and (full text) search wiki pages as Org files that are stored as BLOBS in the PicoLisp database and viewed as HTML in the browser. - a database application that maps textbased Org-mode files to an object-oriented class hierarchy, where each headline presents an object (instance) of class +OrgHeadline, and each file presents an object (instance) of class +OrgData, and the tree structure of an Org file is represented by links between these objects. > If so, this opens up a world of possibilities. Imagine having your > personal Org files (at least, ones without very personal data) editable > on your personal web server from any computer, even one without Emacs > installed (including mobile devices)! You could edit your Org files > from any system, then sync changes with Git when you get home and > continue editing in Emacs. >From my point of view, Org-mode's greatest strength (being integrated in powerful Emacs) is kind of a weakness too. Did you ever try to write Org syntax without any editor support? Not very comfortable ... your idea seems perfectly valid to me when its about editing the headline properties of an +OrgHeadline object in the browser, but not so much for writing lengthy an syntax rich content of a headline. There you really need Emacs for editing ... > I feel like I've seen a similar project before, one not based on > PicoLisp...I think it ran from within Emacs...I'd have to google it up > again. But I don't think it was nearly as advanced as this. There are several Emacs Web Servers. They can't be as advanced as this because they would have to compete with the PicoLisp application programming framework and its underlying object-oriented lisp database, which is a tough task. > Anyway, if I could make one suggestion to help get things going again, > it would be to add a bit more info to the readme so that visitors can > immediately understand what it's about. :) Thats a good suggestion, but actually I did not want that, because its a bit too early. Its not yet version 0.9 for public announcement, maybe 0,8? I was surprised how good it worked yesterday, did not touch it for a long time, there is not missing too much. -- cheers, Thorsten
[O] Org, reftex and LaTeX with multiple bibliographies
Hi Org list, I'm trying to work with multiple .bib files and having trouble. In my Org file, I have: #+LATEX_HEADER_EXTRA:\addbibresource{Library.bib,local.bib} And this works. I can search for a string in reftex and both bibliographies are found. It does not seem to matter what =reftex-default-bibliography= is set to. But when I export to LaTeX, pdflatex (or latexmk) doesn't work, and complains: Biber error: [268] Utils.pm:165> ERROR - Cannot find 'Library.bib,local.bib'! Latexmk: Biber did't find bib file [Library.bib,local.bib] And the biber documentation states that you cannot use a comma separated list of bibliographies in an =\addbibresource= command. You should use multiple of those commands. However, if I use multiple of those commands, then Org only searches in the first bib file, not in both. While writing this email and testing things yet again, I think I've found a way to get this to work. But I'm pretty sure this is exploiting some bug, and not a recommended method. If I have the \addbibresource{a,b} commented out, Org (reftex?) uses this, but it is not exported. I then repeat it twice, breaking apart the comma, and those get exported. For example: # Note that the first line below is commented out # #+LATEX_HEADER_EXTRA:\addbibresource{Library.bib,local.bib} #+LATEX_HEADER_EXTRA:\addbibresource{Library.bib} #+LATEX_HEADER_EXTRA:\addbibresource{local.bib} Is this how others work with multiple bibliographies? Some other method? Thanks, -k.
Re: [O] org-board -- bookmarking and archival
Adam Porter writes: > Hi Charles, > > Thanks for sharing that, I will check it out. As was mentioned, it > seems ripe for integrating with browser capture. On that note, have you > seen org-protocol-capture-html? For articles that are primarily text, > I've been capturing articles directly in Org format, but your package > sounds good for capturing pages as-is. Thanks for letting me know about org-protocol-capture-html, I had not seen it. Capturing text directly to an Org file sounds more manageable. > By the way, you might want to consider integrating something like > Readability or the Python package python-readability (aka > readability-lxml) for reducing web pages to the primary content. It's > worked out well in org-protocol-capture-html. Great idea, maybe as part of a post-processing hook? Then we could save the HTML as a backup (for later web browsing) and then include the primary text in the Org file for easy viewing straight from Emacs. Seems your package is already well-suited to that part. :) I also wanted to keep the design relatively abstract so that things like this could be added later. One other feature idea that could be implemented as a post-processing hook is responding to "downloadable" links (like links to YouTube videos) by running a backend program (in this case, "youtube-dl") to go take care of fetching the apprapriate content. > By the way, here's some code I've been using to read and/or capture >web > pages from URLs on the clipboard: > [...] It's helpful to see an example of org-capture in use, I still have more to learn about it. I'll put a little example in the README for org-board. Cheers, Charles
Re: [O] Bug: Exporting smart single quotes in Org 8.3 seems broken [8.3.2 (8.3.2-elpa @ /Users/jonathan/.emacs.d/elpa/org-20150929/)]
Hello, Suvayu Ali writes: > It feels wrong as these are not English words, or phrases, but strings > with context dependent special meaning. In my case, these are action > keys in my organisation denoting specific processes. > > I also found this English.SX answer: > > http://english.stackexchange.com/a/3471 > > It mentions: > > [...] referring to the concept behind the word [...], > > as one of the use cases for single quotes. There are two things to consider. 1. Double quotes in the Org document are not necessarily exported as double quotes in the output. It depends on the language used and `org-export-smart-quotes-alist'. 2. You can always force any type of quotes with entities. Regards, -- Nicolas Goaziou
Re: [O] [ANN] ob-applescript
Stig Brautaset writes: > I've just made `ob-applescript', a backend to execute AppleScript from > Org Babel source code blocks available on Melpa. Disregard my previous question: haven't had my coffee yet. -- Nick
Re: [O] [ANN] ob-applescript
Stig Brautaset writes: > I've just made `ob-applescript', a backend to execute AppleScript from > Org Babel source code blocks available on Melpa. It's my first attempt > at making a babel backend, so any comments and criticism welcome. Here > are some things it does support though: > Where can one get it? -- Nick
[O] Suggestion: Export templates: use drawers to group
Hi If I have many headers in a document, it is easy to loose the overview for me. So I started to use drawers: :OPTIONS: ... :END: :LATEX: :END: :BABEL: ... :END: and have only the "standard" content type options open (DESCRIPTION, KEYWORDS, SUBTITLE, DATE, AUTHOR, ...) Would this be something to include into the templates which can be inserted (C-e C-L #)? This would make it much easier to work with these options. Cheers, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug PGP: 0x0F52F982 signature.asc Description: PGP signature
Re: [O] org-file-apps settings?
Huh. I am not really able to figure this out. I imagine that part of the problem may be that org tries to use mailcap as a method, and I don't have any mailcap files. So I attempted this, which does not work: '((system . "/usr/bin/xdg-open %s") (auto-mode . emacs) ("\\.odt\\'" . system) ("\\.mm\\'" . default) ("\\.x?html?\\'" . default) ("\\.pdf\\'" . default) ) *Messages* reports that xdg-open has been run, but the file doesn't actually run. seting the odt entry to "/usr/bin/libreoffice %s" doesn't seem to have any effect at all -- the file just opens in emacs. The only thing that works for now is this bizarre workaround: '((system . "/usr/bin/libreoffice %s") (auto-mode . emacs) ("odt" . system) ("\\.odt\\'" . "system") ("\\.mm\\'" . default) ("\\.x?html?\\'" . default) ("\\.pdf\\'" . default)) I don't undertand why this would work while the others don't. Of course, this is a pretty lousy workaround since now everything opens in libreoffice by default! On Fri, Sep 16, 2016 at 4:16 AM, Colin Baxter wrote: > On Thu, Sep 15 2016, Matt Price wrote: > > > hi Everyone, > > I have been through this a million times, but I never seem to remember, > and have a hard time finding > > the answer online or in my archives. > > > > On a Linux system, how should I set org-file-apps to allow org to open > odt files in libreoffice, html files > > in Firefox, and pdf files in evince (especially in export-and-open > commands)? > > > > I have tried a couple of htings; this is what C-h v org-file-apps > currently says: > > > > Its value is ((remote . emacs) (system . mailcap) (t . mailcap)) > > Original value was > > ((auto-mode . emacs) > > ("\\.mm\\'" . default) > > ("\\.x?html?\\'" . default) > > ("\\.pdf\\'" . default)) > > > > There's no /etc/mailcap on my mahcine (?), and .mailcap reads: > > > > */*; xdg-open "%s" > > > > Running `xdg-open file.odt` from a terminal will open the file in > libreoffice, but exporting to odt and > > opening with C-c C-e o O opens the file in emacs. What should I try > next? Thank you! > > m > > Hi Matt, > > I can't stand evince so I've explicitly modified the default for pdf > files to open xpdf. It could also be used to make open-office files use the > application you want: > > (add-hook 'org-mode-hook >'(lambda () > (delete '("\\.pdf\\'" . default) org-file-apps) > (add-to-list 'org-file-apps '("\\.pdf\\'" . "xpdf %s" > > > Best Wishes. >
Re: [O] org-agenda: different face (color) per file?
Understandable. :) Well, another option would be to create a custom agenda command that put items from different files in different sections. Check the docs for the org-agenda-custom-commands variable (and google it for many examples).
[O] clocktable - summing time on a property instead of headline
Hi, I am treating multiple tasks that can belong to the same project or different project, but as I have an (almost) infinite number of projects and I am working on many projects throughout the day, I prefer to define a property that will contain the project code instead of a tree for each project. Thus, is it possible to configure a clock table to display time spend on a property instead of a headline. Thanks, Roland.
Re: [O] org-agenda: different face (color) per file?
hehe thx both are way over my head :) ill just give up on the idea ;-) thx! Z On Fri, Sep 16, 2016 at 9:34 AM, Adam Porter wrote: > Xebar Saram writes: > > > this seems it should be trivial but googling didnt help. my org-agenda > > view is made out of 5-6 files. can one define a different face (mainly > > color) per file? > > There's no way to do this that I know of, but I guess you could try two > approaches: > > 1. Advise the code that writes the agenda line-by-line. You'll have to > dig through the agenda-making code... > > 2. Write a function to post-process the agenda and adjust the color of > each line depending on its source file (or its category, which is > usually the file it comes from). I'm guessing this would be easier. > > >
Re: [O] org-file-apps settings?
On Thu, Sep 15 2016, Matt Price wrote: > hi Everyone, > I have been through this a million times, but I never seem to remember, and > have a hard time finding > the answer online or in my archives. > > On a Linux system, how should I set org-file-apps to allow org to open odt > files in libreoffice, html files > in Firefox, and pdf files in evince (especially in export-and-open commands)? > > I have tried a couple of htings; this is what C-h v org-file-apps currently > says: > > Its value is ((remote . emacs) (system . mailcap) (t . mailcap)) > Original value was > ((auto-mode . emacs) > ("\\.mm\\'" . default) > ("\\.x?html?\\'" . default) > ("\\.pdf\\'" . default)) > > There's no /etc/mailcap on my mahcine (?), and .mailcap reads: > > */*; xdg-open "%s" > > Running `xdg-open file.odt` from a terminal will open the file in > libreoffice, but exporting to odt and > opening with C-c C-e o O opens the file in emacs. What should I try next? > Thank you! > m Hi Matt, I can't stand evince so I've explicitly modified the default for pdf files to open xpdf. It could also be used to make open-office files use the application you want: (add-hook 'org-mode-hook '(lambda () (delete '("\\.pdf\\'" . default) org-file-apps) (add-to-list 'org-file-apps '("\\.pdf\\'" . "xpdf %s" Best Wishes.
[O] [ANN] ob-applescript
I've just made `ob-applescript', a backend to execute AppleScript from Org Babel source code blocks available on Melpa. It's my first attempt at making a babel backend, so any comments and criticism welcome. Here are some things it does support though: - No arguments, no code – just return a string. #+BEGIN_SRC applescript "Hello World" #+END_SRC #+RESULTS: : Hello World - You can pass variable to a block: #+BEGIN_SRC applescript :var subject="World" "Hello " & subject #+END_SRC #+RESULTS: : Hello World - You can use either apples or applescript as the language designation, to cater for two competing major modes. This example also shows you can do interactive stuff. #+BEGIN_SRC apples display alert "Danger! The WHAM is overheating!" #+END_SRC #+RESULTS: : button returned:OK - If the result of the evaluation looks like a table, it’ll become a table: #+BEGIN_SRC apples "fi fo 1 2 3 4" #+END_SRC #+RESULTS: | fi | fo | | 1 | 2 | | 3 | 4 | Hope this is useful to someone! Stig
[O] [PATCH] org.el: Respect user-defined reftex-cite-format
Hi Org mode team, I would like to propose changing org-reftex-citation to respect pre-existing bindings for reftex-cite-format. This change would make org-reftex-citation easier to use in situations where "\cite{$BIBTEX_KEY}" is not the appropriate citation format. Please let me know if I should make any changes to the attached patch to meet your criteria for inclusion. (It would be great if you could CC me on replies, since I am not on the mailing list.) Best, Sebastian 0001-org.el-Respect-user-defined-reftex-cite-format.patch Description: Binary data
Re: [O] [PATCH] custom port for postgresql
Hi Adam, thanks for the "patch" hint ;-) I changed the dbport as optional argument and added the dbpassword option as well. Jakob 2016-09-14 7:04 GMT+02:00 Adam Porter : > Jakob Lombacher writes: > > > -(defun org-babel-sql-dbstring-postgresql (host user database) > > +(defun org-babel-sql-dbstring-postgresql (host port user database) > > Hi Jakob, > > Two suggestions: > > 1. Generally people put something like "[PATCH]" in the subject so that > the maintainers will know it contains a patch. :) > > 2. I'd suggest putting the new `port` argument at the end of the > argument list, after an `&optional`. Even though it makes more sense to > put it after the host, putting it at the end and making it optional > means that people won't have to change existing code that calls this > function. > > Thanks for submitting the patch. > > > From e92e5982c3a8db125e161d676835b47ed3806071 Mon Sep 17 00:00:00 2001 From: Jakob Lombacher Date: Fri, 16 Sep 2016 09:12:56 +0200 Subject: [PATCH] add dbport and dbpassword options to psql --- lisp/ob-sql.el | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el index 7801c5f..ed7feb8 100644 --- a/lisp/ob-sql.el +++ b/lisp/ob-sql.el @@ -90,12 +90,13 @@ (when password (concat "-p" password)) (when database (concat "-D" database)) -(defun org-babel-sql-dbstring-postgresql (host user database) +(defun org-babel-sql-dbstring-postgresql (host user database &optional port) "Make PostgreSQL command line args for database connection. Pass nil to omit that arg." (combine-and-quote-strings (delq nil (list (when host (concat "-h" host)) + (when port (format "-p%d" port)) (when user (concat "-U" user)) (when database (concat "-d" database)) @@ -167,11 +168,12 @@ This function is called by `org-babel-execute-src-block'." (org-babel-process-file-name in-file) (org-babel-process-file-name out-file))) (`postgresql (format - "psql --set=\"ON_ERROR_STOP=1\" %s -A -P \ + "%spsql --set=\"ON_ERROR_STOP=1\" %s -A -P \ footer=off -F \"\t\" %s -f %s -o %s %s" + (if dbpassword (format "PGPASSWORD=%s " dbpassword) "") (if colnames-p "" "-t") (org-babel-sql-dbstring-postgresql - dbhost dbuser database) + dbhost dbuser database dbport) (org-babel-process-file-name in-file) (org-babel-process-file-name out-file) (or cmdline ""))) -- 2.8.1
Re: [O] Bug: Exporting smart single quotes in Org 8.3 seems broken [8.3.2 (8.3.2-elpa @ /Users/jonathan/.emacs.d/elpa/org-20150929/)]
Hi Nicolas, On Thu, Sep 15, 2016 at 03:29:09PM +0200, Nicolas Goaziou wrote: > Hello, > > Suvayu Ali writes: > > > Sorry about resuming an old thread, but how would I go about quoting > > special characters? I need to quote strings like ' > Using double quotes here seems wrong. > > Why does it seem wrong? It feels wrong as these are not English words, or phrases, but strings with context dependent special meaning. In my case, these are action keys in my organisation denoting specific processes. I also found this English.SX answer: http://english.stackexchange.com/a/3471 It mentions: [...] referring to the concept behind the word [...], as one of the use cases for single quotes. Cheers, -- Suvayu Open source is the future. It sets us free.
Re: [O] duration without hours?
Matt Price writes: [snip (16 lines)] > I have a bunch of questions but will start with what is maybe the most basic: > can I write durations in minutes and seconds only? the extra 00: is sort of > annoying to type when I am tired. [snip (7 lines)] Just to be contrary, for those of us who clock our working time with orgmode and are not interested in know exactly how many seconds we spend at the office, it would be nice to have durations expressed in hours and minutes only. Maybe there could be something like the alignment setting for columns which would affect the formatting. Cheers, Loris -- Dr. Loris Bennett (Mr.) ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de