Re: [O] Per-window visibility cycling
Bob Newell bobnew...@bobnewell.net writes: This likely has been asked in the past but I didn't find it so please allow me :) Is visibility cycling per-buffer and not per-window? I ask because I want to do a horizontal split of a window containing an org-mode file. Then I want to do a certain level of visibility cycling in the left side to sort of make an index. On the right side, I want to open/close various tree branches without affecting the left side. But the two always seem to stay in sync with respect to visibility. Any ideas appreciated. Besides using an indirect buffer or calling #+begin_quote org-goto is an interactive compiled Lisp function in `org.el'. (org-goto optional ALTERNATIVE-INTERFACE) Look up a different location in the current file, keeping current visibility. When you want look-up or go to a different location in a document, the fastest way is often to fold the entire buffer and then dive into the tree. This method has the disadvantage, that the previous location will be folded, which may not be what you want. This command works around this by showing a copy of the current buffer in an indirect buffer, in overview mode. You can dive into the tree in that copy, use org-occur and incremental search to find a location. When pressing RET or `Q', the command returns to the original buffer in which the visibility is still unchanged. After RET it will also jump to the location selected in the indirect buffer and expose the headline hierarchy above. With a prefix argument, use the alternative interface: e.g. if `org-goto-interface' is 'outline use 'outline-path-completion. #+end_quote you could use `navi-mode.el' for that, it gives you many different views on an Org-mode file (or 'outshine' source code file), i.e. different levels of headlines (optionally combined with keyword searches), and enable you to change visibility or the associated Org-mode buffer without leaving the *Navi* buffer. For example, typing '2' in the *Navi* buffer of `navi-mode.el' gives you the headlines up to level 2 (works the same for Org-mode files): #+begin_quote 18 matches for ^;; \*\*? in buffer: navi-mode.el 1:;; * navi-mode.el --- major-mode for easy buffer-navigation 15:;; ** Commentary 225:;; ** ChangeLog 232:;; * Requires 237:;; * Mode Definitions 268:;; * Variables 269:;; ** Consts 270:;; ** Vars 286:;; ** Hooks 291:;; ** Fonts 292:;; ** Customs 818:;; * Defuns 819:;; ** Functions 1290:;; ** Commands 1628:;; * Menus and Keys 1629:;; ** Menus 1826:;; ** Keys 1919:;; * Run Hooks and Provide #+end_quote You can then navigate over the headlines with 'n' and 'p' and use TAB to cycle visibility in the associated buffer. Use BACKTAB to cycle the whole associated buffer. You can even type 'E' in the *Navi* buffer and edit the headlines right there (using keyboard macros for bulk edits), before switching back to read-only mode with C-c C-c. Edits are directly applied to the associated buffer. -- cheers, Thorsten
Re: [O] Can `org-element-map' act on secondary-strings?
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Thorsten Jolitz tjol...@gmail.com writes: when parsing an Org file with org-element-parse-buffer, headline titles and section contents (e.g.) end up as secondary strings in the parse-tree that do have a ':parent' attribute. When I try to modify all :parent attributes inside a parse-tree with `org-element-map' (by mapping over all element and object types), the secondary strings in the parse-tree remain untouched. Is there a way to make `org-element-map' act on these secondary strings too? I'm not sure to understand your question. Secondary string is not an object type, so you cannot explicitly search for them in a parse tree. Also, secondary strings do not have a :parent property (or any property whatsoever: they are just lists). Though, if you map over objects, e.g., bold text, `org-element-map' will also look for them within secondary lists. I meant these strings that I find in parse-trees that apparently do have a parent-proptery: #+begin_src emacs-lisp (headline ... :title (#(topic number one 0 16 (:parent #1 (paragraph (:begin 114 ...) #(Hello subtopic number one 0 26 (:parent #4))) #+end_src I concluded that they are the secondary values listed here: #+begin_quote org-element-secondary-value-alist is a variable defined in `org-element.el'. Its value is ((headline . :title) (inlinetask . :title) (item . :tag) (footnote-reference . :inline-definition)) Alist between element types and location of secondary value. #+end_quote plus the actual (string) content of paragraphs (e.g.). I can change the :parent attribute of the headline containing the above :title string (or of the paragraph containing the above content string) with `org-element-map', but those :parent references inside the strings remain untouched. I can access them by writing some code, of course, I only wanted to know if `org-element-map' might be able to access them out-of-the-box somehow. -- cheers, Thorsten
[O] Adding support for limits and exclusions to iCal recurring events
Hi I've been wanting to have support for exporting recurring events to iCal while limiting the number of repetitions, as well as excluding dates. The patch below is my attempt to add this functionality. However, I'm in doubt as to whether or not this is the right way to go about it (parsing dates stored in the property drawer), or if there's a better way? A sample headline supporting this might look like this: * Test :PROPERTIES: :END_DATE: [2013-07-21 Sun] :EXCLUDE: [2013-07-14 Sun] :ID: b376f8e3-f1a7-4ed6-ab9b-a255938af8c0 :END: 2013-07-07 Sun +1w If this is a reasonable way to go about it, I'll be happy to resubmit it as a proper patch (i.e. from `git format-patch`) for inclusion. :) -Toke diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index c6ab295..361cef2 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -632,6 +632,12 @@ inlinetask within the section. ;; Don't forget components from inner entries. contents +(defun org-icalendar-zero-convert-timestamp (timestamp optional format) + Parse and format an org-formatted timestamp, zeroing the time component. + (let ((time (org-parse-time-string timestamp)) + (fmt (or format %Y%m%dT%H%M%SZ))) +(format-time-string fmt (encode-time 0 0 0 (nth 3 time) (nth 4 time) (nth 5 time) + (defun org-icalendar--vevent (entry timestamp uid summary location description categories) Create a VEVENT component. @@ -656,11 +662,18 @@ Return VEVENT component as a string. (org-icalendar-convert-timestamp timestamp DTEND t) \n ;; RRULE. (when (org-element-property :repeater-type timestamp) - (format RRULE:FREQ=%s;INTERVAL=%d\n + (format RRULE:FREQ=%s;INTERVAL=%d%s\n (case (org-element-property :repeater-unit timestamp) (hour HOURLY) (day DAILY) (week WEEKLY) (month MONTHLY) (year YEARLY)) - (org-element-property :repeater-value timestamp))) + (org-element-property :repeater-value timestamp) + (if (not (org-element-property :END_DATE entry)) + (format ;UNTIL=%s (org-icalendar-zero-convert-timestamp + (org-element-property :END_DATE entry)) +(when (org-element-property :EXCLUDE entry) + (format EXDATE;VALUE=DATE:%s\n (mapconcat (lambda (ts) (org-icalendar-zero-convert-timestamp ts %Y%m%d)) + (split-string (org-element-property :EXCLUDE entry) ,) + ,))) SUMMARY: summary \n (and (org-string-nw-p location) (format LOCATION:%s\n location)) (and (org-string-nw-p description) signature.asc Description: PGP signature
[O] Problem with export
I have just upgraded my org to the latest from git. Now I cannot do an export. I have completely commented out any customization in my .emacs for org mode and the problem still remains. Every time I try to export (C-c C-e) I get: Debugger entered--Lisp error: (void-function org-export-dispatch) Any ideas what is happening? This was working with an older version of org (from mid last year). Mark
Re: [O] Can `org-element-map' act on secondary-strings?
Hello, Thorsten Jolitz tjol...@gmail.com writes: I meant these strings that I find in parse-trees that apparently do have a parent-proptery: #+begin_src emacs-lisp (headline ... :title (#(topic number one 0 16 (:parent #1 (paragraph (:begin 114 ...) #(Hello subtopic number one 0 26 (:parent #4))) #+end_src All strings contained in an element or a secondary string have a parent property. Try (org-element-map (org-element-parse-buffer) 'plain-text 'identity) on the following Org buffer #+begin_src org * A B #+end_src I concluded that they are the secondary values listed here: No. The secondary values are lists: topic number one, which has a :parent property, belongs to a list stored in :title property. That list is the secondary value. I can change the :parent attribute of the headline containing the above :title string (or of the paragraph containing the above content string) with `org-element-map', but those :parent references inside the strings remain untouched. Why would they be changed? The :parent reference in the headline is another headline, or the full tree whereas the :parent reference in these strings is the headline itself. IOW, they are unrelated. I can access them by writing some code, of course, I only wanted to know if `org-element-map' might be able to access them out-of-the-box somehow. As said in my previous post, `org-element-map' can access them. Do you have a simple example showing what you want to achieve? Regards, -- Nicolas Goaziou
Re: [O] Problem with export
Mark Elston melston1...@gmail.com writes: I have just upgraded my org to the latest from git. Now I cannot do an export. I have completely commented out any customization in my .emacs for org mode and the problem still remains. Every time I try to export (C-c C-e) I get: Debugger entered--Lisp error: (void-function org-export-dispatch) Any ideas what is happening? This was working with an older version of org (from mid last year). I am using the latest version of org and I don't get this error. May be you can post the output of (org-version) here. Also see that you do a clean compile. Usually this is what I do git pull make clean make Thanks and Regards Noorul
Re: [O] [PATCH] C-3 C-c C-w to copy the subtree instead of moving it
Hi Bastien, this looks like a useful function to me. However, the documentation should warn about duplicate IDs that might result from this. - Carsten On Jul 5, 2013, at 2:45 PM, Bastien b...@gnu.org wrote: When taking notes in a meeting, I often need to refile a subtree by copying it (so that it stays in the meeting's notes.) For now you can do this by setting (setq org-refile-keep t) but having this on a temporary basis is nice. This patch does this. From d35926a24d3741453d9ee2bc837ec540cccfae09 Mon Sep 17 00:00:00 2001 From: Bastien Guerry b...@altern.org Date: Fri, 5 Jul 2013 13:47:28 +0200 Subject: [PATCH] org.el (org-refile): allow to only copy the subtree without moving it * org.el (org-refile): With a numeric prefix argument of `3', emulate (setq org-refile-keep t) and copy the subtree to the target location, don't delete it. --- lisp/org.el | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 7ba78f5..5a386a0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11485,7 +11485,11 @@ and not actually move anything. With a double prefix arg \\[universal-argument] \\[universal-argument], \ go to the location where the last refiling operation has put the subtree. -With a prefix argument of `2', refile to the running clock. + +With a numeric prefix argument of `2', refile to the running clock. + +With a numeric prefix argument of `3', emulate `org-refile-keep' +being set to `t' and copy to the target location, don't move it. RFLOC can be a refile location obtained in a different way. @@ -11508,6 +11512,7 @@ prefix argument (`C-u C-u C-u C-c C-w'). (region-start (and regionp (region-beginning))) (region-end (and regionp (region-end))) (filename (buffer-file-name (buffer-base-buffer cbuf))) +(org-refile-keep (if (equal goto 3) t org-refile-keep)) pos it nbuf file re level reversed) (setq last-command nil) (when regionp @@ -11566,7 +11571,7 @@ prefix argument (`C-u C-u C-u C-c C-w'). (setq nbuf (or (find-buffer-visiting file) (find-file-noselect file))) - (if goto + (if (and goto (not (equal goto 3))) (progn (org-pop-to-buffer-same-window nbuf) (goto-char pos) -- 1.8.2.2 -- Bastien
Re: [O] org-export-section-number-format does not work
Hi Jisang, Jisang Yoo jisang.yoo.ac+...@gmail.com writes: C-h v cannot find the variable org-export-section-number-format but M-x customize-group RET org-export-general RET shows its documentation, after that C-h v shows it is defined in org-exp.el which is a file bundled with Emacs, and is not part of the latest org package. Yes, you describe the root of the problem: forget about the variable `org-export-section-number-format' as it is not part of the version you are using. Maybe someone can help pointing to the new option you need to set. -- Bastien
Re: [O] org-export-section-number-format does not work
On Mon, Jul 8, 2013 at 5:05 PM, Bastien b...@gnu.org wrote: Hi Jisang, Jisang Yoo jisang.yoo.ac+...@gmail.com writes: C-h v cannot find the variable org-export-section-number-format but M-x customize-group RET org-export-general RET shows its documentation, after that C-h v shows it is defined in org-exp.el which is a file bundled with Emacs, and is not part of the latest org package. Yes, you describe the root of the problem: forget about the variable `org-export-section-number-format' as it is not part of the version you are using. Maybe someone can help pointing to the new option you need to set. -- Bastien There seems no new option that can be found from exploring customization group org-export.
Re: [O] org-export-section-number-format does not work
Hi Jisang, Jisang Yoo jisang.yoo.ac+...@gmail.com writes: There seems no new option that can be found from exploring customization group org-export. You can check `org-html-format-headline-function' and its docstring as an example on how to customize the display of headlines in HTML. There are similar variables for other backends. HTH, -- Bastien
Re: [O] How to remove spaces for soft line-breaks
Hi Yujie, Yujie Wen yjwen...@gmail.com writes: I am wondering whether there is a way to forbid such spaces, or if no such a way, whether it is possible to work out a patch to forbid it. I would try M-x visual-line-mode RET and see if you like it. HTH, -- Bastien
Re: [O] [PATCH] C-3 C-c C-w to copy the subtree instead of moving it
Hi Carsten, Carsten Dominik carsten.domi...@gmail.com writes: this looks like a useful function to me. However, the documentation should warn about duplicate IDs that might result from this. Thanks. I've pushed the feature on master and documented it a bit better, both on the docstring and in the manual (`org-refile-keep' was not documented so far.) Best, -- Bastien
[O] [BUG] orgstruct++-mode and emacs-lisp-mode: user-error: An element cannot be parsed line 11492
Hi all, when using orgstruct++-mode I often get this error: user-error: An element cannot be parsed line 11492 It happens when (auto-)refilling expressions. I don't get a backtrace for it, I'll try. I'll switch back to orgstruct-mode for now to see if the same error happens here. Thanks, -- Bastien
Re: [O] [PATCH] C-3 C-c C-w to copy the subtree instead of moving it
Excellent, thank you very much! - Carsten On Jul 8, 2013, at 10:26 AM, Bastien b...@gnu.org wrote: Hi Carsten, Carsten Dominik carsten.domi...@gmail.com writes: this looks like a useful function to me. However, the documentation should warn about duplicate IDs that might result from this. Thanks. I've pushed the feature on master and documented it a bit better, both on the docstring and in the manual (`org-refile-keep' was not documented so far.) Best, -- Bastien
[O] Export changing loaded zenburn theme to unreadable color scheme
If I try to export with the zenburn theme loaded it causes the theme color scheme to change and makes the page unviewable. Then I have to reload it. Has anyone had this problem or know a solution. I still use the old export so the org version is the last repository before it changed over to the new exporter. I can't seem to figure out what is happening. Thanks a lot
Re: [O] [RFC] Changing internal representation of back-ends to defstructs
Bastien b...@gnu.org writes: Hi Eric, Eric S Fraga e.fr...@ucl.ac.uk writes: Funnily enough, I had to export a table in CSV format just last week and this function would have been great. Well, you do have M-x org-table-export RET table.csv and it exports to csv already... Arggghhh. Yes, this is there. I missed it because I did not give a .csv file name; I gave a file name without extension for some reason. It seems that the export command's options for format depend on the name of the file so I was only given an export to TSV option. Playing around now, it seems that if any extension is given (I tried .csv, .data, .txt, .blah, .foobar), then export-to-csv is the default. If no extension is given, export-to-tsv is the only option. Not what I expected! Thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.0.3-225-g8e9c10
Re: [O] Can `org-element-map' act on secondary-strings?
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, All strings contained in an element or a secondary string have a parent property. Try (org-element-map (org-element-parse-buffer) 'plain-text 'identity) Do you have a simple example showing what you want to achieve? Thanks, the 'plain-text type was what I missed. I used #+begin_src emacs-lisp (append '(org-data) org-element-all-elements org-element-all-objects) #+end_src as types for mapping, but need to add '(plain-text) to the types to access those :parent properties inside text-strings. My use case is to turn a parse tree that is a circular list into a regular list, and it seems that I achieved it now, e.g. using your minimal example #+begin_src org * A B #+end_src I get this non-circular parse-tree: #+begin_src emacs-lisp (org-data nil (headline (:raw-value A :begin 1 :end 7 :pre-blank 0 :hiddenp nil :contents-begin 5 :contents-end 7 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :quotedp nil :CATEGORY nil :title (#(A 0 1 (:parent 1))) :parent 0 :elem-id 1) (section (:begin 5 :end 7 :contents-begin 5 :contents-end 7 :post-blank 0 :parent 1 :elem-id 2) (paragraph (:begin 5 :end 7 :contents-begin 5 :contents-end 7 :post-blank 0 :post-affiliated 5 :parent 2 :elem-id 3) #(B 0 2 (:parent 3)) #+end_src I have a special use for this, but maybe this can be useful in other cases too, e.g. when people want to operate directly on the parse-tree and find it more difficult to handle circular-lists than 'normal' lists. -- cheers, Thorsten
[O] agenda problem or my set up is a problem?
I just did a clean org mode install (twice) * Org-mode version 8.0.5 (release_8.0.5-318-gfdaa99 @ c:/cygwin/home/Charlie/elisp/Org-Mode/lisp/) * emacs GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-28 on MARVIN emacs on windows 7, home premium org on cywin 1.7.20 I call the agenda dispatcher; however when I attempt to call an agenda command the following error is returned Wrong type argument: sequencep, newline: Charlie Millar
Re: [O] agenda problem or my set up is a problem?
Charles mill...@verizon.net writes: I just did a clean org mode install (twice) * Org-mode version 8.0.5 (release_8.0.5-318-gfdaa99 @ c:/cygwin/home/Charlie/elisp/Org-Mode/lisp/) * emacs GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-28 on MARVIN emacs on windows 7, home premium org on cywin 1.7.20 I call the agenda dispatcher; however when I attempt to call an agenda command the following error is returned Wrong type argument: sequencep, newline: No issues here with Org-mode version 8.0.5 (release_8.0.5-318-gfdaa99 @ /home/noorul/.emacs.d/site-lisp/org-mode/lisp/) GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2013-03-11 on noman Can you send a trace back? Thanks and Regards Noorul
Re: [O] Can `org-element-map' act on secondary-strings?
Thorsten Jolitz tjol...@gmail.com writes: Nicolas Goaziou n.goaz...@gmail.com writes: Thanks, the 'plain-text type was what I missed. I used #+begin_src emacs-lisp (append '(org-data) org-element-all-elements org-element-all-objects) #+end_src as types for mapping, but need to add '(plain-text) to the types to access those :parent properties inside text-strings. You don't need `org-data' type. The tree root doesn't have any property anyway. My use case is to turn a parse tree that is a circular list into a regular list, and it seems that I achieved it now, e.g. using your minimal example [...] I have a special use for this, but maybe this can be useful in other cases too, e.g. when people want to operate directly on the parse-tree and find it more difficult to handle circular-lists than 'normal' lists. I don't know why you would want that nor why it would make things easier, but as long as it suits you, that's fine. Regards, -- Nicolas Goaziou
[O] build + odt-export issues
I have org from git make autoloads works make all seems to work except that it ends with - Compiling /src/pdsw/org-mode-8/lisp/ox.el... In toplevel form: ox.el:5791:62:Warning: variable assignment to constant `org-export-stack-mode-map' In end of data: ox.el:6151:1:Warning: the following functions are not known to be defined: scroll-up-line, scroll-down-line Wrote /src/pdsw/org-mode-8/lisp/ox.elc Done (Total of 103 files compiled, 3 skipped) make[2]: Leaving directory `/src/pdsw/org-mode-8/lisp' make[1]: Leaving directory `/src/pdsw/org-mode-8/lisp' -- However export to odt gives me Error (ox-odt): Cannot find factory styles files, aborting $ make install make -C doc install make[1]: Entering directory `/src/pdsw/org-mode-8/doc' make[1]: *** No rule to make target `install'. Stop. make[1]: Leaving directory `/src/pdsw/org-mode-8/doc' make: *** [install-doc] Error 2 though make install-lisp seems to work org version 8.0.5 emacs version 23.4.1
[O] ox-bibtex works well with \cite{} entries but not with cite: links
Hi, as noted a while back, I use cite:bibref type links in org to write LaTeX papers. I have defined the cite link type as follows: #+begin_src emacs-lisp (org-add-link-type cite 'ebib (lambda (path desc format) (cond ((eq format 'latex) (format \\cite{%s} path) #+end_src This works really well for LaTeX export. However, it doesn't work at all for html export. Obviously, I can add an html target but this would only allow me a simple formatting capability. I have played around with ox-bibtex. This works well for both LaTeX and HTML exports so long as I use \cite{bibref} directly in my org text which is not as elegant. I was wondering what would be required to get ox-bibtex to interpret cite: links? I tried adding html as a valid target above, e.g. by using : ((or (eq format 'latex) (eq format 'html)) but the expansion of links happens after the processing done by ox-bibtex and so any \cite{bibref} text gets passed through to the HTML export directly without processing. Any suggestions welcome and greatly appreciated. Thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.0.5-318-gfdaa99
Re: [O] Can `org-element-map' act on secondary-strings?
Nicolas Goaziou n.goaz...@gmail.com writes: You don't need `org-data' type. The tree root doesn't have any property anyway. I used that because I wanted the whole parse-tree as return value, but no matter what `org-element-map' returns, it changes the parse-tree by side-effects anyway, so I can just ignore the return value and use the modified parse-tree stored somewhere instead - right? -- cheers, Thorsten
Re: [O] agenda problem or my set up is a problem?
Charles mill...@verizon.net writes: Noorul, On 7/8/2013 8:36 AM, Noorul Islam K M wrote: Charles mill...@verizon.net writes: I just did a clean org mode install (twice) * Org-mode version 8.0.5 (release_8.0.5-318-gfdaa99 @ c:/cygwin/home/Charlie/elisp/Org-Mode/lisp/) * emacs GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-28 on MARVIN emacs on windows 7, home premium org on cywin 1.7.20 I call the agenda dispatcher; however when I attempt to call an agenda command the following error is returned Wrong type argument: sequencep, newline: No issues here with Org-mode version 8.0.5 (release_8.0.5-318-gfdaa99 @ /home/noorul/.emacs.d/site-lisp/org-mode/lisp/) GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2013-03-11 on noman Can you send a trace back? Thanks and Regards Noorul I'll have to try the trace later. I forgot to mention that until this morning org worked as advertised with my set up. It was not until I attempted to update that the problem surfaced. That is why I did a clean install. Ok, good. I have also discovered that capture no longer works - the same error is returned. The same is true for attempts to change the TODO states. Could there be a CR/LF mix up in the most recent commit that effects a windows set up. This could be windows specific issue. Thanks and Regards Noorul
Re: [O] ox-bibtex works well with \cite{} entries but not with cite: links
Hello, Eric S Fraga e.fr...@ucl.ac.uk writes: as noted a while back, I use cite:bibref type links in org to write LaTeX papers. I have defined the cite link type as follows: #+begin_src emacs-lisp (org-add-link-type cite 'ebib (lambda (path desc format) (cond ((eq format 'latex) (format \\cite{%s} path) #+end_src This works really well for LaTeX export. However, it doesn't work at all for html export. Obviously, I can add an html target but this would only allow me a simple formatting capability. I have played around with ox-bibtex. This works well for both LaTeX and HTML exports so long as I use \cite{bibref} directly in my org text which is not as elegant. Would the following patch work? Regards, -- Nicolas Goaziou From fb23a30ba89ad34eb5f4cbdad7c0ffbb2f9e16b6 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou n.goaz...@gmail.com Date: Mon, 8 Jul 2013 15:55:12 +0200 Subject: [PATCH] ox-bibtex: Add [[cite:...]] links support * contrib/lisp/ox-bibtex.el (org-latex-link, org-html-link): New functions. --- contrib/lisp/ox-bibtex.el | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/contrib/lisp/ox-bibtex.el b/contrib/lisp/ox-bibtex.el index 3e6f8e6..2ebbdd0 100644 --- a/contrib/lisp/ox-bibtex.el +++ b/contrib/lisp/ox-bibtex.el @@ -64,10 +64,19 @@ ;; into the TeX file when exporting. ;; ;; For HTML export it: -;; 1) converts all \cite{foo} to links to the bibliography, +;; 1) converts all \cite{foo} and [[cite:foo]] to links to the +;;bibliography, ;; 2) creates a foo.html and foo_bib.html, ;; 3) includes the contents of foo.html in the exported HTML file. +;; +;; For LaTeX export it: +;; 1) converts all [[cite:foo]] to \cite{foo}. + +;; Initialization +(require 'ox-html) +(require 'ox-latex) +(org-add-link-type cite 'ebib) ;;; Internal Functions @@ -139,7 +148,16 @@ Fallback to `latex' back-end for other keywords. (concat (and style (format \\bibliographystyle{%s}\n style)) (format \\bibliography{%s} file +(defadvice org-latex-link (around bibtex-link) + Translate \cite\ type links into LaTeX syntax. +Fallback to `latex' back-end for other keywords. + (let ((link (ad-get-arg 0))) +(if (not (equal (org-element-property :type link) cite)) ad-do-it + (setq ad-return-value + (format \\cite{%s} (org-element-property :path link)) + (ad-activate 'org-latex-keyword) +(ad-activate 'org-latex-link) @@ -176,8 +194,25 @@ Fallback to `html' back-end for other keywords. (org-split-string (org-bibtex-get-citation-key fragment) ,) ) +(defadvice org-html-link (around bibtex-link) + Translate \cite:\ type links into HTML syntax. +Fallback to `html' back-end for other types. + (let ((link (ad-get-arg 0))) +(if (not (equal (org-element-property :type link) cite)) ad-do-it + (setq ad-return-value + (mapconcat + (lambda (key) + (format [a href=\#%s\%s/a] + key + (or (cdr (assoc key org-bibtex-html-entries-alist)) + key))) + (org-split-string (org-element-property :path link) + [ \t]*,[ \t]*) + ) + (ad-activate 'org-html-keyword) (ad-activate 'org-html-latex-fragment) +(ad-activate 'org-html-link) Filter -- 1.8.3.2
Re: [O] [RFC] Changing internal representation of back-ends to defstructs
Hi Eric, Eric S Fraga e.fr...@ucl.ac.uk writes: Playing around now, it seems that if any extension is given (I tried .csv, .data, .txt, .blah, .foobar), then export-to-csv is the default. If no extension is given, export-to-tsv is the only option. Not what I expected! See the docstring the `org-table-export'. You can change the default table export format with either `org-table-export-default-format' or TABLE_EXPORT_FORMAT. HTH, -- Bastien
[O] Handling Repeating events from google calendar / repeater interval
I'm experimenting using ical2org.sh to import google calendars. One limitation, as noted in the header is: # - does process RRULE recurring events, but ignores COUNT specifiers so if you have a repeating event in google (e.g. every day for four week), the ics file has: RRULE:FREQ=DAILY;COUNT=4 The script will take the first day of the event, but not the remaining three days. I think this could be solved in a couple of ways: 1. create four events, moving the date by one each time. 2. extending the syntax of timestamps so that something like: * Pick up Sam at school 2007-05-16 Wed 12:30 3+1w means repeat this event 3 times (rather than indefinitely). Or +1w:3 or something similar, I don't mind the syntax as long as it doesn't break other parts of timestamps. Has extending the syntax of the repeater interval been considered to allow finite number of repeats? I can offer to code something up for consideration if this sounds sensible. Thanks, Stephen
[O] two latex bugs
Hi, 1) could someone please substitute last-command-char with last-command-event in cdlatex.el, as was suggested here [1], to be able to insert carets and underscores in math-mode? 2) this: \begin{align}\label{mylabel} \left\{ \begin{array}{ll} 2+2 = 4 \\ 2+2 \neq 4 \end{array} \right. \end{align} gets exported badly, i.e. to this (notice how after \end{align} everything repeats itself with escaping \): \begin{align}\label{mylabel} \left\{ \begin{array}{ll} 2+2 = 4 \\ 2+2 \neq 4 \end{array} \right. \end{align}$\backslash$begin\{array\}\{ll\} 2+2 =\ 4 \\ 2+2 $\backslash$neq \ 4 $\backslash$end\{array\} $\backslash$right. $\backslash$end\{align\} \begin{array}{ll} 2+2 = 4 \\ 2+2 \neq 4 \end{array} \right. \end{align} it gets exported fine if \label{mylabel} is on its own line, instead of right next to \begin{align} cheers, renato [1] http://lists.gnu.org/archive/html/emacs-orgmode/2013-05/msg00837.html signature.asc Description: PGP signature
Re: [O] Handling Repeating events from google calendar / repeater interval
Hu Stephen, Stephen Eglen s.j.eg...@damtp.cam.ac.uk writes: I'm experimenting using ical2org.sh to import google calendars. One limitation, as noted in the header is: # - does process RRULE recurring events, but ignores COUNT specifiers so if you have a repeating event in google (e.g. every day for four week), the ics file has: RRULE:FREQ=DAILY;COUNT=4 The script will take the first day of the event, but not the remaining three days. I think this could be solved in a couple of ways: 1. create four events, moving the date by one each time. Correct me if I am wrong, but I'm afraid that pure AWK does not provide date computation support. That's why I did not implement this. So I would definitely vote to extend the repeater syntax with a count. 2. extending the syntax of timestamps so that something like: * Pick up Sam at school 2007-05-16 Wed 12:30 3+1w means repeat this event 3 times (rather than indefinitely). Or +1w:3 I assume that your initial example RRULE would require either ...4+1d or +1d:4 or something similar, I don't mind the syntax as long as it doesn't break other parts of timestamps. Has extending the syntax of the repeater interval been considered to allow finite number of repeats? I can offer to code something up for consideration if this sounds sensible. +1 Guido -- We're constantly being bombarded by insulting and humiliating music, which people are making for you the way they make those Wonder Bread products. Just as food can be bad for your system, music can be bad for your spirtual and emotional feelings. It might taste good or clever, but in the long run, it's not going to do anything for you. -- Bob Dylan, LA Times, September 5, 1984
Re: [O] advice needed: how do you guys sync org files between devices?
Ian Barton writes: On 01/07/13 13:06, Xebar Saram wrote: Hi all I have been using dropbox since i started using orgmode a few weeks ago (yeah im a neewb :)), which kinda works but i find it very annoying as it keeps creating conflicted copies, isnt reliable on my Linux main machine etc etc.. I was wondering what you guys do for syncing org files between PC's, Os's, devices (android etc).. I used to use Dropbox and git. However, as you have found I often got Conflicted Files. This is a particular problem if it happens in your .git folder, because it can lead to a corrupt git repo. Even though I have a remote git repo, this still lead to lots of wasted time trying to sort out the mess. Recently I have been using BitTorrent Sync from http://labs.bittorrent.com/experiments/sync.html So far this works really well. If you are using Linux you need to do a bit of fiddling to get it to run as your local user, as it doesn't preserve file permissions. So if you are running it as a daemon files at the remote end all get up being owned by root. The default is for two way synchronization. However, it's easy to set up one way sync. This is useful for backups. If you accidentally made a change in your backup, you wouldn't want it pushed back to your aster version. I also run a cron job on my laptop, which is my main work machine. Every hour this commits my org files to my git repo and pushes the changes to my remote on a different computer. Ian. Have you considered using git-annex with git-annex assistant? I'm doing this now... it automatically syncs on each file save. I also have it set up so that orgmode files get checked in as if regular git files rather than moved to the annex like: [annex] # uuid and version keys up here largefiles = largerthan=100kb and not (include=*.org or include=*.org_archive or include=*.txt or include=*.tex) This will thus commit any files 100kb and orgmode / latex files as just plain git files instead of moving them to the annex. I highly, highly recommend this setup. - Chris
Re: [O] Can `org-element-map' act on secondary-strings?
Thorsten Jolitz tjol...@gmail.com writes: Nicolas Goaziou n.goaz...@gmail.com writes: You don't need `org-data' type. The tree root doesn't have any property anyway. I used that because I wanted the whole parse-tree as return value, but no matter what `org-element-map' returns, it changes the parse-tree by side-effects anyway, so I can just ignore the return value and use the modified parse-tree stored somewhere instead - right? I have a hard time trying to imagine what you are trying to do. You should try to explain to us what you are trying to accomplish. Why are you storing a parse-tree? What does the parse-tree store? Does the buffer of which it is a representation change, when the parse tree changes. How are you trying to use the parse tree? Is it meant for one-way or two-way conversion - i.e., interpretation or exportation.
Re: [O] two latex bugs
renato renn...@gmail.com writes: Hi, 1) could someone please substitute last-command-char with last-command-event in cdlatex.el, as was suggested here [1], to be able to insert carets and underscores in math-mode? AFAIK, cdlatex.el is not part of emacs or org-mode, so you must have obtained your copy from Carsten's web site or perhaps from some less authoritative source. I just checked his website and he has made the change in his copy (probably some time ago). But until you fetch it again (or fix your own copy), you are not going to see the fix. The URL is http://staff.science.uva.nl/~dominik/Tools/cdlatex/cdlatex.el [1] http://lists.gnu.org/archive/html/emacs-orgmode/2013-05/msg00837.html -- Nick
Re: [O] Can `org-element-map' act on secondary-strings?
Jambunathan K kjambunat...@gmail.com writes: Thorsten Jolitz tjol...@gmail.com writes: Nicolas Goaziou n.goaz...@gmail.com writes: You don't need `org-data' type. The tree root doesn't have any property anyway. I used that because I wanted the whole parse-tree as return value, but no matter what `org-element-map' returns, it changes the parse-tree by side-effects anyway, so I can just ignore the return value and use the modified parse-tree stored somewhere instead - right? I have a hard time trying to imagine what you are trying to do. You should try to explain to us what you are trying to accomplish. Why are you storing a parse-tree? I'm transforming a parse tree for my needs, using `org-element-map', but since this functions returns what it mapped and, as Nicolas pointed out, its kind of fruitless to map top-level 'org-data type (since it has no property list), I store the parse-tree in some global variable that gives me easy access to the whole (modified) parse-tree. But its not really about storing something, thats just for convenience. I can (and do) wrap `org-element-map' into a function that receives a complete parse-tree and returns a complete parse-tree after modifying some parts of it (without storing something). What does the parse-tree store? its just about a complete parse-tree as produced by `org-element-parse-buffer' transformed into a different syntax in several steps. Does the buffer of which it is a representation change, when the parse tree changes. no, the parse-tree is only prepared to be digested by a different programming-language. How are you trying to use the parse tree? Is it meant for one-way or two-way conversion - i.e., interpretation or exportation. in the end it will be used for two-way conversion, but I'm still working on the from-elisp-to-... part (while learning how the org-mode parser and the export framework work). I don't want to talk too much about the project until I know its going to work out. When there is something tangible I will announce it... -- cheers, Thorsten
Re: [O] org-export-section-number-format does not work
On Mon, Jul 8, 2013 at 5:21 PM, Bastien b...@gnu.org wrote: Hi Jisang, Jisang Yoo jisang.yoo.ac+...@gmail.com writes: There seems no new option that can be found from exploring customization group org-export. You can check `org-html-format-headline-function' and its docstring as an example on how to customize the display of headlines in HTML. There are similar variables for other backends. HTH, -- Bastien (setq org-html-format-headline-function 'my-org-html-format-headline) (defun my-org-html-format-headline (todo todo-type priority text tags) Returns foo. foo) results in wrong-number-of-arguments error when I export to html. (setq org-html-format-headline-function 'org-html-format-headline) also results in the same kind of error.
Re: [O] org-export-section-number-format does not work
Hi Jisang, Jisang Yoo jisang.yoo.ac+...@gmail.com writes: (setq org-html-format-headline-function 'my-org-html-format-headline) (defun my-org-html-format-headline (todo todo-type priority text tags) Returns foo. foo) results in wrong-number-of-arguments error when I export to html. (setq org-html-format-headline-function 'org-html-format-headline) also results in the same kind of error. I confirm this bug. The code is too convoluted here, I hope someone will have the patience to fix this. -- Bastien
Re: [O] org-export-section-number-format does not work
Hello, Jisang Yoo jisang.yoo.ac+...@gmail.com writes: (setq org-html-format-headline-function 'my-org-html-format-headline) (defun my-org-html-format-headline (todo todo-type priority text tags) Returns foo. foo) results in wrong-number-of-arguments error when I export to html. (setq org-html-format-headline-function 'org-html-format-headline) also results in the same kind of error. Indeed. This should be fixed. Thank you. BTW, this function will only give you control over headline text, not its numbering. Using a filter (see org-export-filter-headline-functions) should allow you to set numbering to roman (e.g., with `org-export-number-to-roman' function). Regards, -- Nicolas Goaziou
[O] fill-paragraph broken
M-q anywhere here fills all three paragraphs together: # this is a paragraph. i want to fill it. # # this is too. and i commented the blank line because i am # a badass. # asdfasdf akjdn fkand sflkajnsd fklajns dfkjan dskfjna # kdsfn Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. Denmark: free Karina Hansen NOW.
Re: [O] advice needed: how do you guys sync org files between devices?
Thx Chris its funny you just posted this as of all the excellent responses in this thread i was looking into git-annex as a solution. The issue is that im not very technical (im an academic not a programmer) and its seems mighty complicated. Also in addition git-assistant is currently isnt available for windows (which im forced to use at work unfortunately..) do you know of a good (simple) guide for git-annex? would you mind to elaborate more on your complete setup? also do you use it to sync with android? thx alot and thank you all who sent responses, its greatly appreciated ! best -itai On Mon, Jul 8, 2013 at 11:53 AM, Christopher Allan Webber cweb...@dustycloud.org wrote: Ian Barton writes: On 01/07/13 13:06, Xebar Saram wrote: Hi all I have been using dropbox since i started using orgmode a few weeks ago (yeah im a neewb :)), which kinda works but i find it very annoying as it keeps creating conflicted copies, isnt reliable on my Linux main machine etc etc.. I was wondering what you guys do for syncing org files between PC's, Os's, devices (android etc).. I used to use Dropbox and git. However, as you have found I often got Conflicted Files. This is a particular problem if it happens in your .git folder, because it can lead to a corrupt git repo. Even though I have a remote git repo, this still lead to lots of wasted time trying to sort out the mess. Recently I have been using BitTorrent Sync from http://labs.bittorrent.com/experiments/sync.html So far this works really well. If you are using Linux you need to do a bit of fiddling to get it to run as your local user, as it doesn't preserve file permissions. So if you are running it as a daemon files at the remote end all get up being owned by root. The default is for two way synchronization. However, it's easy to set up one way sync. This is useful for backups. If you accidentally made a change in your backup, you wouldn't want it pushed back to your aster version. I also run a cron job on my laptop, which is my main work machine. Every hour this commits my org files to my git repo and pushes the changes to my remote on a different computer. Ian. Have you considered using git-annex with git-annex assistant? I'm doing this now... it automatically syncs on each file save. I also have it set up so that orgmode files get checked in as if regular git files rather than moved to the annex like: [annex] # uuid and version keys up here largefiles = largerthan=100kb and not (include=*.org or include=*.org_archive or include=*.txt or include=*.tex) This will thus commit any files 100kb and orgmode / latex files as just plain git files instead of moving them to the annex. I highly, highly recommend this setup. - Chris
Re: [O] agenda problem or my set up is a problem?
Noorul, On 7/8/2013 9:54 AM, Noorul Islam K M wrote: Charles mill...@verizon.net writes: Noorul, On 7/8/2013 8:36 AM, Noorul Islam K M wrote: Charles mill...@verizon.net writes: I just did a clean org mode install (twice) * Org-mode version 8.0.5 (release_8.0.5-318-gfdaa99 @ c:/cygwin/home/Charlie/elisp/Org-Mode/lisp/) * emacs GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-28 on MARVIN emacs on windows 7, home premium org on cywin 1.7.20 I call the agenda dispatcher; however when I attempt to call an agenda command the following error is returned Wrong type argument: sequencep, newline: No issues here with Org-mode version 8.0.5 (release_8.0.5-318-gfdaa99 @ /home/noorul/.emacs.d/site-lisp/org-mode/lisp/) GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2013-03-11 on noman Can you send a trace back? Thanks and Regards Noorul I'll have to try the trace later. I forgot to mention that until this morning org worked as advertised with my set up. It was not until I attempted to update that the problem surfaced. That is why I did a clean install. Ok, good. I have also discovered that capture no longer works - the same error is returned. The same is true for attempts to change the TODO states. Could there be a CR/LF mix up in the most recent commit that effects a windows set up. This could be windows specific issue. Thanks and Regards Noorul I ran M-x debug-on-entry for org-agenda-list and org-todo-list. Attached are the backtraces. Thanks, Charlie org-agenda-list-backtrace Description: Binary data org-todo-list-backtrace Description: Binary data
Re: [O] Problem with export
Hi Noorul, In preparing to answer you I did a little more digging. It turns out my update script had a bug in it so I was not going through the entire update process properly. I was pointing to a non-existent emacs (I had upgraded from 23.1 to 24.1 a few months ago) so none of the autoloads were being created. I didn't notice the problem as the mass of messages coming out of the build process (for the docs which worked) 'hid' the error message. Once I saved the log and studied it I was able to home in on the problem. Once I fixed it I was able to execute C-c C-e without problem. BTW, the version is 8.0.5 Mark On Mon, Jul 8, 2013 at 12:43 AM, Noorul Islam K M noo...@noorul.com wrote: Mark Elston melston1...@gmail.com writes: I have just upgraded my org to the latest from git. Now I cannot do an export. I have completely commented out any customization in my .emacs for org mode and the problem still remains. Every time I try to export (C-c C-e) I get: Debugger entered--Lisp error: (void-function org-export-dispatch) Any ideas what is happening? This was working with an older version of org (from mid last year). I am using the latest version of org and I don't get this error. May be you can post the output of (org-version) here. Also see that you do a clean compile. Usually this is what I do git pull make clean make Thanks and Regards Noorul
Re: [O] agenda problem or my set up is a problem?
Charles mill...@verizon.net writes: Noorul, On 7/8/2013 9:54 AM, Noorul Islam K M wrote: Charles mill...@verizon.net writes: Noorul, On 7/8/2013 8:36 AM, Noorul Islam K M wrote: Charles mill...@verizon.net writes: I just did a clean org mode install (twice) * Org-mode version 8.0.5 (release_8.0.5-318-gfdaa99 @ c:/cygwin/home/Charlie/elisp/Org-Mode/lisp/) * emacs GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) of 2012-08-28 on MARVIN emacs on windows 7, home premium org on cywin 1.7.20 I call the agenda dispatcher; however when I attempt to call an agenda command the following error is returned Wrong type argument: sequencep, newline: No issues here with Org-mode version 8.0.5 (release_8.0.5-318-gfdaa99 @ /home/noorul/.emacs.d/site-lisp/org-mode/lisp/) GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2013-03-11 on noman Can you send a trace back? Thanks and Regards Noorul I'll have to try the trace later. I forgot to mention that until this morning org worked as advertised with my set up. It was not until I attempted to update that the problem surfaced. That is why I did a clean install. Ok, good. I have also discovered that capture no longer works - the same error is returned. The same is true for attempts to change the TODO states. Could there be a CR/LF mix up in the most recent commit that effects a windows set up. This could be windows specific issue. Thanks and Regards Noorul I ran M-x debug-on-entry for org-agenda-list and org-todo-list. Attached are the backtraces. I think the attachment is not an error trace back. You need to do M-: (setq debug-on-error t) and execute the command. You are supposed to get a traceback. Please post the same. Thanks and Regards Noorul
Re: [O] agenda problem or my set up is a problem?
Noorul Islam K M noo...@noorul.com writes: Charles mill...@verizon.net writes: I ran M-x debug-on-entry for org-agenda-list and org-todo-list. Attached are the backtraces. I think the attachment is not an error trace back. You need to do M-: (setq debug-on-error t) and execute the command. You are supposed to get a traceback. Please post the same. Thanks and Regards Noorul It would also help if Charles ran uncompiled code - see the How to create a useful backtrace subsection of section 1.4, Feedback in the manual. -- Nick
[O] Orgmode fails to export specific web-links as latex/pdf
Hello all- When trying to export via latex - pdf, the following org-mode snippet fails to compile. Presumably there's something that should be changed in the export filters? Here's the org-mode snippet: - *** [[http://www.example.com:90/search~S2?/Xsearchtermsearchscope%3D2SORT%3DD/Xsearchtermsearchscope%3D2SORT%3DDSUBKEY%3Dsearchterm/1%252C742%252C742%252CB/framesetFF%3DXsearchtermsearchscope%3D2SORT%3DD16%252C16%252C][Title (mediatype) / Publisher]] - Relevant generated tex code: - \subsubsection{\href{http://www.example.com:90/search~S2?/Xsearchtermsearchscope=2SORT=D/Xsearchtermsearchscope=2SORT=DSUBKEY=searchterm/1%2C742%2C742%2CB/framesetFF=Xsearchtermsearchscope=2SORT=D16%2C16%2C}{Title (mediatype) / Publisher}} \label{sec-1-6-1} (Does this work?) - Relevant snippet from the latex log: - Runaway argument? {\href {http://www.example.com:90/search~S2?/Xsearchtermsearchscope=\ETC. ! File ended while scanning use of \@xdblarg. inserted text \par * /tmp/test.tex ! Emergency stop. * /tmp/test.tex ! == Fatal error occurred, no output PDF file produced! Transcript written on .//test.log. - I'm using org-mode release_8.0.5-316-g878d6c. Let me know if you have any ideas on what is going on, and how to make this work correctly. Regards, Mark
[O] org build/git problems
Ive been having problems with odt export which seem to be related to build issues which seem to be related to git issues. http://thread.gmane.org/gmane.emacs.orgmode/74409 In more detail: http://orgmode.org/worg/dev/org-build-system.html says that the build structure includes (among other makefiles) these --- org-mode/doc/Makefile org-mode/etc/Makefile org-mode/lisp/Makefile --- However on my system I 'find' as follows --- $ find . -iname makefile ./lisp/Makefile ./Makefile --- ie there are NO makefiles in etc doc etc. Only in lisp. So I conclude that the etc make which is needed to setup the odt export paths is not happening and so odt-export is barfing. So where are the makefiles? Running git status I get the following which among other things shows the makefiles from doc and etc as deleted. I am too much of a git noob to know what next!! --- $ git status # On branch master # Changes not staged for commit: # (use git add/rm file... to update what will be committed) # (use git checkout -- file... to discard changes in working directory) # #deleted:.dir-locals.el #deleted:.dir-settings.el #deleted:contrib/scripts/.gitignore #deleted:contrib/scripts/dir2org.zsh #deleted:contrib/scripts/ditaa.jar #deleted:contrib/scripts/docco.css #deleted:contrib/scripts/org-docco.org #deleted:contrib/scripts/staticmathjax/.gitignore #deleted:contrib/scripts/staticmathjax/README.org #deleted:contrib/scripts/staticmathjax/chrome/chrome.manifest #deleted:contrib/scripts/staticmathjax/chrome/content/main.js #deleted:contrib/scripts/staticmathjax/chrome/content/main.xul #deleted:contrib/scripts/staticmathjax/defaults/preferences/prefs.js #deleted:contrib/scripts/x11idle.c #deleted:doc/.aspell.org.conf #deleted:doc/.nosearch #deleted:doc/Documentation_Standards.org #deleted:doc/Makefile #deleted:doc/dir #deleted:etc/Makefile #deleted:mk/fake_change_log.pl #deleted:mk/git-changelog #deleted:mk/guidesplit.pl #deleted:mk/list-hooks.pl #deleted:mk/manfull.pl #deleted:mk/mansplit.pl #deleted:request-assign-future.txt #deleted:testing/.gitignore #deleted:testing/examples/include.org #deleted:testing/examples/include2.org #deleted:testing/examples/link-in-heading.org #deleted:testing/examples/links.org #deleted:testing/examples/no-heading.org #deleted:testing/examples/normal.org #deleted:testing/examples/ob-awk-test.in #deleted:testing/examples/ob-awk-test.org #deleted:testing/examples/ob-lilypond-broken.ly #deleted:testing/examples/ob-lilypond-broken.org #deleted:testing/examples/ob-lilypond-test.error #deleted:testing/examples/ob-lilypond-test.ly #deleted:testing/examples/ob-lilypond-test.org #deleted:testing/examples/ob-maxima-test.org #deleted:testing/examples/ob-octave-test.org #deleted:testing/examples/ob-screen-test.org #deleted:testing/examples/org-exp.org #deleted:testing/examples/property-inheritance.org #deleted:testing/jump # no changes added to commit (use git add and/or git commit -a)
Re: [O] org build/git problems
On Tue, Jul 9, 2013 at 8:27 AM, Rustom Mody rustompm...@gmail.com wrote: Ive been having problems with odt export which seem to be related to build issues which seem to be related to git issues. http://thread.gmane.org/gmane.emacs.orgmode/74409 In more detail: Ran a git reset --hard The deleted status-es disappeared Now odt export is working. So two questions: 1. What could have happened that those files vanished? 2. Is it possible with the new build system to run org compiled but in-tree. I do not like to run org from a separate build-directory than the git directory because it creates one more nook for versionitits. See thread http://thread.gmane.org/gmane.emacs.orgmode/73974/
Re: [O] org-export-section-number-format does not work
Jisang Yoo jisang.yoo.ac+...@gmail.com writes: On Mon, Jul 8, 2013 at 5:21 PM, Bastien b...@gnu.org wrote: Hi Jisang, Jisang Yoo jisang.yoo.ac+...@gmail.com writes: There seems no new option that can be found from exploring customization group org-export. You can check `org-html-format-headline-function' and its docstring as an example on how to customize the display of headlines in HTML. There are similar variables for other backends. HTH, -- Bastien (setq org-html-format-headline-function 'my-org-html-format-headline) (defun my-org-html-format-headline (todo todo-type priority text tags) Returns foo. foo) results in wrong-number-of-arguments error when I export to html. (setq org-html-format-headline-function 'org-html-format-headline) also results in the same kind of error. I think all that's needed is to add an explicit nil at the end of the apply call in ox-html.el:org-html-format-headline--wrap, line 2246, like this: --8---cut here---start-8--- ... (apply format-function todo todo-type priority text tags :headline-label headline-label :level level :section-number section-number extra-keys nil))) --8---cut here---end---8--- I'm not 100% sure about that but it seems to work for me both in the default case and also with Jisang's setting - can somebody verify? But getting there was not trivial: the CL-isms certainly do not help, primarily because I had to understand them to figure out what was going on, but also because they obscured the problem: when I tried to edebug org-html-format-headline--wrap I get , | edebug-syntax-error: Invalid read syntax: Failed matching, ([rest | arg] [optional [optional cl-optional-arg rest cl-optional-arg]] | [optional [rest arg]] [optional [key [cl-key-arg rest | cl-key-arg] optional allow-other-keys]] [optional [aux rest | or (symbolp optional def-form) symbolp]]) ` and the cursor is left at the ampersand of allow-other-keys. OTOH, when I try to edebug org-html-inlinetask which contains a similar CL-ism, there is no problem. So something is tripping edebug up but it's not clear what. -- Nick
Re: [O] How to remove spaces for soft line-breaks
Hi Bastien, Yujie On 2013-07-08 17:22, Bastien wrote: Hi Yujie, Yujie Wen yjwen...@gmail.com writes: I am wondering whether there is a way to forbid such spaces, or if no such a way, whether it is possible to work out a patch to forbid it. I would try M-x visual-line-mode RET and see if you like it. Well, this will not solve the problem for the OP, which occurs during export. What has to be done, I think, is to remove the CR/LF characters for Chinese (and Japanese, Korean etc.) text when exporting to HTML, because they will otherwise show up in the displayed HTML as single space characters. I guess, this requires either a derived custom export engine or a internationalization framework that allows the specification of the text language. Christian -- Christian Wittern, Kyoto
Re: [O] How to remove spaces for soft line-breaks
Hi, Christian, 2013/7/9 Christian Wittern cwitt...@gmail.com Hi Bastien, Yujie On 2013-07-08 17:22, Bastien wrote: Hi Yujie, Yujie Wen yjwen...@gmail.com writes: I am wondering whether there is a way to forbid such spaces, or if no such a way, whether it is possible to work out a patch to forbid it. I would try M-x visual-line-mode RET and see if you like it. Well, this will not solve the problem for the OP, which occurs during export. What has to be done, I think, is to remove the CR/LF characters for Chinese (and Japanese, Korean etc.) text when exporting to HTML, because they will otherwise show up in the displayed HTML as single space characters. I used to thinking of removing CR/LF at the parsing or exporting stage. But now I think it is not a perfect solution since it will remove by mistake some meaningful spaces. For example, in an English/Chinese mixed texts whereas lines are sometimes broken at between two English words, which is often the case when we fill graphs with m-q. Discerning meaningful and meaningless spaces for Chinese and Japanese is rather too complicated a topic. Chinese rarely use spaces for separating words, Japanese sometimes use spaces for separating syntax elements. Korean, by my instinct at staring on Korean scripts, does use spaces to separate words. I guess, this requires either a derived custom export engine or a internationalization framework that allows the specification of the text language. Christian -- Christian Wittern, Kyoto Regards, Yujie