[Orgmode] Re: Fix typo in org-find-exact-headling-in-buffer
Jambunathan K kjambunat...@gmail.com writes: Still thinkling but have no inkling about headling. Jambunathan K. From a49dcabccf5d4589d553115d7ce8a648ab4328f2 Mon Sep 17 00:00:00 2001 From: Jambunathan K kjambunat...@gmail.com Date: Tue, 24 Aug 2010 03:05:04 +0530 Subject: [PATCH] Fix typo in org-find-exact-headling-in-buffer * lisp/org.el (org-find-exact-heading-in-buffer): Renamed from org-find-exact-headling-in-buffer. * contrib/lisp/org-wikinodes.el (org-wikinodes-follow-link): Fix typo in org-find-exact-headling-in-buffer TINYCHANGE. --- contrib/lisp/org-wikinodes.el |6 +++--- lisp/org.el |4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/lisp/org-wikinodes.el b/contrib/lisp/org-wikinodes.el index 0a00052..e07a8e4 100644 --- a/contrib/lisp/org-wikinodes.el +++ b/contrib/lisp/org-wikinodes.el @@ -119,10 +119,10 @@ setting of `org-wikinodes-create-targets'. (let ((create org-wikinodes-create-targets) visiting buffer m pos file rpl) (setq pos - (or (org-find-exact-headling-in-buffer target (current-buffer)) + (or (org-find-exact-heading-in-buffer target (current-buffer)) (and (eq org-wikinodes-scope 'directory) (setq file (org-wikinodes-which-file target)) -(org-find-exact-headling-in-buffer +(org-find-exact-heading-in-buffer target (or (get-file-buffer file) (find-file-noselect file)) (if pos @@ -288,7 +288,7 @@ with working links. (delete-region (match-beginning 0) (match-end 0)) (save-match-data (cond - ((org-find-exact-headling-in-buffer link (current-buffer)) + ((org-find-exact-heading-in-buffer link (current-buffer)) ;; Found in current buffer (insert (format [[#%s][%s]] link link))) ((eq org-wikinodes-scope 'file) diff --git a/lisp/org.el b/lisp/org.el index 15379ef..134ac56 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -14033,7 +14033,7 @@ only headings. (when (org-on-heading-p) (move-marker (make-marker) (point -(defun org-find-exact-headling-in-buffer (heading optional buffer pos-only) +(defun org-find-exact-heading-in-buffer (heading optional buffer pos-only) Find node HEADING in BUFFER. Return a marker to the heading if it was found, or nil if not. If POS-ONLY is set, return just the position instead of a marker. @@ -14064,7 +14064,7 @@ When the target headline is found, return a marker to this location. (message trying %s file) (setq visiting (org-find-base-buffer-visiting file)) (setq buffer (or visiting (find-file-noselect file))) -(setq m (org-find-exact-headling-in-buffer +(setq m (org-find-exact-heading-in-buffer heading buffer)) (when (and (not m) (not visiting)) (kill-buffer buffer)) (and m (throw 'found m)) It might not be a typo. Looks like deliberate. Thanks Noorul ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] file+olp problem in org-capture.
Hi, first, am i right i assuming that the file+olp is designed so that i can specify the top of a tree, and the headings in the tree i want to be able to capture to? That is what i am trying to do with the 1 option. It does not evaluate the concat operation and so fails. ;; constant used in lots of other things. (defconst toc:ze-org-dir ~/org/) ;; example org template (setq org-capture-templates '( ;; works ;; (file+headline path/to/file node headline) (0 0+inbox entry (file+headline (concat toc:ze-org-dir 0+inbox.org) +INBOX) * %? \n) ;; does not work ;; (file+olp path/to/file Level 1 heading Level 2 ...) (1 1+projects entry (file+olp (concat toc:ze-org-dir 1+projects.org) +TASKS +PROJECTS) * ))) Tim. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] From state table to state diagram
Check out graphic. I imagine it would be straightforward to integrate this via babel if it hasn't already been done. Gary orgm...@garydjones.name wrote: I know there are already features in orgmode to create tables and to generate images from text diagrams (via ditaa). It is also possible, theoretically speaking, to convert from a state table representing a state machine to a diagram. Does anything exist, either in orgmode or externally, to do the latter (esp. to text diagrams)? I haven't been able to find anything. -- Gary Please do NOT send me courtesy replies off-list. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Mark your Calendars: Carsten will be on the FLOSS Weekly
On Aug 22, 2010, at 4:35 PM, Anupam Sengupta wrote: Hello fellow Org-mode users, Carsten is going to be the guest on the FLOSS weekly podcast on 22nd September. Link to the show: http://www.twit.tv/floss Carsten, Looking forward to the show! Me too - I am really looking forward to this. If anyone has specific ideas about what would be particularly useful to cover for this audience, let me know. - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] From state table to state diagram
Sorry, that should have been graphviz... typing on a phone. :-( Eric S Fraga ucec...@ucl.ac.uk wrote: Check out graphic. I imagine it would be straightforward to integrate this via babel if it hasn't already been done. Gary orgm...@garydjones.name wrote: I know there are already features in orgmode to create tables and to generate images from text diagrams (via ditaa). It is also possible, theoretically speaking, to convert from a state table representing a state machine to a diagram. Does anything exist, either in orgmode or externally, to do the latter (esp. to text diagrams)? I haven't been able to find anything. -- Gary Please do NOT send me courtesy replies off-list. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] file+olp problem in org-capture.
Tim, I ran into the exact same issue yesterday, in fact, our examples are almost identical! Here is the reply I received from David. http://www.mail-archive.com/emacs-orgmode@gnu.org/msg29029.html I didn't tried his solution yet, but it should work. On 08/24/2010 03:16 AM, Tim O'Callaghan wrote: Hi, first, am i right i assuming that the file+olp is designed so that i can specify the top of a tree, and the headings in the tree i want to be able to capture to? That is what i am trying to do with the 1 option. It does not evaluate the concat operation and so fails. ;; constant used in lots of other things. (defconst toc:ze-org-dir ~/org/) ;; example org template (setq org-capture-templates '( ;; works ;; (file+headline path/to/file node headline) (0 0+inbox entry (file+headline (concat toc:ze-org-dir 0+inbox.org) +INBOX) * %? \n) ;; does not work ;; (file+olp path/to/file Level 1 heading Level 2 ...) (1 1+projects entry (file+olp (concat toc:ze-org-dir 1+projects.org) +TASKS +PROJECTS) * ))) Tim. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: How to customize the org-mode's BEGIN_SRC HTML output
Hi, I also was interested in posting these blocks (through org2blog in wordpress). The code I posted below is added to 'org-export-preprocess-hooks' where it looks for BEGIN_SRC blocks as well as ':' blocks of code. In the case of BEGIN_SRC blocks, I add a header option, :syntaxhl where I can pass in additional settings to the syntaxhighlighter code. The code below uses Wordpress shortcodes, but I am sure that you can adapt for your own purposes. (defun bnb/org2blog-src-blocks-to-wp-syntaxhighlighter () Export #+BEGIN_SRC blocks as Wordpress Syntaxhighlighter tags. There is a special header option, :syntaxhl that contains the options to pass to syntaxhighlighter. This is intended to be added to `org-export-preprocess-hooks' (interactive) (save-window-excursion (let ((case-fold-search t) (colon-re ^[ \t]*:\\([ \t]\\|$\\)) lang body headers syntaxhl beg) (goto-char (point-min)) (while (re-search-forward colon-re nil t) (replace-match (match-string 1)) (beginning-of-line 1) (insert [text light=\true\]\n) (setq beg (point)) (while (looking-at colon-re) (replace-match (match-string 1)) (end-of-line 1) (or (eobp) (forward-char 1))) (end-of-line 1) (add-text-properties beg (if (bolp) (1- (point)) (point)) '(org-protected t)) (insert \n[/text])) (unless (boundp 'org-babel-src-block-regexp) (require 'ob)) (while (re-search-forward (concat \\( org-babel-src-block-regexp \\| org-babel-inline-src-block-regexp \\)) nil t) (setq lang (match-string-no-properties 3)) (if (string-match - lang) (error SyntaxHighlighter does not support languages with '-' in the names)) (setq headers (match-string-no-properties 5)) (setq body (match-string-no-properties 6)) (save-match-data (setq syntaxhl (if (string-match :syntaxhl[ ]+\\([^ ]+\\) headers) (concat (replace-regexp-in-string \; (match-string 1 headers)) (replace-match (concat \n\n[ lang syntaxhl ]\n body [/ lang ]\n) nil t) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] file+olp problem in org-capture.
Hi everyone, this begins to smell like it should be a FAQ entry :) - Carsten On Aug 24, 2010, at 2:58 PM, Erik Iverson wrote: Tim, I ran into the exact same issue yesterday, in fact, our examples are almost identical! Here is the reply I received from David. http://www.mail-archive.com/emacs-orgmode@gnu.org/msg29029.html I didn't tried his solution yet, but it should work. On 08/24/2010 03:16 AM, Tim O'Callaghan wrote: Hi, first, am i right i assuming that the file+olp is designed so that i can specify the top of a tree, and the headings in the tree i want to be able to capture to? That is what i am trying to do with the 1 option. It does not evaluate the concat operation and so fails. ;; constant used in lots of other things. (defconst toc:ze-org-dir ~/org/) ;; example org template (setq org-capture-templates '( ;; works ;; (file+headline path/to/file node headline) (0 0+inbox entry (file+headline (concat toc:ze-org-dir 0+inbox.org) +INBOX) * %? \n) ;; does not work ;; (file+olp path/to/file Level 1 heading Level 2 ...) (1 1+projects entry (file+olp (concat toc:ze-org-dir 1+projects.org) +TASKS +PROJECTS) * ))) Tim. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [babel] No org-babel-execute function for R! after update
Graham, You need to setup the variable org-babel-do-load-languages as in the following: http://orgmode.org/org.html#Languages On 08/24/2010 03:24 AM, Graham Smith wrote: I have been away from emacs/org/babel for a coupe of months and I have just updated the Emacs starter kit for orgmode (http://github.com/eschulte/emacs-starter-kit.git) with the commands : git pull : git submodule update I now get the error No org-babel-execute function for R! when I try to execute code. All was working before the upgrade, and as usual I don't know where to start. I don't have an .emacs file since changing to the starter kit, only an .org file, which used to have code to initiate Babel and R, but I took them out after babel became integrated into Orgmode. Its now Org-mode version 6.36trans (release_7.01h.94.g25ac) Emacs GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-03-29 on rothera, modified by Debian Copyright (C) 2009 Free Software Foundation, Inc. running on Ubuntu 10.04 Many thanks, Graham ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [babel] No org-babel-execute function for R! after update
Erik You need to setup the variable org-babel-do-load-languages as in the following: http://orgmode.org/org.html#Languages So I see, this has obviously changed as it was working without this before. BUT all working now, so thanks. Graham ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [babel] No org-babel-execute function for R! after update
On 08/24/2010 09:06 AM, Graham Smith wrote: Erik You need to setup the variable org-babel-do-load-languages as in the following: http://orgmode.org/org.html#Languages So I see, this has obviously changed as it was working without this before. BUT all working now, so thanks. Great, see http://eschulte.github.com/babel-dev/DONE-document-configuration-changes-for-Babel-integration.html for a description of why/when this done. --Erik Graham ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [babel] No org-babel-execute function for R! after update
Erik, Great, see http://eschulte.github.com/babel-dev/DONE-document-configuration-changes-for-Babel-integration.html for a description of why/when this done. Thanks, very useful. Graham ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] mathjax HTML export question
On 08/23/2010 08:12 PM, Erik Iverson wrote: Is there something that I'm missing, or that could be better with a local installation of MathJax? I don't know what reverts to image fonts in Firefox means, but whatever is happening on my export seems to look nice. Hi Erik, when MathJax cannot use its custom math fonts, it replaces each character with a pre-rendered image (I think it has each character available in a handful of different sizes). At normal font sizes, the disadvantages of image fonts are not that noticeable to me (except that math symbols in links appear black instead of blue, because the images are only available in black). The main disadvantage is that font quality degrades when you zoom in. I have not tested if one can notice a difference when printing (theoretically, real fonts will look better, because the printer has a higher resolution). In the context of Static MathJax, the disadvantage is that the script cannot embed image fonts into HTML files, which is why I mentioned this in my email. The change to .htaccess had certainly not happened when I announced Static MathJax, as I used the installation at orgmode.org for testing. Best regards, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] mathjax HTML export question
Jan Böcker wrote: On 08/23/2010 08:12 PM, Erik Iverson wrote: Is there something that I'm missing, or that could be better with a local installation of MathJax? I don't know what reverts to image fonts in Firefox means, but whatever is happening on my export seems to look nice. Hi Erik, when MathJax cannot use its custom math fonts, it replaces each character with a pre-rendered image (I think it has each character available in a handful of different sizes). At normal font sizes, the disadvantages of image fonts are not that noticeable to me (except that math symbols in links appear black instead of blue, because the images are only available in black). The main disadvantage is that font quality degrades when you zoom in. I have not tested if one can notice a difference when printing (theoretically, real fonts will look better, because the printer has a higher resolution). Thank you for the explanation. By comparing with the demos on mathjax.org, I am indeed able to see what is meant by image fonts. I was able to use the 'real' fonts by installing a local copy of MathJax as the MathJax FAQ indicates. In the context of Static MathJax, the disadvantage is that the script cannot embed image fonts into HTML files, which is why I mentioned this in my email. I have not tried out static mathjax, but it looks interesting! Thanks again! The change to .htaccess had certainly not happened when I announced Static MathJax, as I used the installation at orgmode.org for testing. Best regards, Jan ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Bug: habit: better error handling required [TAG=7.01g]
Hi org-mode people, Whilst playing with the shaving example from http://orgmode.org/manual/Tracking-your-habits.html I accidentally put a bad character in the SCHEDULED timestamp. Instead of: SCHEDULED: 2010-08-26 Thu .+2d/4d I had: SCHEDULED: 2010-08-26 Thu .+2nd/4d When trying to view my agenda, I was presented with a blank agenda and Emacs very quietly reported: org-habit-duration-to-days: Wrong type argument: stringp, nil which is not really helpful. Removing the bad character fixes the issue, and I can duplicate the error condition as described above. Perhaps some better error trapping could be done? Regards, Paul. Emacs : GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-05-16 on raven, modified by Debian Package: Org-mode version TAG=7.01g current state: == (setq org-log-done 'time org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-agenda-files '(~/emacs/GTD/birthdays.org ~/emacs/GTD/gtd.org ~/emacs/GTD/various-org-mode-demos.org) org-agenda-include-diary t org-babel-load-languages '((python . t) (emacs-lisp . t)) org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current) org-babel-tangle-lang-exts '((python . py) (emacs-lisp . el)) org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup) org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-preprocess-hook '(org-export-blocks-preprocess) org-agenda-diary-file ~/emacs/GTD/gtd.org org-tab-first-hook '(org-hide-block-toggle-maybe org-babel-hide-result-toggle-maybe) org-src-mode-hook '(org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-export-first-hook '(org-beamer-initialize-open-trackers) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-default-notes-file ~/emacs/GTD/notes.org org-directory ~/emacs/GTD/ org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-mode-hook '(#[nil \300\301\302\303\304$\207 [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil \300\301\302\303\304$\207 [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-agenda-ndays 1 org-refile-targets '((gtd.org :level . 1)) org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe org-babel-hash-at-point org-babel-execute-src-block-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks)) org-occur-hook '(org-first-headline-recenter) org-from-is-user-regexp \\Paul\\ org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-modules '(org-bbdb org-bibtex org-docview org-gnus org-info org-jsinfo org-habit org-irc org-mew org-mhe org-protocol org-rmail org-vm org-wl org-w3m) org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-metadown-hook '(org-babel-pop-to-session-maybe) org-export-blocks '((src org-babel-exp-src-blocks nil) (comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) ) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] properties in agenda prefix
On Thu, Aug 19, 2010 at 2:46 AM, Jan Böcker jan.boec...@jboecker.de wrote: Look at 7.5.3 Capturing column view in the manual, it provides a solution to the column view is not printable problem. I can use column mode in the agenda, which is very useful because it can display properties. I know I can capture columns in a dynamic block within my org file. But is it possible to similarly capture columns for a filtered agenda? If so, I don't know how. This would solve my problem. If you do not need the agenda's sophisticated filtering abilities, this may already work for you. I would prefer an agenda mode that allowed both filtering on properties and display of those properties, just as tags work. If I have a list that has a color property, I can make an agenda that only displays red and green items. But nowhere in the list (apart from column mode) can I display which items are red and which are green. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: From state table to state diagram
On Tue, 24 Aug 2010 14:06:32 +0200, Gary orgm...@garydjones.name wrote: Eric S Fraga wrote: Sorry, that should have been graphviz... typing on a phone. :-( :)) Okay, thanks. I know about graphviz, but it is not really what I am looking for. Ideally I would create a state transition table and then just magically get a diagram as a by-product. I can definitely see that the DOT language might be a good target though - generating that from a table should be easier than generating a diagram directly. Yes, that is what I was thinking (but did not want to type on the little on-screen keyboard of my phone...) when I suggested graphviz: dot could be a good intermediate language. Well, maybe it's a bit specific and nobody has done anything so I should look into it on my own :) It is indeed specific but I think there would be some interest in what you manage to concoct so please post it here! If I were to have time to do this right now, I would probably use awk to convert a state transition table to a dot graph representation but only because I'm very comfortable with awk and much less so with emacs lisp... And the ease will depend on the type of transition table you have as the starting point, of course... As an aside, when it comes to actually generating a diagram, I would in practive typically use tikz due to the quality of the graphs that can be achieved. However, it may be harder to do a table \to tikz translation automatically. -- Eric S Fraga GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [For Worg?] Gnuplot unevenly spaced non-numeric data plot?
Hi John, Nick Dokos nicholas.do...@hp.com writes: John Hendy jw.he...@gmail.com wrote: Alright Nick, careful what you wish for :) For anyone else who could use this or do something with it: - Over the weekend I figured out a bunch of stuff with gnuplot - I modified what I found to make it generic and wrote it up in an org file - The org file, resultant pics (eps), converted pngs, and exported html/pdf are in the attached .zip I haven't read it in complete detail yet, but so far it looks very nice. Much more extensive and detailed than I expected (that's a Good Thing!) Let me know if this can be useful for worg. I think so. I Certainly agree! This does look like Worg material. We're trying to beef up example heavy language specific pages for each language supported by Babel. This material you've compiled sounds like an ideal base for the gnuplot page. If you're willing/able to integrate this information into such a Worg page that would be fantastic, and I'd be very happy to help, I've just stubbed out the beginning of a gnuplot page on Worg which could hold your compiled instructions and examples. it should propagate to http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.php within the next two hours or so Cheers -- Eric ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: From state table to state diagram
Babel does support generating diagrams with graphviz via dot code blocks. Babel is also capable of converting Org-mode tables to list objects in a number of languages, so I'd recommend writing a table-dot script in your favorite language, and then using babel to handle the coordination and Org-mode integration. I'm happy to help in this regard, the first step would be something like the following example which assumes python is your preferred scripting language (as you can see I have no idea what your state table may look like)... --8---cut here---start-8--- #+results: state-table | 1 | 2 | | 3 | 4 | #+source: table-to-dot #+begin_src python :var table=state-table python code here #+end_src #+begin_src dot :var text=table-to-dot(table=state-table) graph{ $text } #+end_src --8---cut here---end---8--- Once this is working I think it could make a great addition to the library of babel [1] (a collection of generally useful code blocks). Cheers -- Eric Gary orgm...@garydjones.name writes: Eric S Fraga wrote: Sorry, that should have been graphviz... typing on a phone. :-( :)) Okay, thanks. I know about graphviz, but it is not really what I am looking for. Ideally I would create a state transition table and then just magically get a diagram as a by-product. I can definitely see that the DOT language might be a good target though - generating that from a table should be easier than generating a diagram directly. Well, maybe it's a bit specific and nobody has done anything so I should look into it on my own :) Footnotes: [1] http://orgmode.org/worg/org-contrib/babel/library-of-babel.php ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [For Worg?] Gnuplot unevenly spaced non-numeric data plot?
On Wed, Aug 25, 2010 at 12:32 AM, Eric Schulte schulte.e...@gmail.comwrote: Hi John, Nick Dokos nicholas.do...@hp.com writes: John Hendy jw.he...@gmail.com wrote: Alright Nick, careful what you wish for :) For anyone else who could use this or do something with it: - Over the weekend I figured out a bunch of stuff with gnuplot - I modified what I found to make it generic and wrote it up in an org file - The org file, resultant pics (eps), converted pngs, and exported html/pdf are in the attached .zip I haven't read it in complete detail yet, but so far it looks very nice. Much more extensive and detailed than I expected (that's a Good Thing!) Let me know if this can be useful for worg. I think so. I Certainly agree! This does look like Worg material. We're trying to beef up example heavy language specific pages for each language supported by Babel. This material you've compiled sounds like an ideal base for the gnuplot page. If you're willing/able to integrate this information into such a Worg page that would be fantastic, and I'd be very happy to help, I've just stubbed out the beginning of a gnuplot page on Worg which could hold your compiled instructions and examples. Cool -- I'm game. What exactly is required? Can my generated html just be plopped in or should I revise anything? If there's an example page we're modeling after I can rearrange the pieces to match that? I'm up for pretty much anything. I'm glad it will make it to a useful place! I've no familiarity with how to add to word so I'll definitely need some assistance. I see the stub page, btw. Best regards, John it should propagate to http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.php within the next two hours or so Cheers -- Eric ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Eliminate line breaks in html
Just tying up loose ends on this... Tim Burt was kind enough to go offline with me for a while on this, but I realized I should put my final solution out there. There is an option in blogger to post in raw html, so for those just starting, that's an option. Just C-u C-c C-e C-R and paste into blogger. I already had some 30 posts and re-doing them would have been awful. Here's what I ended up doing: - write up post in org-mode - highlight region - C-u C-c C-e C-R - new file and yank the html - write the file as export.txt - in a terminal run: perl -pi -e ' s/\R//g; s/\p\//g; s/\\/p\/\n\n/g;' export.txt --- This removes the begin paragraph tag and replaces the end paragraph tag with some new-line characters. - refresh export.txt - copy the whole buffer and then paste into blogger Paragraph beginnings have two spaces that I go through and delete and since I also write to export to LaTeX I use \quote and need to go through and change them to blockquote/blockquote where necessary. I obviously also have to clean up LaTeX only stuff... It's hardly any work and I can live with it, especially since I get the power of org-mode for writing things up along with it's mutli-faceted export capabilities *and* the fact that I have the file with me rather than just on blogger. For what its worth, perhaps someone can gain from this! John It's been working great and On Wed, Jul 28, 2010 at 1:48 PM, John Hendy jw.he...@gmail.com wrote: @ Giovanni: the manual says \n:nil does not work. I played around with it anyway but was unsuccessful. Bummer as it seemed like it would have been perfect... @ TIm, I am aware of this option and it's what I was referencing in the original note with: I could resort to explicit html every time I post (requiring br \ for every line break) but this would also require fixing all pre-existing posts which is pretty much not an option. But what about my point that currently all my posts do not use this? When I experimented with this option yesterday it turned old posts into huge run-on paragraphs with no structure, hence I don't really think it's an option unless I re-edit every post. Going forward, it'd be easier to somehow get rid of line breaks... though maybe I should just write my own template or something. I don't really use p in my posts anyway but prefer the single line space created by just on br \. I dunno -- any thoughts? Should I re-do like 30 posts for this? Is there any other way? Thanks for the help, all. John On Wed, Jul 28, 2010 at 5:30 AM, Tim Burt tcb...@rochester.rr.com wrote: John Hendy jw.he...@gmail.com writes: I use org for exporting to html and then pasting into blogger I use this process also for Blogger ... but every time I do I need to delete line breaks. ... but I do not need to delete line breaks. See http://naturallogofx.rketburt.org/2010/07/linebreaks-blogger-and-org-mode.html for an article that describes what I do. The fix for me was in the Blogger settings, not anything in emacs. Is there a way to get org to just publish the blob without breaking lines every time? I do not know how to prevent line breaks in the export, but nor have I needed to do that. I'm guessing it has to do with my minor fill mode as the line breaks tend to be the same as they are in org. In typical export, everything is surrounded by html tags but in blogger on doesn't have these and thus line breaks are line breaks. The article reference above indicates how to stop Blogger from presenting an input linebreak (e.g. newline character) as an output linebreak. I could resort to explicit html every time I post (requiring br \ for every line break) but this would also require fixing all pre-existing posts which is pretty much not an option. Any idea what I could do? Let me know if the article reference does not help solve the issue. Tim Thanks, John ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [For Worg?] Gnuplot unevenly spaced non-numeric data plot?
John Hendy jw.he...@gmail.com writes: [...] Cool -- I'm game. That's Great. What exactly is required? Can my generated html just be plopped in or should I revise anything? If there's an example page we're modeling after I can rearrange the pieces to match that? Whatever you think is best. Other language pages are linked to from the table at http://orgmode.org/worg/org-contrib/babel/languages.php#langs, so they could serve as a model. I'm up for pretty much anything. I'm glad it will make it to a useful place! I've no familiarity with how to add to word so I'll definitely need some assistance. Worg is a git repository of org-mode files which are exported to html to generate the resulting Worg web page. To contribute you clone the git repository, edit the org-mode files, and commit your changes. See http://orgmode.org/worg/worg-about.php for more information about Worg, and specific instructions about how to contribute. I see the stub page, btw. Wonderful. Thanks -- Eric Best regards, John it should propagate to http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.php within the next two hours or so Cheers -- Eric ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: How to customize the org-mode's BEGIN_SRC HTML output
Rafael, I had my shortcodes setup to accept the language directly. Your change should work as you indicated. I have an additional fix to my code that should behave better for you. I add a property, org-protected, that prevents processing of the text. I tried it on your code blocks by calling org-export directly (C-c C-e) and then choosing 'H' to see the html in a buffer. This really helps with debug. Fixed code follows (defun bnb/org2blog-src-blocks-to-wp-syntaxhighlighter () Export #+BEGIN_SRC blocks as Wordpress Syntaxhighlighter tags. There is a special header option, :syntaxhl that contains the options to pass to syntaxhighlighter. This is intended to be added to `org-export-preprocess-hooks' (interactive) (save-window-excursion (let ((case-fold-search t) (colon-re ^[ \t]*:\\([ \t]\\|$\\)) lang body headers syntaxhl block beg) (goto-char (point-min)) (while (re-search-forward colon-re nil t) (replace-match (match-string 1)) (beginning-of-line 1) (insert [text light=\true\]\n) (setq beg (point)) (while (looking-at colon-re) (replace-match (match-string 1)) (end-of-line 1) (or (eobp) (forward-char 1))) (end-of-line 1) (add-text-properties beg (if (bolp) (1- (point)) (point)) '(org-protected t)) (insert \n[/text])) (unless (boundp 'org-babel-src-block-regexp) (require 'ob)) (while (re-search-forward (concat \\( org-babel-src-block-regexp \\| org-babel-inline-src-block-regexp \\)) nil t) (setq lang (match-string-no-properties 3)) (if (string-match - lang) (error SyntaxHighlighter does not support languages with '-' in the names)) (setq headers (match-string-no-properties 5)) (setq body (match-string-no-properties 6)) (save-match-data (setq syntaxhl (if (string-match :syntaxhl[ ]+\\([^ ]+\\) headers) (concat (replace-regexp-in-string \; (match-string 1 headers)) (setq block (concat \n\n[ lang syntaxhl ]\n body [/ lang ]\n)) (add-text-properties 0 (length block) '(org-protected t) block) (replace-match block nil t) -- I also remembered that I made the following setting as well, but I do not know if I still need it. (setq org-export-preprocess-hook (list 'bnb/org2blog-src-blocks-to-wp-syntaxhighlighter 'org-export-blocks-preprocess)) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode