Re: [O] Inline Images Showing as Link
Hi Andy, On Thu, Apr 21, 2011 at 05:16, Andy Jewell ajew...@adaptu.com wrote: Hi. . . I'm having trouble getting an image URL to render as an inline image in the html export. It always renders it as a link. I have an image saved on Google but Google doesn't preserve the extension which I think confuses org-mode since it doesn't look like an image. Here's the markup: * See the image below: [[https://docs.google.com/leaf?id=0B-swGEqSDpxyMjgwNjE0MzEtMTA4OC00NTdmLWE3MjktMDJmOGE5ZWM2YjY0hl=en]] * See the image above I've tried adding a caption thinking that would provide a hint to render as an image but no success there. Can someone advise if there an option I'm missing? The exporter uses the extension to figure out whether the location being linked to is an image. There is no extension here, so it assumes you’re linking to a normal page. Here are a few of the relevant bits: ,[ C-h v org-export-html-inline-image-extensions RET ] | org-export-html-inline-image-extensions is a variable defined in `org-html.el'. | Its value is (png jpeg jpg gif svg) | | | Documentation: | Extensions of image files that can be inlined into HTML. | | You can customize this variable. ` ,[ C-h f org-file-image-p RET ] | org-file-image-p is a compiled Lisp function in `org.el'. | | (org-file-image-p FILE optional EXTENSIONS) | | Return non-nil if FILE is an image. ` I think you’d need to majorly rejigger them to make Org recognize your link as an image. Aankhen
Re: [O] Inline Images Showing as Link
Hi, Aankhen aank...@gmail.com writes: [...] I think you’d need to majorly rejigger them to make Org recognize your link as an image. And it doesn't seem to work in HTML anyway. I just tried to render this: --8---cut here---start-8--- img src=https://docs.google.com/leaf?id=0B-swGEqSDpxyMjgwNjE0MzEtMTA4OC00NTdmLWE3MjktMDJmOGE5ZWM2YjY0hl=en; alt=none/ --8---cut here---end---8--- in firefox and only get the alternative. (its the google way of web). -- Manuel Giraud
Re: [O] NEW auto dimension tables doesn't work in orgtbl Text mode
I will check as soon as i return home. Do You want some screenshot also? Sebastian Szwarc Dnia 20 kwi 2011 o godz. 01:12 Samuel Wales samolog...@gmail.com napisał(a): What type of font? What type of characters?
Re: [O] Inline Images Showing as Link
Hello, W dniu 2011-04-21 10:34, Manuel Giraud pisze: Hi, Aankhenaank...@gmail.com writes: [...] I think you’d need to majorly rejigger them to make Org recognize your link as an image. And it doesn't seem to work in HTML anyway. I just tried to render this: --8---cut here---start-8--- img src=https://docs.google.com/leaf?id=0B-swGEqSDpxyMjgwNjE0MzEtMTA4OC00NTdmLWE3MjktMDJmOGE5ZWM2YjY0hl=en; alt=none/ --8---cut here---end---8--- in firefox and only get the alternative. (its the google way of web). That is because this is not link to image but to the page that shows image. Direct link to image is https://lh6.googleusercontent.com/KXI0totQ7IlQlRpUqszAYhRM0ldASL6vdl3VWDEswuoStG-jMMbNffNW-pHwRCR_xiXpgGNNaZGZfUWJ9UlGHjvwxQ=s512 and img src=https://lh6.googleusercontent.com/KXI0totQ7IlQlRpUqszAYhRM0ldASL6vdl3VWDEswuoStG-jMMbNffNW-pHwRCR_xiXpgGNNaZGZfUWJ9UlGHjvwxQ=s512; alt=none/ works fine. However, giving that this is some google docs image over https it probably will not always work. Cheers, Radek.
Re: [O] Inline Images Showing as Link
Radosław Grzanka radosl...@gmail.com writes: [...] img src=https://lh6.googleusercontent.com/KXI0totQ7IlQlRpUqszAYhRM0ldASL6vdl3VWDEswuoStG-jMMbNffNW-pHwRCR_xiXpgGNNaZGZfUWJ9UlGHjvwxQ=s512; alt=none/ works fine. However, giving that this is some google docs image over https it probably will not always work. Then the OP can do something like this: (add-to-list 'org-export-html-inline-image-extensions com/KXI0totQ7IlQlRpUqszAYhRM0ldASL6vdl3VWDEswuoStG-jMMbNffNW-pHwRCR_xiXpgGNNaZGZfUWJ9UlGHjvwxQ=s512) and html export will work afterwards (my eyes! it hurts!) -- Manuel Giraud
Re: [O] Inline Images Showing as Link
Aankhen aank...@gmail.com wrote: I think you’d need to majorly rejigger them to make Org recognize your link as an image. Agreed, but in addition, I don't think that the link *is* an image at all: I visit, View Source and get a faceful of HTML and JS. Forget about org: just write a simple HTML page with an img tag and that URL as its source - does it work? It sure doesn't work for me. Nick
Re: [O] Inline Images Showing as Link
Ah - thanks to all for clarifying the issues. Looks like my grand plan of pulling my images from Google is not so grand after all. Thanks again! Andy On Thu, Apr 21, 2011 at 6:16 AM, Nick Dokos nicholas.do...@hp.com wrote: Aankhen aank...@gmail.com wrote: I think you’d need to majorly rejigger them to make Org recognize your link as an image. Agreed, but in addition, I don't think that the link *is* an image at all: I visit, View Source and get a faceful of HTML and JS. Forget about org: just write a simple HTML page with an img tag and that URL as its source - does it work? It sure doesn't work for me. Nick
Re: [O] Difference between subtree-restricted export and 'publish enclosing subtree'
On 8.4.2011, at 15:01, Matt Lundin wrote: Sean Whitton s...@silentflame.com writes: Dear all, I noticed the publish enclosing subtree command in the export dispatcher today and I can't make it work, nor can I see how it differs From publishing a subtree (and needless to say I can't seem to find any documentation). This is a section of my .org file: , | * STARTED Hume Essay #2: Causation | DEADLINE: 2011-04-19 Tue | [2011-03-14 Mon 16:04] | [[gnus:nnimap%2BNucifera:INBOX#2e7232813422f0459da862f6653e33202483027...@exmbx06.ad.oak.ox.ac.uk][Reading | list]] | | *Does Hume think that causal power is all in the mind?* | ** TODO Essay | :PROPERTIES: | :EXPORT_FILE_NAME: hume-essay-causation | :EXPORT_AUTHOR: Sean Whitton, Balliol | :EXPORT_DATE: April 2011 | :EXPORT_TITLE: Does Hume think that causal power is all in the mind? | :EXPORT_OPTIONS: todo:nil toc:nil skip:t | :LaTeX_CLASS: spwessay | :END: | *** | Blah de blah (check above for how to do footnotes). ` (yup I'm a non-science student using org, so shoot me :P) Welcome to the club. :) When I put my cursor in the properties drawer within the essay text and hit C-c C-e 1 d I get my 'essay' exported and processed to hume-essay-causation.pdf correctly, but if I instead use C-c C-e SPC with point at various different places within the essay, I just get the error 'No enclosing node with LaTeX_CLASS or EXPORT_FILE_NAME', yet afaics they are there. Yes, there are a few issues here. I can replicate this bug when the cursor is above the LATEX_CLASS property. For instance, if the cursor is located on the :PROPERTIES: line, C-c C-e SPC results in an error. If it is on the :END: line, it finds the relevant headline The problem is that C-c C-e space calls a simple backwards regexp search for the two properties. But the regexp search looks for export_title instead of export_file_name (lines 998-1000): (if (re-search-backward ^[ \t]+\\(:latex_class:\\|:export_title:\\)[ \t]+\\S- nil t) In addition, the regexp search is not bounded, Both issues are fixed now, thanks Matt for doing the footwork. - Carsten so if you have another headline higher up in the file with one of the properties in the search, such as... --8---cut here---start-8--- * Kant Essay :PROPERTIES: :LATEX_CLASS: spwessay :END: ** Some text --8---cut here---end---8--- ...hitting space will export that essay instead. How do I make the SPC command work and how does it differ from a subtree export? My guess is that the former was introduced to make it more convenient to export subtrees with the relevant properties. I.e., one can simply press C-c C-e SPC at the current point, rather than having to mark the tree manually. Best, Matt
Re: [O] [ANN] org-bibtex.el --- convert between Org headings and bibtex entries
Hi Eric, On Apr 20, 2011, at 9:00 AM, Eric Schulte wrote: Hi Tom, Thomas S. Dye t...@tsdye.com writes: Hi Eric, This could be very useful and a significant enhancement to Org-mode for note taking. With it, library time can be spent almost entirely within Org-mode, capturing bibliographic information and taking reading notes. It feels like the right level of functionality-- lightweight and easy to use, with lots of prompting material. Thanks, I hope so. I created an entry with org-bibtex-create and then another with org- bibtex-read/write. When I ran org-bibtex, only the second entry was exported. Also, the org-bibtex-read/write process mangled the bibtex entry a bit, so the resulting .bib file wasn't useful. Note the addition of {} around the publisher and year, and the truncation of multi-line entries. I /believe/ I have fixed this issue. I am now using pre-existing bibtex functions for reading in entries, and for cleaning up entries written by org-bibtex. The org-bibtex-read/write process doesn't work on the example I sent. The read appears to work (though I can't find a buffer *org-bibtex- entries* afterwards), but the write inserts the headline asterisk then fails with progn: Wrong type argument: char-or-string-p, nil. Can I suggest some changes? 1) In our multi-user environment, where several authors are contributing to a master bibtex file, we depend on the key generating algorithm of bibtex-mode to help weed out duplicate entries. This isn't 100% effective, but it catches lots of duplicates and saves us time. Would it be possible to lift this mechanism and use it in org- bibtex to generate the CUSTOM_ID? I've added a new variable `org-bibtex-autogen-keys' which when set to t will result in auto-generated keys being used instead of prompting the user to input such keys. Beautiful! 2) It might be better to use the (generated) key as the Org headline, instead of the title. Titles can be longer than I find comfortable for an Org-mode headline, whereas keys are usually about the right length. Hmm, I would tend to disagree here, but I think it may be a matter of taste. Note that if you include a TITLE property in a headline then it will be used instead of the contents of the headline, leaving you free to put whatever information you want into the headline. I've just updated the headline creation so that it will create such a title property as well as using the title as the headline, leaving you free to subsequently change the headline. That sounds right to me. Thanks. 3) org-bibtex-cite seems like a natural next step, especially if it offers a list of keys in the Org-mode buffer. Meaning a function to allow tab-completion on keys... I could see this being useful but I would imagine that the bib entries would generally not live in the same buffer as the Org-mode text... rather I'd think some sort of global registry would be preferable. I guess it depends on how one uses the software. The use I envision is for note taking while doing background reading for a project. First, enter a reference with org-bibtex-create, then take notes while reading, and finally write a summary that might later be used in the project document. At this stage, org-bibtex hasn't been called, so the only place the key is present is in the Org-mode buffer. Inserting a reference then involves jumping back to the headline, opening the properties drawer, selecting the value of CUSTOM_ID, navigating back to the reference point and pasting in the key. A function that collects keys and then presents them in a list like the one used to choose TYPE would make this process very easy. Do you mind my asking what your workflow is with org-bibtex? All the best, Tom Thanks for the suggestions, bug reports, and examples! Please do let me know if any of these issues remain -- Eric Here are the details of my test run: Existing bibtex entry: @Book{tuggle94:_cultur_resour_naval_air_station_barber_point, author ={H. David Tuggle and M. J. Tomonari-Tuggle and D. Colt Denfeld}, title ={Cultural Resources of Naval Air Station, Barbers Point: Summary, Assessment, and Inventory Research Design: Task 1b: Archaeological Research Services for the Proposed Cleanup, Disposal, and Reuse of Naval Air Station, Barbers Point, O`ahu, Hawai`i}, publisher =iarii, year = 1994, series ={Prepared for Belt Collins Hawaii}, address = {Honolulu}, month = {December}} Org-mode tree: * Schulte bibtex ** A journal title :PROPERTIES: :type: article :AUTHOR: A. N. Author :JOURNAL: Journal of Statistical Software :YEAR: 1998 :CUSTOM_ID: author_10:article :END: ** {Cultural Resources of Naval Air Station, Barbers :PROPERTIES: :TYPE: book :CUSTOM_ID:
[O] [PATCH] Fixed shell script example in Emacs Lisp evaluation of variables.
The variable names in the header arguments and in the sh code didn't line up. Made them agree. --- doc/org.texi |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 17922d4..e68ed18 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -12072,8 +12072,8 @@ org-mode file, while there is no such guarantee for evaluation of the code block body. @example -#+begin_src sh :var file-name=(buffer-file-name) :exports both - wc -w $file +#+begin_src sh :var filename=(buffer-file-name) :exports both + wc -w $filename #+end_src @end example -- 1.7.3.5
[O] Patch for org-babel manual node
There was a bug in an example of argument passing in the org-babel part of the manual. Fixed in the following patch.
[O] [BUG] ORG-LIST-END-MARKER within table.el table
Export the following fragment to html --8---cut here---start-8--- * Another Table.el Table with Spanning +--+--+ | Header 1 | Header 2 | +--+--+ | R1 C1-2 | +--+--+ | R2 C1| R2-3 C2 | + +--+ | | | +--+--+ --8---cut here---end---8--- Examine the temporary buffer that is emitted by `org-export-preprocess-string'. Note that there is a ORG-LIST-END-MARKER within the table.el table. --8---cut here---start-8--- * Another Table.el Table with Spanning +--+--+ | Header 1 | Header 2 | +--+--+ | R1 C1-2 | +--+--+ | R2 C1| R2-3 C2 | + +--+ ORG-LIST-END-MARKER +--+--+ --8---cut here---end---8--- --
Re: [O] [BUG] ORG-LIST-END-MARKER within table.el table
Additional Note: I have a fix for emitting complex table.el tables [1]. The preprocessing bug noted below is coming in the way of my patch. Once this bug is cleared, I can submit my table.el patch for integration. Export the following fragment to html * Another Table.el Table with Spanning +--+--+ | Header 1 | Header 2 | +--+--+ | R1 C1-2 | +--+--+ | R2 C1| R2-3 C2 | + +--+ | | | +--+--+ Examine the temporary buffer that is emitted by `org-export-preprocess-string'. Note that there is a ORG-LIST-END-MARKER within the table.el table. * Another Table.el Table with Spanning +--+--+ | Header 1 | Header 2 | +--+--+ | R1 C1-2 | +--+--+ | R2 C1| R2-3 C2 | + +--+ ORG-LIST-END-MARKER +--+--+ Footnotes: [1] See bug report http://lists.gnu.org/archive/html/emacs-orgmode/2010-12/msg00978.html --
[O] Babel/R: trouble with :units header arg
Hi, Some Babel/R plots that worked a couple of months ago gave an error message on the :units header arg when I tried to run them again now. There could be many reasons (including a computer upgrade in the meantime), but in case it's an Org thing, a minimal example follows below (parabola plot for 8x8cm paper output). I'd appreciate any tips. #+begin_src R :results graphics :file test.png :width 8 :height 8 :res 200 :units cm x - -10:10 y - x^2 plot(x, y, type=l, col=red, lty=1) #+end_src Documentation indicates this should work, but I get: Error in match.arg(units, c(in, px, cm, mm)) : 'arg' must be NULL or a character vector Calls: Anonymous - Anonymous - png - match.arg Execution halted Same if I use single quotes or no quotes around cm. Replacing ~:units cm~ with ~:R-dev-args units=cm~ works: #+begin_src R :results graphics :file test.png :width 8 :height 8 :res 200 :R-dev-args units=cm x - -10:10 y - x^2 plot(x, y, type=l, col=red, lty=1) #+end_src #+results: [[file:test.png]] Yours, Christian
[O] Timesheet from clocking data
Greetings, Given an Org file with clocking data, is there a way to generate a timesheet? This would complement the clock table by focusing on the timings rather than the headings. As I haven’t come across anything like this as yet, I’ll try to give an example (manually-created) to show what I mean, in case someone more familiar with Org can tell me something about it: ,[ Org tree ] | * Foo | :CLOCK: | CLOCK: [2011-04-19 Tue 18:50]--[2011-04-19 Tue 20:30] = 1:40 | CLOCK: [2011-04-18 Mon 20:15]--[2011-04-18 Mon 21:00] = 0:45 | CLOCK: [2011-04-21 Thu 01:03]--[2011-04-21 Thu 02:03] = 1:00 | :END: | CLOCK: [2011-04-19 Tue 12:30]--[2011-04-19 Tue 18:06] = 5:36 | | | *** Bar | :CLOCK: | CLOCK: [2011-04-19 Tue 18:06]--[2011-04-19 Tue 18:50] = 0:44 | CLOCK: [2011-04-22 Fri 01:00]--[2011-04-22 Fri 01:05] = 0:05 | :END: | | *** Baz | :CLOCK: | CLOCK: [2011-04-21 Thu 03:10]--[2011-04-21 Thu 04:00] = 0:50 | :END: ` (Please ignore the very strange timings. I just threw together whatever I could for the sake of the example. :-) The table: #+BEGIN: timesheet :group day :scope subtree :block thisweek Timesheet | Entry| Time| | |--+-+---| | *2011-40-18 Mon* | *00:45* | | | 20:15–21:00 | | 00:45 | | *2011-04-19 Tue* | *08:00* | | | 12:30–20:30 | | 08:00 | | *2011-04-21 Thu* | *01:50* | | | 01:03–02:03 | | 01:00 | | 03:10–04:00 | | 00:50 | | *2011-04-22 Fri* | *01:00* | | | 01:00–01:05 | | 01:05 | |--+-+---| | Total| 11:35 | | #+END: As you can see, each day with any time clocked gets one entry in the table. Underneath that entry are all the non-contiguous blocks of time clocked in during that day. Clocked times from subtrees are summed up and subsumed by their parents, so in the example given, there is one single contiguous block from 12:30 to 20:30 on Tuesday, whereas there are two entries for the non-contiguous blocks on Thursday. I really have no idea where to begin in order to obtain this sort of report, if it is even possible. Any pointers would be most appreciated! Thanks, Aankhen
Re: [O] Timesheet from clocking data
Aankhen aank...@gmail.com writes: Greetings, Given an Org file with clocking data, is there a way to generate a timesheet? This would complement the clock table by focusing on the timings rather than the headings. As I haven’t come across anything like this as yet, I’ll try to give an example (manually-created) to show what I mean, in case someone more familiar with Org can tell me something about it: ,[ Org tree ] | * Foo | :CLOCK: | CLOCK: [2011-04-19 Tue 18:50]--[2011-04-19 Tue 20:30] = 1:40 | CLOCK: [2011-04-18 Mon 20:15]--[2011-04-18 Mon 21:00] = 0:45 | CLOCK: [2011-04-21 Thu 01:03]--[2011-04-21 Thu 02:03] = 1:00 | :END: | CLOCK: [2011-04-19 Tue 12:30]--[2011-04-19 Tue 18:06] = 5:36 | | | *** Bar | :CLOCK: | CLOCK: [2011-04-19 Tue 18:06]--[2011-04-19 Tue 18:50] = 0:44 | CLOCK: [2011-04-22 Fri 01:00]--[2011-04-22 Fri 01:05] = 0:05 | :END: | | *** Baz | :CLOCK: | CLOCK: [2011-04-21 Thu 03:10]--[2011-04-21 Thu 04:00] = 0:50 | :END: ` (Please ignore the very strange timings. I just threw together whatever I could for the sake of the example. :-) The table: #+BEGIN: timesheet :group day :scope subtree :block thisweek Timesheet | Entry| Time| | |--+-+---| | *2011-40-18 Mon* | *00:45* | | | 20:15–21:00 | | 00:45 | | *2011-04-19 Tue* | *08:00* | | | 12:30–20:30 | | 08:00 | | *2011-04-21 Thu* | *01:50* | | | 01:03–02:03 | | 01:00 | | 03:10–04:00 | | 00:50 | | *2011-04-22 Fri* | *01:00* | | | 01:00–01:05 | | 01:05 | |--+-+---| | Total| 11:35 | | #+END: As you can see, each day with any time clocked gets one entry in the table. Underneath that entry are all the non-contiguous blocks of time clocked in during that day. Clocked times from subtrees are summed up and subsumed by their parents, so in the example given, there is one single contiguous block from 12:30 to 20:30 on Tuesday, whereas there are two entries for the non-contiguous blocks on Thursday. I really have no idea where to begin in order to obtain this sort of report, if it is even possible. Any pointers would be most appreciated! Hi Aankhen, There is no functionality that produces the table in your timesheet example that I am aware of. Personally I use the agenda view with log mode enabled for clock lines and limited to some interesting tags and a summary report with C-u R. I then manually transfer the data to another system for timesheet reporting. I just visit each day in the timesheet range to get the details I want. You can generate daily reports with something like this #+BEGIN: clocktable :maxlevel 2 :scope agenda :fileskip0 t :step day :block thisweek #+END: which gives a separate table per day but it doesn't include the time details. Regards, Bernt
[O] [patch] make 'org-save-outline-visibility' return a useful value
The macro 'org-save-outline-visibility' in org-macs.el seems like it should return the value of the last statement in its body (like save-excursion and save-restriction do). Instead it discards this value and returns nothing useful. The macro is only used in 2 places in the org sources, and its return value is ignored in both. I feel it would be more useful if it returned the value of the last expression in its body. A patch to this effect is attached. Paul --- C:/Users/paul/org-macs.el Fri Apr 22 14:57:07 2011 +++ C:/Users/paul/org-macs-new.el Fri Apr 22 14:56:51 2011 @@ -325,8 +325,9 @@ (declare (indent 1)) `(let ((data (org-outline-overlay-data ,use-markers))) (unwind-protect +(prog1 (progn - ,@body + ,@body) (org-set-outline-overlay-data data)) (when ,use-markers (mapc (lambda (c)