Re: [Orgmode] turn off inclusion of JavaScript helper code?
Dear Sebastian, On 21.04.2010, at 00:22, Sebastian Rose wrote: You can turn the inclusion off in your `org-export-projects-alist': :style-include-scripts nil [...] :style-include-default nil solves my problem beautifully - thank you! Warm regards, Stefan -- Dr. Stefan Vollmar, Dipl.-Phys. Head of IT group Max-Planck-Institut für neurologische Forschung Gleuelerstr. 50, 50931 Köln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: voll...@nf.mpg.de http://www.nf.mpg.de smime.p7s Description: S/MIME cryptographic signature ___ 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] [Patch] M-Right and M-Left behave differently on headings and list items
Hello Carsten and others, If you are calling for more consistency, maybe this feature should go as well? I do not have a strong opinion on this. In (my) day-to-day use of org-mode, cases in which the difference between having a lock or not matters rarely do occur. If consistency here is important, then it seems more sensible to me to have the lock for headings as well, instead of removing it for list items. When I grab a chunk of text to move back and forth, I do not expect it to suddenly get hands and grab other pieces of text :-) I've discovered a bug in my patch today: M-Right and M-Left on collapsed items take the complete subtree. On collapsed headings they only take the current heading. I'm not sure what would be the desired behaviour here... Kind Regards, Matti On Wed, Apr 21, 2010 at 3:54 PM, Carsten Dominik carsten.domi...@gmail.com wrote: On Apr 21, 2010, at 3:32 PM, Bastien wrote: Carsten Dominik carsten.domi...@gmail.com writes: do others agree with Matti's view? FWIW, I do. There is still another difference. Currently, when I execute the indentation command several times in a row, the range to which this applies is locked. So for example - level 1a - level 2a - level 2b - level 2c - level 1b If I now go on level 1a and use M-S-left, level 1b becomes a sibling of 2c. If I immediately after this do M-S-right, 1b should be indented along with 2c, but this does not happen because the item range is locked. If, however, you do something in between, like moving the cursor by one character, 1b will be included. I believe I did this a long time ago, because I felt that not locking the range for commands in direct succession would too quickly modify the structure, including at places outside of the current view ( beyond the window end) If you are calling for more consistency, maybe this feature should go as well? - 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
[Orgmode] Redefining M-tab
Hallo, I want to globally use M-tab to cycle between buffers (using a function by Xah Lee). It works fine except when in Org-mode where this key is bound to org-complete in org.el. I have tried: (add-hook 'org-mode-hook (lambda () (define-key org-mode-map [(meta tab)] 'previous-user-buffer))) unfortunately, the original Org-mode setting prevails. What is going wrong? Many thanks in advance. Warm regards, Stefan -- Dr. Stefan Vollmar, Dipl.-Phys. Head of IT group Max-Planck-Institut für neurologische Forschung Gleuelerstr. 50, 50931 Köln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: voll...@nf.mpg.de http://www.nf.mpg.de smime.p7s Description: S/MIME cryptographic signature ___ 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
Fwd: [Orgmode] Redefining M-tab
Dear all, my snippet does work as it should, I had tried it on an already open Org-mode buffer in which case org-mode-hook is not called again (I think) - after restarting Emacs now everything works fine. Sorry for the noise. Warm regards, Stefan Begin forwarded message: From: Stefan Vollmar voll...@nf.mpg.de Date: 22. April 2010 09:45:13 MESZ To: mailing-list-org-mode Mode emacs-orgmode@gnu.org Subject: [Orgmode] Redefining M-tab Hallo, I want to globally use M-tab to cycle between buffers (using a function by Xah Lee). It works fine except when in Org-mode where this key is bound to org-complete in org.el. I have tried: (add-hook 'org-mode-hook (lambda () (define-key org-mode-map [(meta tab)] 'previous-user-buffer))) unfortunately, the original Org-mode setting prevails. What is going wrong? Many thanks in advance. Warm regards, Stefan -- Dr. Stefan Vollmar, Dipl.-Phys. Head of IT group Max-Planck-Institut für neurologische Forschung Gleuelerstr. 50, 50931 Köln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: voll...@nf.mpg.de http://www.nf.mpg.de ___ 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 -- Dr. Stefan Vollmar, Dipl.-Phys. Head of IT group Max-Planck-Institut für neurologische Forschung Gleuelerstr. 50, 50931 Köln, Germany Tel.: +49-221-4726-213 FAX +49-221-4726-298 Tel.: +49-221-478-5713 Mobile: 0160-93874279 Email: voll...@nf.mpg.de http://www.nf.mpg.de smime.p7s Description: S/MIME cryptographic signature ___ 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: [Android] [Orgmode] Force close with MobileOrg Android 0.2_alpha and development snapshot
Hi! Matthew Jones schrieb: Looks like this might be a bug trying to write your files out to subdirectories it looks like I'm not trying to create the subdirectories. If you put your files in just the root directory does that work for you? I simply deleted the subdirectories from the remote staging area (along with their mentions in index.org) and then I could sync them with 0.2 alpha and the snapshot could read them. Just for some feedback: I think the most useful features for me would be: - handling of directories, obviously :) - some kind of agenda view - a tag-todo view, based on Location or user choice (I'm at the supermarket, let's pull up the shopping list) - fast capturing + sync Kind regards Friedel -- Friedrich Delgado Friedrichs frie...@nomaden.org TauPan on Ircnet and Freenode ;) ___ 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] [patch] Terminating lists by indentation of #+SPECIALS too
Hi Sebastian, thanks or your patience - I have now aplied this patch. You are saying that your files mostly validate. Are there issues we should address? Thanks! - Carsten On Apr 22, 2010, at 3:26 AM, Sebastian Rose wrote: Carsten Dominik carsten.domi...@gmail.com writes: Hi Sebastion, sorry for being hard to satisfy on this one. What I mean is this: The location where your patck kicks in looks like this: (org-export-html-close-lists-maybe line) ;; Protected HTML (when (get-text-property 0 'org-protected line) (let (par (ind (get-text-property 0 'original-indentation line))) (when (re-search-backward \\(p\\)\\([ \t\r\n]*\\)\\= (- (point) 100) t) (setq par (match-string 1)) (replace-match \\2\n)) (insert line \n) So before we are looking at protected stuff, there is already a call to org-export-html-close-lists-maybe. It seems to me that what you are trying to do could just happen inside that function. The function checks for a text property 'original-indentation to check for special stuff that was indented - but apparently that does not cover your case. So in that function you could also look at the protected property and act accordingly. Does that make sense? Ah, now I got you here! You're feeling for the code is all to good :) I could indeed remove more than half of the lines. So here comes the next generation: diff --git a/lisp/org-html.el b/lisp/org-html.el index 0903bff..5b13649 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -959,10 +959,12 @@ lang=\%s\ xml:lang=\%s\ (when (equal ORG-VERSE-START line) (org-close-par-maybe) (insert \np class=\verse\\n) +(setq org-par-open t) (setq inverse t) (throw 'nextline nil)) (when (equal ORG-VERSE-END line) (insert /p\n) +(setq org-par-open nil) (org-open-par) (setq inverse nil) (throw 'nextline nil)) @@ -1996,7 +1998,11 @@ If there are links in the string, don't modify these. (defvar local-list-indent) (defvar local-list-type) (defun org-export-html-close-lists-maybe (line) - (let ((ind (or (get-text-property 0 'original-indentation line))) + (let* ((rawhtml (and in-local-list (get-text-property 0 'org- protected line))) + (ind + (if rawhtml + (org-get-indentation line) +(or (get-text-property 0 'original-indentation line ;(and (string-match \\S- line) ; (org-get-indentation line didclose) Sebastian ___ 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
[Orgmode] Re: [patch] Sort the sitemap again
On Apr 22, 2010, at 3:41 AM, Sebastian Rose wrote: Hi Carsten, here is a patch, that sorts the sitemap-file on html-export. One my configure the sorting per project, by adding these lines to his `org-publish-project-alist': :sitemap-sort-foldersSet this to one of first (default), last. Any other value will mixe files and folders. :sitemap-alphabetically Set to `t' to sort filenames alphabetically. Alphatical sorting is the default. Hence you must set this to nil explicitly. :sitemap-ignore-case If non-nil, alphabetical sorting is done case-insensitive. Default: nil. I added a variable `org-publish-file-title-cache' to cache absolute paths and titles of the files. Otherwise, `org-publish-find-title' would be called twice for each file. Great idea. This would be a lot of overhead. I have to call it when sorting the files, to sort them by title instead of file name. Yes. I have applied the patch, with minor changes: - Some code formatting to stay below 80 characters width - Replacing '() with nil - Using symbols `first' and `last' instead of strings - Minor changes to the docstring - Adding documentation to the manual Please check that I have not broken anything. Thanks, this is really a useful addition. - Carsten Best wishes Sebastian diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 6ef1e24..a455997 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -174,7 +174,17 @@ sitemap of files or summary page for a given project. of the titles of the files involved) or `tree' (the directory structure of the source files is reflected in the sitemap). Defaults to - `tree'. + `tree'. + + If you create a sitemap file, adjust the sorting like this: + + :sitemap-sort-foldersSet this to one of \first\ (default), \last\. + Any other value will mixe files and folders. + :sitemap-alphabetically Set to `t' to sort filenames alphabetically. + Alphatical sorting is the default. Hence you + must set this to nil explecitly. + :sitemap-ignore-case If non-nil, alphabetical sorting is done + case-insensitive. Default: nil. :group 'org-publish :type 'alist) @@ -287,11 +297,16 @@ Each element of this alist is of the form: (defvar org-publish-temp-files nil Temporary list of files to be published.) +;; Here, so you find the variable right before it's used the first time: +(defvar org-publish-file-title-cache nil + List of absolute filenames and titles.) + (defun org-publish-initialize-files-alist (optional refresh) Set `org-publish-files-alist' if it is not set. Also set it if the optional argument REFRESH is non-nil. (interactive P) (when (or refresh (not org-publish-files-alist)) +(setq org-publish-file-title-cache '()) (setq org-publish-files-alist (org-publish-get-files org-publish-project-alist @@ -355,6 +370,32 @@ This splices all the components into the list. (push p rtn))) (nreverse (org-publish-delete-dups (delq nil rtn) +(defun org-publish-sort-directory-files (a b) + Predicate for `sort', that sorts folders-first/last and +eventually alphabetically. + (let ((retval t)) +(when (or sitemap-alphabetically sitemap-sort-folders) + ;; First we sort alphabetically: + (when sitemap-alphabetically +(let ((aorg (and (string-match \\.org$ a) (not (file- directory-p a + (borg (and (string-match \\.org$ b) (not (file- directory-p b) + (setq retval +(if sitemap-ignore-case +(string-lessp (if borg (upcase (org-publish- find-title a)) (upcase a)) + (if aorg (upcase (org-publish- find-title b)) (upcase b))) + (string-lessp (if borg (org-publish-find-title a) a) +(if aorg (org-publish-find-title b) b)) + ;; Directory-wise wins: + (when sitemap-sort-folders +;; a is directory, b not: +(cond + ((and (file-directory-p a) (not (file-directory-p b))) + (setq retval (string= sitemap-sort-folders first))) + ;; a is not a directory, but b is: + ((and (not (file-directory-p a)) (file-directory-p b)) + (setq retval (string= sitemap-sort-folders last)) + retval)) + (defun org-publish-get-base-files-1 (base-dir optional recurse match skip-file skip-dir) Set `org-publish-temp-files' with files from BASE-DIR directory. If RECURSE is non-nil, check BASE-DIR recursively. If MATCH is @@ -374,7 +415,7 @@ matching the regexp SKIP-DIR when recursing through BASE-DIR.
Re: [Orgmode] [patch] Terminating lists by indentation of #+SPECIALS too
Carsten Dominik carsten.domi...@gmail.com writes: Hi Sebastian, thanks or your patience - I have now aplied this patch. Thanks!!! You are saying that your files mostly validate. Are there issues we should address? No no no no no. I checked it over and over again it's _not_ the exporter, but PHP's build-in XML-parser (libexpat ??). It goes: Warning: DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: ID org:1ad2d2aa-50d6-4423-9ada-ecb18b22fed7 already defined in ... but it is not. The parser fails to distinguish `name=org:2aff...' and `id=org:2aff...' in headlines like h4 id=sec-1a name=org:2aff... id=org:2aff.../a Headline /h4 But it validates on http://validator.w3.org. The other error is cut-and-pasted HTML. An embedded youtube video - something about Org-mode :) Those links do not validate - I'll have to fix that by hand. Sebastian Thanks! - Carsten On Apr 22, 2010, at 3:26 AM, Sebastian Rose wrote: Carsten Dominik carsten.domi...@gmail.com writes: Hi Sebastion, sorry for being hard to satisfy on this one. What I mean is this: The location where your patck kicks in looks like this: (org-export-html-close-lists-maybe line) ;; Protected HTML (when (get-text-property 0 'org-protected line) (let (par (ind (get-text-property 0 'original-indentation line))) (when (re-search-backward \\(p\\)\\([ \t\r\n]*\\)\\= (- (point) 100) t) (setq par (match-string 1)) (replace-match \\2\n)) (insert line \n) So before we are looking at protected stuff, there is already a call to org-export-html-close-lists-maybe. It seems to me that what you are trying to do could just happen inside that function. The function checks for a text property 'original-indentation to check for special stuff that was indented - but apparently that does not cover your case. So in that function you could also look at the protected property and act accordingly. Does that make sense? Ah, now I got you here! You're feeling for the code is all to good :) I could indeed remove more than half of the lines. So here comes the next generation: diff --git a/lisp/org-html.el b/lisp/org-html.el index 0903bff..5b13649 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -959,10 +959,12 @@ lang=\%s\ xml:lang=\%s\ (when (equal ORG-VERSE-START line) (org-close-par-maybe) (insert \np class=\verse\\n) +(setq org-par-open t) (setq inverse t) (throw 'nextline nil)) (when (equal ORG-VERSE-END line) (insert /p\n) +(setq org-par-open nil) (org-open-par) (setq inverse nil) (throw 'nextline nil)) @@ -1996,7 +1998,11 @@ If there are links in the string, don't modify these. (defvar local-list-indent) (defvar local-list-type) (defun org-export-html-close-lists-maybe (line) - (let ((ind (or (get-text-property 0 'original-indentation line))) + (let* ((rawhtml (and in-local-list (get-text-property 0 'org- protected line))) + (ind + (if rawhtml + (org-get-indentation line) +(or (get-text-property 0 'original-indentation line ; (and (string-match \\S- line) ; (org-get-indentation line didclose) Sebastian ___ 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 -- ~~ Sebastian Rose Fachinformatiker / Anwendungsentwicklung Viktoriastr. 22 Entwicklung von Anwendungen mit freien Werkzeugen 30451 Hannover und Bibliotheken. 0173 83 93 417 sebastian_r...@gmx.de s.r...@emma-stil.de ~~ ___ 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] [patch] Terminating lists by indentation of #+SPECIALS too
On Apr 22, 2010, at 11:09 AM, Sebastian Rose wrote: Carsten Dominik carsten.domi...@gmail.com writes: Hi Sebastian, thanks or your patience - I have now aplied this patch. Thanks!!! You are saying that your files mostly validate. Are there issues we should address? No no no no no. OK, I am glad to hear that. - Carsten I checked it over and over again it's _not_ the exporter, but PHP's build-in XML-parser (libexpat ??). It goes: Warning: DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: ID org:1ad2d2aa-50d6-4423-9ada-ecb18b22fed7 already defined in ... but it is not. The parser fails to distinguish `name=org:2aff...' and `id=org:2aff...' in headlines like h4 id=sec-1a name=org:2aff... id=org:2aff.../a Headline /h4 But it validates on http://validator.w3.org. The other error is cut-and-pasted HTML. An embedded youtube video - something about Org-mode :) Those links do not validate - I'll have to fix that by hand. Sebastian Thanks! - Carsten On Apr 22, 2010, at 3:26 AM, Sebastian Rose wrote: Carsten Dominik carsten.domi...@gmail.com writes: Hi Sebastion, sorry for being hard to satisfy on this one. What I mean is this: The location where your patck kicks in looks like this: (org-export-html-close-lists-maybe line) ;; Protected HTML (when (get-text-property 0 'org-protected line) (let (par (ind (get-text-property 0 'original-indentation line))) (when (re-search-backward \\(p\\)\\([ \t\r\n]*\\)\\= (- (point) 100) t) (setq par (match-string 1)) (replace-match \\2\n)) (insert line \n) So before we are looking at protected stuff, there is already a call to org-export-html-close-lists-maybe. It seems to me that what you are trying to do could just happen inside that function. The function checks for a text property 'original-indentation to check for special stuff that was indented - but apparently that does not cover your case. So in that function you could also look at the protected property and act accordingly. Does that make sense? Ah, now I got you here! You're feeling for the code is all to good :) I could indeed remove more than half of the lines. So here comes the next generation: diff --git a/lisp/org-html.el b/lisp/org-html.el index 0903bff..5b13649 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -959,10 +959,12 @@ lang=\%s\ xml:lang=\%s\ (when (equal ORG-VERSE-START line) (org-close-par-maybe) (insert \np class=\verse\\n) +(setq org-par-open t) (setq inverse t) (throw 'nextline nil)) (when (equal ORG-VERSE-END line) (insert /p\n) +(setq org-par-open nil) (org-open-par) (setq inverse nil) (throw 'nextline nil)) @@ -1996,7 +1998,11 @@ If there are links in the string, don't modify these. (defvar local-list-indent) (defvar local-list-type) (defun org-export-html-close-lists-maybe (line) - (let ((ind (or (get-text-property 0 'original-indentation line))) + (let* ((rawhtml (and in-local-list (get-text-property 0 'org- protected line))) + (ind + (if rawhtml + (org-get-indentation line) +(or (get-text-property 0 'original-indentation line ;(and (string-match \\S- line) ; (org-get-indentation line didclose) Sebastian ___ 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 -- ~~ Sebastian Rose Fachinformatiker / Anwendungsentwicklung Viktoriastr. 22 Entwicklung von Anwendungen mit freien Werkzeugen 30451 Hannover und Bibliotheken. 0173 83 93 417 sebastian_r...@gmx.de s.r...@emma-stil.de ~~ - 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] [Patch] M-Right and M-Left behave differently on headings and list items
Carsten Dominik carsten.domi...@gmail.com writes: Excellent question. I think the cleanest would be that M-left/right on a folded item that does have children throws an error. +1 -- Bastien ___ 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: [patch] Sort the sitemap again
Carsten Dominik carsten.domi...@gmail.com writes: On Apr 22, 2010, at 3:41 AM, Sebastian Rose wrote: Hi Carsten, here is a patch, that sorts the sitemap-file on html-export. One my configure the sorting per project, by adding these lines to his `org-publish-project-alist': :sitemap-sort-foldersSet this to one of first (default), last. Any other value will mixe files and folders. :sitemap-alphabetically Set to `t' to sort filenames alphabetically. Alphatical sorting is the default. Hence you must set this to nil explicitly. :sitemap-ignore-case If non-nil, alphabetical sorting is done case-insensitive. Default: nil. I added a variable `org-publish-file-title-cache' to cache absolute paths and titles of the files. Otherwise, `org-publish-find-title' would be called twice for each file. Great idea. This would be a lot of overhead. I have to call it when sorting the files, to sort them by title instead of file name. Yes. I have applied the patch, with minor changes: - Some code formatting to stay below 80 characters width - Replacing '() with nil - Using symbols `first' and `last' instead of strings We'll have to use `equal' then, not `eq': diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 496f4d1..34589db 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -397,10 +397,10 @@ eventually alphabetically. ;; a is directory, b not: (cond ((and (file-directory-p a) (not (file-directory-p b))) - (setq retval (eq sitemap-sort-folders 'first))) + (setq retval (equal sitemap-sort-folders 'first))) ;; a is not a directory, but b is: ((and (not (file-directory-p a)) (file-directory-p b)) - (setq retval (eq sitemap-sort-folders 'last)) + (setq retval (equal sitemap-sort-folders 'last)) retval)) (defun org-publish-get-base-files-1 (base-dir optional recurse match skip-file skip-dir) @@ -609,7 +609,7 @@ If :makeindex is set, also produce a file theindex.org. 'org-publish-org-sitemap)) (sitemap-sort-folders (if (plist-member project-plist :sitemap-sort-folders) - (plist-get project-plist :sitemap-sort-folders) + (plist-get project-plist :sitemap-sort-folders) 'first)) (sitemap-alphabetically (if (plist-member project-plist :sitemap-alphabetically) @@ -618,9 +618,9 @@ If :makeindex is set, also produce a file theindex.org. (preparation-function (plist-get project-plist :preparation-function)) (completion-function (plist-get project-plist :completion-function)) (files (org-publish-get-base-files project exclude-regexp)) file) - (when (and (not (stringp sitemap-sort-folders)) - (not (string= sitemap-sort-folders first)) - (not (string= sitemap-sort-folders last))) + (when (and (not (null sitemap-sort-folders)) + (not (equal sitemap-sort-folders 'first)) + (not (equal sitemap-sort-folders 'last))) (setq sitemap-sort-folders nil)) (when preparation-function (run-hooks 'preparation-function)) (if sitemap-p (funcall sitemap-function project sitemap-filename)) - Minor changes to the docstring - Adding documentation to the manual Thanks! Please check that I have not broken anything. Please apply the patch above - then it works again :) Haarghh ... symbols... Sebastian Thanks, this is really a useful addition. - Carsten Best wishes Sebastian diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 6ef1e24..a455997 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -174,7 +174,17 @@ sitemap of files or summary page for a given project. of the titles of the files involved) or `tree' (the directory structure of the source files is reflected in the sitemap). Defaults to - `tree'. + `tree'. + + If you create a sitemap file, adjust the sorting like this: + + :sitemap-sort-foldersSet this to one of \first\ (default), \last\. + Any other value will mixe files and folders. + :sitemap-alphabetically Set to `t' to sort filenames alphabetically. + Alphatical sorting is the default. Hence you + must set this to nil explecitly. + :sitemap-ignore-case If non-nil, alphabetical sorting is done + case-insensitive. Default: nil. :group 'org-publish :type 'alist) @@ -287,11 +297,16 @@ Each element of this alist is of the form: (defvar org-publish-temp-files nil Temporary list of files to be published.)
Re: [Orgmode] Re: [patch] Sort the sitemap again
Sebastian Rose sebastian_r...@gmx.de wrote: Carsten Dominik carsten.domi...@gmail.com writes: On Apr 22, 2010, at 3:41 AM, Sebastian Rose wrote: ... - Using symbols `first' and `last' instead of strings We'll have to use `equal' then, not `eq': On the contrary: eq works reliably for symbols (and is, I assume, the reason that Carsten wanted symbols in the first place: pointer comparison is fast). I haven't looked at the patch at all (sorry), but are you sure that that is what broke it? Nick ___ 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: [patch] Sort the sitemap again
On Apr 22, 2010, at 12:52 PM, Sebastian Rose wrote: We'll have to use `equal' then, not `eq': No, you need to change your defintion of the publishing alist to use first and last instead of first and last. This is Emacs Lisp, not Javascript :-) But you are right - my changes were incomplete, see below. diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 496f4d1..34589db 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -397,10 +397,10 @@ eventually alphabetically. ;; a is directory, b not: (cond ((and (file-directory-p a) (not (file-directory-p b))) - (setq retval (eq sitemap-sort-folders 'first))) + (setq retval (equal sitemap-sort-folders 'first))) ;; a is not a directory, but b is: ((and (not (file-directory-p a)) (file-directory-p b)) - (setq retval (eq sitemap-sort-folders 'last)) + (setq retval (equal sitemap-sort-folders 'last)) retval)) (defun org-publish-get-base-files-1 (base-dir optional recurse match skip-file skip-dir) @@ -609,7 +609,7 @@ If :makeindex is set, also produce a file theindex.org. 'org-publish-org-sitemap)) (sitemap-sort-folders (if (plist-member project-plist :sitemap-sort-folders) - (plist-get project-plist :sitemap-sort-folders) + (plist-get project-plist :sitemap-sort-folders) 'first)) (sitemap-alphabetically (if (plist-member project-plist :sitemap-alphabetically) @@ -618,9 +618,9 @@ If :makeindex is set, also produce a file theindex.org. (preparation-function (plist-get project-plist :preparation- function)) (completion-function (plist-get project-plist :completion- function)) (files (org-publish-get-base-files project exclude-regexp)) file) - (when (and (not (stringp sitemap-sort-folders)) - (not (string= sitemap-sort-folders first)) - (not (string= sitemap-sort-folders last))) + (when (and (not (null sitemap-sort-folders)) + (not (equal sitemap-sort-folders 'first)) + (not (equal sitemap-sort-folders 'last))) Ah, ouch, indeed, here I failed miserably. Should be this: (unless (memq sitemap-sort-folders '(first last)) (setq sitemap-sort-folders nil)) Fixed now in git. - Carsten (setq sitemap-sort-folders nil)) (when preparation-function (run-hooks 'preparation-function)) (if sitemap-p (funcall sitemap-function project sitemap- filename)) - Minor changes to the docstring - Adding documentation to the manual Thanks! Please check that I have not broken anything. Please apply the patch above - then it works again :) Haarghh ... symbols... Sebastian Thanks, this is really a useful addition. - Carsten Best wishes Sebastian diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 6ef1e24..a455997 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -174,7 +174,17 @@ sitemap of files or summary page for a given project. of the titles of the files involved) or `tree' (the directory structure of the source files is reflected in the sitemap). Defaults to - `tree'. + `tree'. + + If you create a sitemap file, adjust the sorting like this: + + :sitemap-sort-foldersSet this to one of \first \ (default), \last\. + Any other value will mixe files and folders. + :sitemap-alphabetically Set to `t' to sort filenames alphabetically. + Alphatical sorting is the default. Hence you + must set this to nil explecitly. + :sitemap-ignore-case If non-nil, alphabetical sorting is done + case-insensitive. Default: nil. :group 'org-publish :type 'alist) @@ -287,11 +297,16 @@ Each element of this alist is of the form: (defvar org-publish-temp-files nil Temporary list of files to be published.) +;; Here, so you find the variable right before it's used the first time: +(defvar org-publish-file-title-cache nil + List of absolute filenames and titles.) + (defun org-publish-initialize-files-alist (optional refresh) Set `org-publish-files-alist' if it is not set. Also set it if the optional argument REFRESH is non-nil. (interactive P) (when (or refresh (not org-publish-files-alist)) +(setq org-publish-file-title-cache '()) (setq org-publish-files-alist (org-publish-get-files org-publish-project-alist @@ -355,6 +370,32 @@ This splices all the components into the list. (push p rtn))) (nreverse (org-publish-delete-dups (delq nil rtn) +(defun org-publish-sort-directory-files (a b) + Predicate for `sort', that sorts folders-first/last and +eventually alphabetically. + (let ((retval
Re: [Orgmode] Re: [patch] Sort the sitemap again
Hi Carsten, here is a neccessary improvement for the sitemap-sorting. This is diffed against the current master, thus the last patch is included here, too. Some files still do not want to sort correctly, if we turn off folder-sorting :-P diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 496f4d1..866133d 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -384,23 +384,32 @@ eventually alphabetically. (when (or sitemap-alphabetically sitemap-sort-folders) ;; First we sort alphabetically: (when sitemap-alphabetically -(let ((aorg (and (string-match \\.org$ a) (not (file-directory-p a - (borg (and (string-match \\.org$ b) (not (file-directory-p b) +(let* ((adir (file-directory-p a)) + (aorg (and (string-match \\.org$ a) (not adir))) + (bdir (file-directory-p b)) + (borg (and (string-match \\.org$ b) (not bdir))) + (A (if aorg (org-publish-find-title a) a)) + (B (if borg (org-publish-find-title b) b))) + ;; If we have a directory and an Org file, we need to combine + ;; directory and title as filename of the Org file: + (when (and adir borg) +(setq B (concat (file-name-directory b) B))) + (when (and bdir aorg) +(setq A (concat (file-name-directory a) A))) + ;; (setq retval (if sitemap-ignore-case -(string-lessp (if borg (upcase (org-publish-find-title a)) (upcase a)) - (if aorg (upcase (org-publish-find-title b)) (upcase b))) - (string-lessp (if borg (org-publish-find-title a) a) -(if aorg (org-publish-find-title b) b)) +(string-lessp (upcase A) (upcase B)) + (string-lessp A B) ;; Directory-wise wins: (when sitemap-sort-folders ;; a is directory, b not: (cond ((and (file-directory-p a) (not (file-directory-p b))) - (setq retval (eq sitemap-sort-folders 'first))) + (setq retval (equal sitemap-sort-folders 'first))) ;; a is not a directory, but b is: ((and (not (file-directory-p a)) (file-directory-p b)) - (setq retval (eq sitemap-sort-folders 'last)) + (setq retval (equal sitemap-sort-folders 'last)) retval)) (defun org-publish-get-base-files-1 (base-dir optional recurse match skip-file skip-dir) @@ -618,9 +627,9 @@ If :makeindex is set, also produce a file theindex.org. (preparation-function (plist-get project-plist :preparation-function)) (completion-function (plist-get project-plist :completion-function)) (files (org-publish-get-base-files project exclude-regexp)) file) - (when (and (not (stringp sitemap-sort-folders)) - (not (string= sitemap-sort-folders first)) - (not (string= sitemap-sort-folders last))) + (when (and (not (null sitemap-sort-folders)) + (not (equal sitemap-sort-folders 'first)) + (not (equal sitemap-sort-folders 'last))) (setq sitemap-sort-folders nil)) (when preparation-function (run-hooks 'preparation-function)) (if sitemap-p (funcall sitemap-function project sitemap-filename)) Sebastian Sebastian Rose sebastian_r...@gmx.de writes: Carsten Dominik carsten.domi...@gmail.com writes: On Apr 22, 2010, at 3:41 AM, Sebastian Rose wrote: Hi Carsten, here is a patch, that sorts the sitemap-file on html-export. One my configure the sorting per project, by adding these lines to his `org-publish-project-alist': :sitemap-sort-foldersSet this to one of first (default), last. Any other value will mixe files and folders. :sitemap-alphabetically Set to `t' to sort filenames alphabetically. Alphatical sorting is the default. Hence you must set this to nil explicitly. :sitemap-ignore-case If non-nil, alphabetical sorting is done case-insensitive. Default: nil. I added a variable `org-publish-file-title-cache' to cache absolute paths and titles of the files. Otherwise, `org-publish-find-title' would be called twice for each file. Great idea. This would be a lot of overhead. I have to call it when sorting the files, to sort them by title instead of file name. Yes. I have applied the patch, with minor changes: - Some code formatting to stay below 80 characters width - Replacing '() with nil - Using symbols `first' and `last' instead of strings We'll have to use `equal' then, not `eq': diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 496f4d1..34589db 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -397,10 +397,10 @@ eventually alphabetically. ;; a is
[Orgmode] Exporting to single LaTeX file and multiple HTML files
I'm wondering what's the best way to export a single org file to a /single/ LaTeX file but also to /multiple/ HTML files. Think of lengthy manuals and things like that where such a strategy may be sensible. What came to my mind were include commands or publishing functions that post-process the export but this seems all rather cumbersome. Has anyone a better idea? Ulf ___ 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: Nick Dokos: Re: [Orgmode] Problem exporting to LaTeX/PDF from command line
Hi Nick, Thanks a lot for having made those tests and sorry for my late reply. I didn't have time to go the direction you suggest: I will to check my load-path and I'll let you know. Thanks again. Francesco Nick Dokos wrote: Talking to myself again... From:Nick Dokos nicholas.do...@hp.com Subject: Re: [Orgmode] Problem exporting to LaTeX/PDF from command line To: nicholas.do...@hp.com Date:Tue, 20 Apr 2010 11:46:41 -0400 Nick Dokos nicholas.do...@hp.com wrote: Nick Dokos nicholas.do...@hp.com wrote: Francesco Pizzolante f...@missioncriticalit.com wrote: Hi, I forgot to mention that, of course, when I do the same operation within Emacs, using the C-c C-e l, the file is exported without problem. Any idea? I tried a little debugging on this, but I didn't get very far before I ran out of time. The re-search-forward for #+LaTeX_CLASS_OPTIONS in org-export-latex-set-initial-vars fails and it looks to me like a rather subtle problem: the temp file buffer looks empty. Whether that's the fault of the with-temp-file-buffer macro or something else, I'm not sure. Still not sure what is going on, but this modified org-interaction.el file (it loads the necessary org-XXX.el files explicitly - be sure to change the load-path appropriately) seems to work for me. I have not tried to load org-XXX.elc files to see whether that works or not. Nick --- (add-to-list 'load-path /home/nick/src/emacs/org/org-mode/lisp) ... I think that's the problem: picking up org from the *right* place works. Picking it up from whatever is built-in with your emacs does not. So just fix the load-path before you (require 'org) and all shall be well (famous last words...) Nick -- ___ 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] Exporting to single LaTeX file and multiple HTML files
Ulf Stegemann ulf-n...@zeitform.de writes: I'm wondering what's the best way to export a single org file to a /single/ LaTeX file but also to /multiple/ HTML files. Think of lengthy manuals and things like that where such a strategy may be sensible. What came to my mind were include commands or publishing functions that post-process the export but this seems all rather cumbersome. Has anyone a better idea? - http://orgmode.org/worg/code/org-info-js/ - pdftohtml ?? Sebastian ___ 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: [patch] Sort the sitemap again
Nick Dokos nicholas.do...@hp.com writes: Sebastian Rose sebastian_r...@gmx.de wrote: Carsten Dominik carsten.domi...@gmail.com writes: On Apr 22, 2010, at 3:41 AM, Sebastian Rose wrote: ... - Using symbols `first' and `last' instead of strings We'll have to use `equal' then, not `eq': On the contrary: eq works reliably for symbols (and is, I assume, the reason that Carsten wanted symbols in the first place: pointer comparison is fast). I haven't looked at the patch at all (sorry), but are you sure that that is what broke it? I tried, but it didn't work. But it was my fault. I had this in my org-publish-project-alist: :sitemap-sort-folders 'last But the `'´ has to go to make it work. I read a while about `symbols' that way :-/ Best wishes Sebastian ___ 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: Exporting to single LaTeX file and multiple HTML files
Hi Sebastian, Sebastian Rose sebastian_r...@gmx.de wrote: Ulf Stegemann ulf-n...@zeitform.de writes: I'm wondering what's the best way to export a single org file to a /single/ LaTeX file but also to /multiple/ HTML files. Think of lengthy manuals and things like that where such a strategy may be sensible. What came to my mind were include commands or publishing functions that post-process the export but this seems all rather cumbersome. Has anyone a better idea? - http://orgmode.org/worg/code/org-info-js/ yes, this is a nice one but sometimes separate files are really needed. - pdftohtml Ah, a clever one, too ;) Sure, it's possible to create a PDF and convert it to HTML later on but this still seems a bit cumbersome and I'm not quite sure about the reliability of the tool. When I used it last (some time ago) it desperately failed on some PDFs. Originally, I thought I could somehow achieve some sort of `split' behaviour (e.g. like in texi2html) where you can specify to create a separate file on export for every first (second, third ...) level headline. But that's probably a bit tricky. Ulf ___ 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] OT: message-mark-inserted-region WAS: [org-babel] Feature request: Get a scalar for data=example-table[0, 1]
Eric Schulte schulte.e...@gmail.com writes: Hi Darlan, Darlan Cavalcante Moreira darc...@gmail.com writes: [...] - Darlan ps: How do I do that cute here start/end? Is it gnus functionality (I use wanderlust) or it is more general? The function is called `message-mark-inserted-region' and is part of message.el which I believe is distributed with Emacs (can't be sure). Which raises two questions for me: 1. Doesn't the special behaviour in emacs mail clients rather depend on people using the same value of message-mark-insert-begin and message-mark-insert-end? 2. Which aesthete came up with the default values, and has anyone notified the relevant professional artistic organisations of the untapped talent? , |message-mark-insert-begin is a variable defined in `message.el'. |Its value is | --8---cut here---start-8---\n ` Oh right, I did (find-library message) to check the author. That explains it. Dan ___ 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 ___ 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] Org and XeTeX?
I use XeTeX, mostly (rather than LaTeX), and I'm wondering if it might be possible to use XeTeX with org. XeTeX requires a few special lines in the header of the document, but after these lines it operates the same as LaTeX. For my setup, the extra lines typically look like this: \TeXXeTstate=1 \usepackage{fontspec,xunicode} \defaultfontfeatures{Numbers=OldStyle,Scale=MatchLowercase,Mapping=tex-text} \setmainfont{Sabon LT Std} \setromanfont[Mapping=tex-text]{Sabon LT Std} \setsansfont[Scale=MatchUppercase]{Myriad Pro} Can org be set up to use the XeTeX engine with the above variables? I've looked at org-export-latex-classes, and it seems like I can insert the above code into that variable -- but can org use the setup? Ross -- Ross A. Laird, PhD www.rosslaird.com ___ 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] error when exporting to pdf
Carsten, I'm not sure how to run pdflatex. I didn't mention earlier, but I run emacs on Windows. Buck On Wed, Apr 21, 2010 at 6:38 AM, Carsten Dominik carsten.domi...@gmail.comwrote: Hi Buck, In this process, Org-mode will produce a .tex file. Try running pdflatex on the file by hand, this will give you (and, if still necessary, us), more information on what is going wrong. - Carsten On Apr 21, 2010, at 2:22 AM, Buck Brody wrote: I am trying to export to PDF. I typed C-c C-e d. Which should be, export as LaTeX and process to PDF and open PDF file. I received a message that said PDF file was not produced. The org file I used was the one in the example http://orgmode.org/worg/org-tutorials/org-beamer.php. Version information and backtrace are below. Thanks for your help. Buck Versions: Emacs 22.3.1 Org-Mode 6.34c Backtrace: Debugger entered--Lisp error: (error PDF file was not produced) signal(error (PDF file was not produced)) error(PDF file was not produced) (if (not (file-exists-p pdffile)) (error PDF file was not produced) (set-window-configuration wconfig) (when org-export-pdf-remove-logfiles (dolist ... ... ...)) (message Exporting to PDF...done) pdffile) (let* ((wconfig ...) (lbuf ...) (file ...) (base ...) (pdffile ...) (cmds org-latex-to-pdf-process) (outbuf ...) (bibtex-p ...) cmd) (with-current-buffer outbuf (erase-buffer)) (message Processing LaTeX file...) (if (and cmds ...) (funcall cmds file) (while cmds ... ... ... ...)) (message Processing LaTeX file...done) (if (not ...) (error PDF file was not produced) (set-window-configuration wconfig) (when org-export-pdf-remove-logfiles ...) (message Exporting to PDF...done) pdffile)) org-export-as-pdf(nil) (let ((pdffile ...)) (if pdffile (org-open-file pdffile) (error PDF file was not produced))) org-export-as-pdf-and-open(nil) call-interactively(org-export-as-pdf-and-open) (if (and bg (nth 2 ass) (not ...) (not ...)) (let (...) (set-process-sentinel p ...) (message Background process \%s\: started p)) (if subtree-p (progn ... ...)) (call-interactively (nth 1 ass)) (when (and bpos ...) (let ... ... ... ... ...))) (let* ((bg ...) subtree-p (help [t] insert the export option template\n[v] limit export to visible part of outline tree\n[1] only export the current subtree\n[SPC] publish enclosing subtree (with LaTeX_CLASS or EXPORT_FILE_NAME prop)\n\n[a] export as ASCII [A] to temporary buffer\n\n[h] export as HTML [H] to temporary buffer [R] export region\n[b] export as HTML and open in browser\n\n[l] export as LaTeX [L] to temporary buffer\n[p] export as LaTeX and process to PDF [d] ... and open PDF file\n\n[D] export as DocBook [V] export as DocBook, process to PDF, and open\n\n[m] export as Freemind mind map\n[x] export as XOXO\n[g] export using Wes Hardaker's generic exporter\n\n[i] export current file as iCalendar file\n[I] export all agenda files as iCalendar files [c] ...as one combined file\n\n[F] publish current file [P] publish current project\n[X] publish a project... [E] publish every projects) (cmds ...) r1 r2 ass (cpos ...) (cbuf ...) bpos) (save-excursion (save-window-excursion ... ... ... ... ... ... ...)) (and bpos (goto-char bpos)) (setq r2 (if ... ... r1)) (unless (setq ass ...) (error No command associated with key %c r1)) (if (and bg ... ... ...) (let ... ... ...) (if subtree-p ...) (call-interactively ...) (when ... ...))) org-export(nil) call-interactively(org-export) ___ 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
[Orgmode] Org and XeTeX?
I use XeTeX, mostly (rather than LaTeX), and I'm wondering if it might be possible to use XeTeX with org. XeTeX requires a few special lines in the header of the document, but after these lines it operates the same as LaTeX. For my setup, the extra lines typically look like this: \TeXXeTstate=1 \usepackage{fontspec,xunicode} \defaultfontfeatures{Numbers=OldStyle,Scale=MatchLowercase,Mapping=tex-text} \setmainfont{Sabon LT Std} \setromanfont[Mapping=tex-text]{Sabon LT Std} \setsansfont[Scale=MatchUppercase]{Myriad Pro} Can org be set up to use the XeTeX engine with the above variables? I've looked at org-export-latex-classes, and it seems like I can insert the above code into that variable -- but can org use the setup? Ross -- Ross A. Laird, PhD www.rosslaird.com ___ 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] Org and XeTeX?
I mostly use XeTeX (rather than LaTeX). Can Org be setup to use the XeTeX engine? I've looked at the variable org-export-latex-classes (as well as org-export-latex-package-alist), and it looks like I can insert the XeTeX-specific code: \TeXXeTstate=1 \usepackage{fontspec,xunicode} \defaultfontfeatures{Numbers=OldStyle,Scale=MatchLowercase,Mapping=tex-text} \setmainfont{Sabon LT Std} \setromanfont[Mapping=tex-text]{Sabon LT Std} \setsansfont[Scale=MatchUppercase]{Myriad Pro} \usepackage{xltxtra} But can Org use XeTeX? The command is xelatex rather than latex. Ross -- Ross A. Laird, PhD www.rosslaird.com ___ 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] export problem
I get the same error message (Wrong type argument: commandp, org-export-as-freemind) with *any *org file on: home windows 7 emacs 23, orgmode 6.34 home mac osx as previously described -emacs/aquamacs work windows XP emacs 23 (all gnu emacs) all have different .emacs files all are using recent (6.33a to latest) versions of orgmode cls On Wed, Apr 21, 2010 at 11:33 PM, Nick Dokos nicholas.do...@hp.com wrote: charles snyder clsny...@gmail.com wrote: Until recently, my org exports worked perfectly. I haven't made any changes I am aware of. Now I am having export problems with my .org files. When I try to export as freemind (C-c C-e m) I get: wrong type argument: org-export-as-freemind. When I try to export as pdf (C-c C-e d), I get the following error: ... Runaway argument? {Request Library books \href { http://www.jocolibrary.org/default.aspx\ETChttp://www.jocolibrary.org/default.aspx%5CETC . ! File ended while scanning use of \...@xdblarg. inserted text \par ... I am using org mode 6.35 emacs, GNU Emacs 22.3.1 (i386-apple-darwin9.7.0, Carbon Version 1.6.0) or Aquamacs GNU Emacs 23.0.94.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54) on mac osx (but same problem on windows) I tried both exports on a (trivial, although it did include some links) org file and I had no problems. Can you try to get a minimal example of an org file that causes these problems for you and post it here? Posting the whole file (modulo any privacy concerns) is the second best possibility. If that is not possible, it's going to be tougher going: try exporting to latex and then run pdftex on it by hand. If that gives you the same error, then post the portion of the latex file around the error and the corresponding portion of the org file. That's probably not going to be enough information but you never know. Nick -- Charles L. Snyder, MD Professor of Surgery Children's Mercy Hospital Kansas City, MO www.clsnyder.com ___ 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: [patch] Sort the sitemap again
Hi Sebastian, I have applied your patch, thanks. - Carsten On Apr 22, 2010, at 3:58 PM, Sebastian Rose wrote: Hi Carsten, here is a neccessary improvement for the sitemap-sorting. This is diffed against the current master, thus the last patch is included here, too. Some files still do not want to sort correctly, if we turn off folder-sorting :-P Hmm - I am not sure if I understand? Another fix needed, or your patch does now fix it? Sorry for being slow today... - Carsten diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 496f4d1..866133d 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -384,23 +384,32 @@ eventually alphabetically. (when (or sitemap-alphabetically sitemap-sort-folders) ;; First we sort alphabetically: (when sitemap-alphabetically -(let ((aorg (and (string-match \\.org$ a) (not (file- directory-p a - (borg (and (string-match \\.org$ b) (not (file- directory-p b) +(let* ((adir (file-directory-p a)) + (aorg (and (string-match \\.org$ a) (not adir))) + (bdir (file-directory-p b)) + (borg (and (string-match \\.org$ b) (not bdir))) + (A (if aorg (org-publish-find-title a) a)) + (B (if borg (org-publish-find-title b) b))) + ;; If we have a directory and an Org file, we need to combine + ;; directory and title as filename of the Org file: + (when (and adir borg) +(setq B (concat (file-name-directory b) B))) + (when (and bdir aorg) +(setq A (concat (file-name-directory a) A))) + ;; (setq retval (if sitemap-ignore-case -(string-lessp (if borg (upcase (org-publish- find-title a)) (upcase a)) - (if aorg (upcase (org-publish- find-title b)) (upcase b))) - (string-lessp (if borg (org-publish-find-title a) a) -(if aorg (org-publish-find-title b) b)) +(string-lessp (upcase A) (upcase B)) + (string-lessp A B) ;; Directory-wise wins: (when sitemap-sort-folders ;; a is directory, b not: (cond ((and (file-directory-p a) (not (file-directory-p b))) - (setq retval (eq sitemap-sort-folders 'first))) + (setq retval (equal sitemap-sort-folders 'first))) ;; a is not a directory, but b is: ((and (not (file-directory-p a)) (file-directory-p b)) - (setq retval (eq sitemap-sort-folders 'last)) + (setq retval (equal sitemap-sort-folders 'last)) retval)) (defun org-publish-get-base-files-1 (base-dir optional recurse match skip-file skip-dir) @@ -618,9 +627,9 @@ If :makeindex is set, also produce a file theindex.org. (preparation-function (plist-get project-plist :preparation- function)) (completion-function (plist-get project-plist :completion- function)) (files (org-publish-get-base-files project exclude-regexp)) file) - (when (and (not (stringp sitemap-sort-folders)) - (not (string= sitemap-sort-folders first)) - (not (string= sitemap-sort-folders last))) + (when (and (not (null sitemap-sort-folders)) + (not (equal sitemap-sort-folders 'first)) + (not (equal sitemap-sort-folders 'last))) (setq sitemap-sort-folders nil)) (when preparation-function (run-hooks 'preparation-function)) (if sitemap-p (funcall sitemap-function project sitemap- filename)) Sebastian Sebastian Rose sebastian_r...@gmx.de writes: Carsten Dominik carsten.domi...@gmail.com writes: On Apr 22, 2010, at 3:41 AM, Sebastian Rose wrote: Hi Carsten, here is a patch, that sorts the sitemap-file on html-export. One my configure the sorting per project, by adding these lines to his `org-publish-project-alist': :sitemap-sort-foldersSet this to one of first (default), last. Any other value will mixe files and folders. :sitemap-alphabetically Set to `t' to sort filenames alphabetically. Alphatical sorting is the default. Hence you must set this to nil explicitly. :sitemap-ignore-case If non-nil, alphabetical sorting is done case-insensitive. Default: nil. I added a variable `org-publish-file-title-cache' to cache absolute paths and titles of the files. Otherwise, `org-publish-find- title' would be called twice for each file. Great idea. This would be a lot of overhead. I have to call it when sorting the files, to sort them by title instead of file name. Yes. I have applied the patch, with minor changes: - Some code formatting to stay below 80 characters width - Replacing '() with nil - Using symbols `first' and `last' instead of strings We'll
Re: [Orgmode] [Patch] M-Right and M-Left behave differently on headings and list items
On Apr 21, 2010, at 4:44 PM, Dan Davison wrote: Carsten Dominik carsten.domi...@gmail.com writes: On Apr 21, 2010, at 3:32 PM, Bastien wrote: Carsten Dominik carsten.domi...@gmail.com writes: do others agree with Matti's view? FWIW, I do. There is still another difference. Currently, when I execute the indentation command several times in a row, the range to which this applies is locked. So for example - level 1a - level 2a - level 2b - level 2c - level 1b If I now go on level 1a and use M-S-left, level 1b becomes a sibling of 2c. If I immediately after this do M-S-right, 1b should be indented along with 2c, but this does not happen because the item range is locked. If, however, you do something in between, like moving the cursor by one character, 1b will be included. I believe I did this a long time ago, because I felt that not locking the range for commands in direct succession would too quickly modify the structure, including at places outside of the current view ( beyond the window end) If you are calling for more consistency, maybe this feature should go as well? I hope that this is sufficiently closely related to belong in this thread: I find it surprising that org-do-demote deactivates the region. Let's say I start out with * 1 ** 11 * 111 * 112 * 2 and I wish to move to make 111 and 112 be children of 11 The way that seems natural to me is to select headings 111 and 112, and apply org-demote-subtree twice in succession. So with point at the beginning of the 111 line, C-space down down M-right M-right Hi Dan, I do agree with your observation. However, keeping the mark active would mean that further cursor motions will still have the highlighted region hanging around, and I found this the bigger headache. What I do in these cases is M-right C-x C-x M-right which is not pretty but workable. - Carsten However, this leads me to * 1 ** 11 ** 111 ** 112 ** 2 because after one application of org-demote-subtree, the region becomes deactivated and the second demotion applies to heading 2, which is unlikely to have been intended. Dan - 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 - 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
[Orgmode] Re: Org and XeTeX?
Sorry for the triple posting! (It was gnus' fault.) Ross Laird ross at rosslaird.com writes: I mostly use XeTeX (rather than LaTeX). Can Org be setup to use the XeTeX ... ___ 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] Org and XeTeX?
On Apr 22, 2010, at 6:10 AM, Ross Laird wrote: I mostly use XeTeX (rather than LaTeX). Can Org be setup to use the XeTeX engine? I've looked at the variable org-export-latex-classes (as well as org-export-latex-package-alist), and it looks like I can insert the XeTeX-specific code: \TeXXeTstate=1 \usepackage{fontspec,xunicode} \defaultfontfeatures {Numbers=OldStyle,Scale=MatchLowercase,Mapping=tex-text} \setmainfont{Sabon LT Std} \setromanfont[Mapping=tex-text]{Sabon LT Std} \setsansfont[Scale=MatchUppercase]{Myriad Pro} \usepackage{xltxtra} But can Org use XeTeX? The command is xelatex rather than latex. Ross -- Ross A. Laird, PhD www.rosslaird.com Aloha Ross, Earlier this month when changes were made to the LaTeX export configuration, xetex compatibility was left to the user. There is a footnote to this effect in the manual: [103] The default LaTeX output is designed for processing with pdftex or latex. It includes packages that are not compatible with xetex and possibly luatex. See the variables org-export-latex-default-packages- alist and org-export-latex-packages-alist. If you get export to xetex working, I think it would be useful to document the solution either here on the mailing list or, better, somewhere on Worg. HTH, Tom ___ 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] org-mode CSS property export bug
Hi all, It seems that org-mode exports invalid CSS properties for id's. e.g. sec-1.1 is an invalid CSS ID because it collides with the syntax for CSS classes, meaning that you can't style it. I'd suggest replacing the dots with another char. R. ___ 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] export problem
charles snyder clsny...@gmail.com wrote: I get the same error message (Wrong type argument: commandp, org-export-as-freemind) with any org file on: home windows 7 emacs 23, orgmode 6.34 home mac osx as previously described -emacs/aquamacs work windows XP emacs 23 (all gnu emacs) all have different .emacs files all are using recent (6.33a to latest) versions of orgmode cls This sounds as if org-freemind is not loaded. What does C-h f org-export-as-freemind RET say? If it is says No match, try loading org-freemind: M-x load-library RET org-freemind RET and try the export again. If that does not work, I assume that you somehow introduced the same setup problem on all the machines. I'd concentrate on one machine, debug it there and then propagate the fix(es) to all the others. To debug it, please read section 1.4, Feedback, of the Org manual. In particular, the section on How to create a useful backtrace. Since the problem is easy to reproduce, that's the most likely path to success. When you get the backtrace, post it here. Thanks, Nick On Wed, Apr 21, 2010 at 11:33 PM, Nick Dokos nicholas.do...@hp.com wrote: charles snyder clsny...@gmail.com wrote: Until recently, my org exports worked perfectly. I haven't made any changes I am aware of. Now I am having export problems with my .org files. When I try to export as freemind (C-c C-e m) I get: wrong type argument: org-export-as-freemind. When I try to export as pdf (C-c C-e d), I get the following error: ... Runaway argument? {Request Library books \href {http://www.jocolibrary.org/default.aspx\ETC. ! File ended while scanning use of \...@xdblarg. inserted text \par ... I am using org mode 6.35 emacs, GNU Emacs 22.3.1 (i386-apple-darwin9.7.0, Carbon Version 1.6.0) or Aquamacs GNU Emacs 23.0.94.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54) on mac osx (but same problem on windows) I tried both exports on a (trivial, although it did include some links) org file and I had no problems. Can you try to get a minimal example of an org file that causes these problems for you and post it here? Posting the whole file (modulo any privacy concerns) is the second best possibility. If that is not possible, it's going to be tougher going: try exporting to latex and then run pdftex on it by hand. If that gives you the same error, then post the portion of the latex file around the error and the corresponding portion of the org file. That's probably not going to be enough information but you never know. Nick -- Charles L. Snyder, MD Professor of Surgery Children's Mercy Hospital Kansas City, MO www.clsnyder.com ___ 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] Tags not lining up in org-indent-mode
I figured out how to keep tabs from being used to align tags. The solution is to set indent-tabs-mode to nil locally for org-mode. I believe the following patch should fix this issue. --8---cut here---start-8--- index c875472..1d10754 100644 --- a/lisp/org-indent.el +++ b/lisp/org-indent.el @@ -131,6 +131,7 @@ FIXME: How to update when broken? (setq org-indent-mode nil) (if org-indent-mode (progn + (org-set-local 'indent-tabs-mode nil) (or org-indent-strings (org-indent-initialize)) (when org-indent-mode-turns-off-org-adapt-indentation (org-set-local 'org-adapt-indentation nil)) --8---cut here---end---8--- Regards, Jason ___ 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] [patch] org-agenda-goto should push mark before moving point
Hi, many commands in Emacs that move the point long distances push the mark so you can go back using C-u C-SPC. org-agenda-goto doesn't do this, and I found it a bit annoying that I have to navigate the outline again to find back to where the point was before using the Agenda. Patch attached. regards, andreas diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index c68038d..9f35069 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6082,6 +6082,7 @@ (pos (marker-position marker))) (switch-to-buffer-other-window buffer) (widen) +(push-mark) (goto-char pos) (when (org-mode-p) (org-show-context 'agenda) ___ 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: [patch] Sort the sitemap again
Carsten Dominik carsten.domi...@gmail.com writes: Hi Sebastian, I have applied your patch, thanks. - Carsten On Apr 22, 2010, at 3:58 PM, Sebastian Rose wrote: Hi Carsten, here is a neccessary improvement for the sitemap-sorting. This is diffed against the current master, thus the last patch is included here, too. Some files still do not want to sort correctly, if we turn off folder-sorting :-P Hmm - I am not sure if I understand? Another fix needed, or your patch does now fix it? Sorry for being slow today... I'm bad in explaining... There was still a problem with alphabetical sorting I didn't fix. But it didn't show up with any combination of files (it had with thorough debugging...). But anyway, here's the final patch, that fixes it. Sorry, I'll try to send just _one_ patch the next time :-/ diff --git a/lisp/org-publish.el b/lisp/org-publish.el index b93c92f..ac22603 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -388,18 +388,15 @@ eventually alphabetically. (aorg (and (string-match \\.org$ a) (not adir))) (bdir (file-directory-p b)) (borg (and (string-match \\.org$ b) (not bdir))) - (A (if aorg (org-publish-find-title a) a)) - (B (if borg (org-publish-find-title b) b))) - ;; If we have a directory and an Org file, we need to combine - ;; directory and title as filename of the Org file: - (when (and adir borg) -(setq B (concat (file-name-directory b) B))) - (when (and bdir aorg) -(setq A (concat (file-name-directory a) A))) - ;; + (A (if aorg + (concat (file-name-directory a) + (org-publish-find-title a)) a)) + (B (if borg + (concat (file-name-directory b) + (org-publish-find-title b)) b))) (setq retval (if sitemap-ignore-case - (string-lessp (upcase A) (upcase B)) -(string-lessp A B) + (not (string-lessp (upcase B) (upcase A))) +(not (string-lessp B A)) ;; Directory-wise wins: (when sitemap-sort-folders As always with things I write, it's a good sign if the number of lines decreases :) Sebastian - Carsten diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 496f4d1..866133d 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -384,23 +384,32 @@ eventually alphabetically. (when (or sitemap-alphabetically sitemap-sort-folders) ;; First we sort alphabetically: (when sitemap-alphabetically -(let ((aorg (and (string-match \\.org$ a) (not (file- directory-p a - (borg (and (string-match \\.org$ b) (not (file- directory-p b) +(let* ((adir (file-directory-p a)) + (aorg (and (string-match \\.org$ a) (not adir))) + (bdir (file-directory-p b)) + (borg (and (string-match \\.org$ b) (not bdir))) + (A (if aorg (org-publish-find-title a) a)) + (B (if borg (org-publish-find-title b) b))) + ;; If we have a directory and an Org file, we need to combine + ;; directory and title as filename of the Org file: + (when (and adir borg) +(setq B (concat (file-name-directory b) B))) + (when (and bdir aorg) +(setq A (concat (file-name-directory a) A))) + ;; (setq retval (if sitemap-ignore-case -(string-lessp (if borg (upcase (org-publish- find-title a)) (upcase a)) - (if aorg (upcase (org-publish- find-title b)) (upcase b))) - (string-lessp (if borg (org-publish-find-title a) a) -(if aorg (org-publish-find-title b) b)) +(string-lessp (upcase A) (upcase B)) + (string-lessp A B) ;; Directory-wise wins: (when sitemap-sort-folders ;; a is directory, b not: (cond ((and (file-directory-p a) (not (file-directory-p b))) - (setq retval (eq sitemap-sort-folders 'first))) + (setq retval (equal sitemap-sort-folders 'first))) ;; a is not a directory, but b is: ((and (not (file-directory-p a)) (file-directory-p b)) - (setq retval (eq sitemap-sort-folders 'last)) + (setq retval (equal sitemap-sort-folders 'last)) retval)) (defun org-publish-get-base-files-1 (base-dir optional recurse match skip-file skip-dir) @@ -618,9 +627,9 @@ If :makeindex is set, also produce a file theindex.org. (preparation-function (plist-get project-plist :preparation- function)) (completion-function (plist-get project-plist :completion- function)) (files
Re: [Orgmode] error when exporting to pdf
Buck Brody buckbr...@gmail.com writes: Carsten, I'm not sure how to run pdflatex. I didn't mention earlier, but I run emacs on Windows. Hi Buck, did you install `texlive' or similar? See: http://www.tug.org/texlive/ Download: http://www.tug.org/texlive/acquire-netinstall.html HTH Sebastian Buck On Wed, Apr 21, 2010 at 6:38 AM, Carsten Dominik carsten.domi...@gmail.comwrote: Hi Buck, In this process, Org-mode will produce a .tex file. Try running pdflatex on the file by hand, this will give you (and, if still necessary, us), more information on what is going wrong. - Carsten On Apr 21, 2010, at 2:22 AM, Buck Brody wrote: I am trying to export to PDF. I typed C-c C-e d. Which should be, export as LaTeX and process to PDF and open PDF file. I received a message that said PDF file was not produced. The org file I used was the one in the example http://orgmode.org/worg/org-tutorials/org-beamer.php. Version information and backtrace are below. Thanks for your help. Buck Versions: Emacs 22.3.1 Org-Mode 6.34c Backtrace: Debugger entered--Lisp error: (error PDF file was not produced) signal(error (PDF file was not produced)) error(PDF file was not produced) (if (not (file-exists-p pdffile)) (error PDF file was not produced) (set-window-configuration wconfig) (when org-export-pdf-remove-logfiles (dolist ... ... ...)) (message Exporting to PDF...done) pdffile) (let* ((wconfig ...) (lbuf ...) (file ...) (base ...) (pdffile ...) (cmds org-latex-to-pdf-process) (outbuf ...) (bibtex-p ...) cmd) (with-current-buffer outbuf (erase-buffer)) (message Processing LaTeX file...) (if (and cmds ...) (funcall cmds file) (while cmds ... ... ... ...)) (message Processing LaTeX file...done) (if (not ...) (error PDF file was not produced) (set-window-configuration wconfig) (when org-export-pdf-remove-logfiles ...) (message Exporting to PDF...done) pdffile)) org-export-as-pdf(nil) (let ((pdffile ...)) (if pdffile (org-open-file pdffile) (error PDF file was not produced))) org-export-as-pdf-and-open(nil) call-interactively(org-export-as-pdf-and-open) (if (and bg (nth 2 ass) (not ...) (not ...)) (let (...) (set-process-sentinel p ...) (message Background process \%s\: started p)) (if subtree-p (progn ... ...)) (call-interactively (nth 1 ass)) (when (and bpos ...) (let ... ... ... ... ...))) (let* ((bg ...) subtree-p (help [t] insert the export option template\n[v] limit export to visible part of outline tree\n[1] only export the current subtree\n[SPC] publish enclosing subtree (with LaTeX_CLASS or EXPORT_FILE_NAME prop)\n\n[a] export as ASCII [A] to temporary buffer\n\n[h] export as HTML [H] to temporary buffer [R] export region\n[b] export as HTML and open in browser\n\n[l] export as LaTeX [L] to temporary buffer\n[p] export as LaTeX and process to PDF [d] ... and open PDF file\n\n[D] export as DocBook [V] export as DocBook, process to PDF, and open\n\n[m] export as Freemind mind map\n[x] export as XOXO\n[g] export using Wes Hardaker's generic exporter\n\n[i] export current file as iCalendar file\n[I] export all agenda files as iCalendar files [c] ...as one combined file\n\n[F] publish current file [P] publish current project\n[X] publish a project... [E] publish every projects) (cmds ...) r1 r2 ass (cpos ...) (cbuf ...) bpos) (save-excursion (save-window-excursion ... ... ... ... ... ... ...)) (and bpos (goto-char bpos)) (setq r2 (if ... ... r1)) (unless (setq ass ...) (error No command associated with key %c r1)) (if (and bg ... ... ...) (let ... ... ...) (if subtree-p ...) (call-interactively ...) (when ... ...))) org-export(nil) call-interactively(org-export) ___ 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 -- ~~ Sebastian Rose Fachinformatiker / Anwendungsentwicklung Viktoriastr. 22 Entwicklung von Anwendungen mit freien Werkzeugen 30451 Hannover und Bibliotheken. 0173 83 93 417 sebastian_r...@gmx.de s.r...@emma-stil.de ~~ ___ 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] org-mode CSS property export bug
Rick Moynihan rick.moyni...@gmail.com writes: Hi all, It seems that org-mode exports invalid CSS properties for id's. e.g. sec-1.1 is an invalid CSS ID because it collides with the syntax for CSS classes, meaning that you can't style it. I'd suggest replacing the dots with another char. Hey Rick, interesting observation! I found, the pages validate everywhere, and so I started to search. It seems to be valid CSS 2 (I couldn't find a evidence though). Opera and firefox know how to handle that: h3[id=sec-1.1] { background-color:yellow; } See: http://www.w3.org/TR/2008/REC-CSS2-20080411/syndata.html#strings Best wishes Sebastian ___ 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: [patch] Sort the sitemap again
On Apr 22, 2010, at 11:01 PM, Sebastian Rose wrote: Carsten Dominik carsten.domi...@gmail.com writes: Hi Sebastian, I have applied your patch, thanks. - Carsten On Apr 22, 2010, at 3:58 PM, Sebastian Rose wrote: Hi Carsten, here is a neccessary improvement for the sitemap-sorting. This is diffed against the current master, thus the last patch is included here, too. Some files still do not want to sort correctly, if we turn off folder-sorting :-P Hmm - I am not sure if I understand? Another fix needed, or your patch does now fix it? Sorry for being slow today... I'm bad in explaining... There was still a problem with alphabetical sorting I didn't fix. But it didn't show up with any combination of files (it had with thorough debugging...). But anyway, here's the final patch, that fixes it. Sorry, I'll try to send just _one_ patch the next time :-/ :-) I have applied the patch - Carsten diff --git a/lisp/org-publish.el b/lisp/org-publish.el index b93c92f..ac22603 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -388,18 +388,15 @@ eventually alphabetically. (aorg (and (string-match \\.org$ a) (not adir))) (bdir (file-directory-p b)) (borg (and (string-match \\.org$ b) (not bdir))) - (A (if aorg (org-publish-find-title a) a)) - (B (if borg (org-publish-find-title b) b))) - ;; If we have a directory and an Org file, we need to combine - ;; directory and title as filename of the Org file: - (when (and adir borg) -(setq B (concat (file-name-directory b) B))) - (when (and bdir aorg) -(setq A (concat (file-name-directory a) A))) - ;; + (A (if aorg + (concat (file-name-directory a) + (org-publish-find-title a)) a)) + (B (if borg + (concat (file-name-directory b) + (org-publish-find-title b)) b))) (setq retval (if sitemap-ignore-case - (string-lessp (upcase A) (upcase B)) -(string-lessp A B) + (not (string-lessp (upcase B) (upcase A))) +(not (string-lessp B A)) ;; Directory-wise wins: (when sitemap-sort-folders As always with things I write, it's a good sign if the number of lines decreases :) Sebastian - Carsten diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 496f4d1..866133d 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -384,23 +384,32 @@ eventually alphabetically. (when (or sitemap-alphabetically sitemap-sort-folders) ;; First we sort alphabetically: (when sitemap-alphabetically -(let ((aorg (and (string-match \\.org$ a) (not (file- directory-p a - (borg (and (string-match \\.org$ b) (not (file- directory-p b) +(let* ((adir (file-directory-p a)) + (aorg (and (string-match \\.org$ a) (not adir))) + (bdir (file-directory-p b)) + (borg (and (string-match \\.org$ b) (not bdir))) + (A (if aorg (org-publish-find-title a) a)) + (B (if borg (org-publish-find-title b) b))) + ;; If we have a directory and an Org file, we need to combine + ;; directory and title as filename of the Org file: + (when (and adir borg) +(setq B (concat (file-name-directory b) B))) + (when (and bdir aorg) +(setq A (concat (file-name-directory a) A))) + ;; (setq retval (if sitemap-ignore-case -(string-lessp (if borg (upcase (org-publish- find-title a)) (upcase a)) - (if aorg (upcase (org-publish- find-title b)) (upcase b))) - (string-lessp (if borg (org-publish-find-title a) a) -(if aorg (org-publish-find-title b) b)) +(string-lessp (upcase A) (upcase B)) + (string-lessp A B) ;; Directory-wise wins: (when sitemap-sort-folders ;; a is directory, b not: (cond ((and (file-directory-p a) (not (file-directory-p b))) - (setq retval (eq sitemap-sort-folders 'first))) + (setq retval (equal sitemap-sort-folders 'first))) ;; a is not a directory, but b is: ((and (not (file-directory-p a)) (file-directory-p b)) - (setq retval (eq sitemap-sort-folders 'last)) + (setq retval (equal sitemap-sort-folders 'last)) retval)) (defun org-publish-get-base-files-1 (base-dir optional recurse match skip-file skip-dir) @@ -618,9 +627,9 @@ If :makeindex is set, also produce a file theindex.org. (preparation-function (plist-get project-plist :preparation- function)) (completion-function (plist-get
[Orgmode] Partial exporter from Muse to Org-mode syntax, v 0.0.1
Hi, I started to write a long time ago a Muse exporter which outputs Org syntax. I'm now publishing it even if it's not finished, because I have not much free time to deal with a particular problem with list exportation. It needs heavy restructuration. Here it is: http://www.danielclemente.com/emacs/muse-orgD0.el (you may version it, clean it, repair it etc. freely) I copy an excerpt from the features list: ; Works: ; - #+TITLE:, #+AUTHOR are correctly set ; - comments are translated from ; to # ; - *italics* → /italics/ and **bold** → *bold* correctly transformed without conflicts. Even ***bold+italics*** → */bold+italics*/ ; - links: ; - implicit links: [[page]] translated to [[file:page.org][page.org]] ; - explicit links: [[like][this]] translated to [[file:like.org][this]] ; - tables: muse tables are transformed to nice org-mode tables. Headers (||), fields (|) and footers (|||) are respected ; - horizontal lines: - ; Doesn't work: ; - unordered lists. I got them more or less working except for some bugs which were the cause for me temporarily abandoning this project… ; - ordered lists. I gave sequential order to each item (1., 2., 2.1, 2.2, 2.3, …), but again, there remain the same bugs as with ul ; - definition lists ; - table.el style tables ; - images: not much tested, but should be easy. Caption is adapted ; - verse,lisp,…: I didn't even test them You may also find useful a sample file of Muse's syntax: http://www.danielclemente.com/emacs/sintaxis.muse -- Daniel ___ 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] export problem
Thanks Nick! On 2 different machines, I got a no match when I tried C-h f org-export-as-freemind RET and when I followed your instructions: M-x load-library RET org-freemind RET followed by C-c C-e m It worked! so, when I added: (load-library C:/Users/clsnyder/Documents/org-6.33/lisp/org-freemind) to my .emacs, it works! but I have no clue why it stopped working and why I need to add this when the line above it in .emacs is: (add-to-list 'load-path C:/Users/clsnyder/Documents/org-6.33/lisp) Thanks for all your help Chuck On Thu, Apr 22, 2010 at 1:29 PM, Nick Dokos nicholas.do...@hp.com wrote: charles snyder clsny...@gmail.com wrote: I get the same error message (Wrong type argument: commandp, org-export-as-freemind) with any org file on: home windows 7 emacs 23, orgmode 6.34 home mac osx as previously described -emacs/aquamacs work windows XP emacs 23 (all gnu emacs) all have different .emacs files all are using recent (6.33a to latest) versions of orgmode cls This sounds as if org-freemind is not loaded. What does C-h f org-export-as-freemind RET say? If it is says No match, try loading org-freemind: M-x load-library RET org-freemind RET and try the export again. If that does not work, I assume that you somehow introduced the same setup problem on all the machines. I'd concentrate on one machine, debug it there and then propagate the fix(es) to all the others. To debug it, please read section 1.4, Feedback, of the Org manual. In particular, the section on How to create a useful backtrace. Since the problem is easy to reproduce, that's the most likely path to success. When you get the backtrace, post it here. Thanks, Nick On Wed, Apr 21, 2010 at 11:33 PM, Nick Dokos nicholas.do...@hp.com wrote: charles snyder clsny...@gmail.com wrote: Until recently, my org exports worked perfectly. I haven't made any changes I am aware of. Now I am having export problems with my .org files. When I try to export as freemind (C-c C-e m) I get: wrong type argument: org-export-as-freemind. When I try to export as pdf (C-c C-e d), I get the following error: ... Runaway argument? {Request Library books \href { http://www.jocolibrary.org/default.aspx\ETChttp://www.jocolibrary.org/default.aspx%5CETC . ! File ended while scanning use of \...@xdblarg. inserted text \par ... I am using org mode 6.35 emacs, GNU Emacs 22.3.1 (i386-apple-darwin9.7.0, Carbon Version 1.6.0) or Aquamacs GNU Emacs 23.0.94.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54) on mac osx (but same problem on windows) I tried both exports on a (trivial, although it did include some links) org file and I had no problems. Can you try to get a minimal example of an org file that causes these problems for you and post it here? Posting the whole file (modulo any privacy concerns) is the second best possibility. If that is not possible, it's going to be tougher going: try exporting to latex and then run pdftex on it by hand. If that gives you the same error, then post the portion of the latex file around the error and the corresponding portion of the org file. That's probably not going to be enough information but you never know. Nick -- Charles L. Snyder, MD Professor of Surgery Children's Mercy Hospital Kansas City, MO www.clsnyder.com -- Charles L. Snyder, MD Professor of Surgery Children's Mercy Hospital Kansas City, MO www.clsnyder.com ___ 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] org-mode CSS property export bug
On 22 April 2010 22:29, Sebastian Rose sebastian_r...@gmx.de wrote: Rick Moynihan rick.moyni...@gmail.com writes: Hey Rick, interesting observation! I found, the pages validate everywhere, and so I started to search. It seems to be valid CSS 2 (I couldn't find a evidence though). Looks like an inconsistency in the W3C specs, as it appears to be invalid (or absent from) the CSS selector spec, if not elsewhere. http://groups.google.com/group/jquery-en/msg/ca6ecd94ad4a23bd Opera and firefox know how to handle that: h3[id=sec-1.1] { background-color:yellow; } Nice to know how to reference it. Cheers, R. ___ 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] export problem
charles snyder clsny...@gmail.com wrote: Thanks Nick! Glad to help! On 2 different machines, I got a no match when I tried C-h f org-export-as-freemind RET and when I followed your instructions: M-x load-library RET org-freemind RET followed by C-c C-e m It worked! so, when I added: (load-library C:/Users/clsnyder/Documents/org-6.33/lisp/org-freemind) to my .emacs, it works! but I have no clue why it stopped working and why I need to add this when the line above it in .emacs is: (add-to-list 'load-path C:/Users/clsnyder/Documents/org-6.33/lisp) The add-to-list just tells emacs where to find the files that it needs to load. Because of it, you should be able to load org-freemind using just (load-library org-freemind) The loading itself can be done in various ways: explicitly as shown above, or implicitly through the autoload mechanism. In my case, I load org-install.el (in my .emacs). org-install.el contains the following: (autoload 'org-export-as-freemind org-freemind \ Not documented \(fn ARG optional HIDDEN EXT-PLIST TO-BUFFER BODY-ONLY PUB-DIR) t nil) so that when org-export-as-freemind is called, the autoload loads org-freemind.el (or org-freemind.elc if the compiled file exists), that defines the function and the call succeeds. At least, that's how it *should* work. You could do a little detective work in your setup to see how things are initialized and why it did not work. One hint is that after the autoload is done but before you call the function, if you say C-h f org-export-as-freemind RET it will say , | org-export-as-freemind is an interactive autoloaded Lisp function in | `org-freemind.el'. | | (org-export-as-freemind ARG optional HIDDEN EXT-PLIST TO-BUFFER | BODY-ONLY PUB-DIR) | | Not documented ` After you call the function once (which completes the loading), C-h f org-export-as-freemind RET will say something else: , | org-export-as-freemind is an interactive compiled Lisp function in | `org-freemind.el'. | | (org-export-as-freemind ARG optional HIDDEN EXT-PLIST TO-BUFFER | BODY-ONLY PUB-DIR) | | Not documented. ` Of course, in your case, emacs didn't know the function at all, so the autoload never happened: either you are not loading org-install.el or org-install.el does not contain the autoload form. HTH, Nick ___ 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