Re: [O] Org release 8.2.5g (minor release from maint)
Hi Eric, Eric Schulte schulte.e...@gmail.com writes: Oh, I did not realize `subseq' was part of the cl library. Since it seems subseq is a generally useful utility, would there be any appetite for implementing an org-subseq function? There was already org-sublist, which I adapted to mimic the behavior of subseq. Can you try the attached patch and see if it works as advertized? Thanks, Changes in stash@{0}^2^..stash@{0} 3 files changed, 10 insertions(+), 9 deletions(-) lisp/ob-lob.el| 4 ++-- lisp/org-table.el | 4 ++-- lisp/org.el | 11 ++- Modified lisp/ob-lob.el diff --git a/lisp/ob-lob.el b/lisp/ob-lob.el index c93198a..210dbb4 100644 --- a/lisp/ob-lob.el +++ b/lisp/ob-lob.el @@ -148,12 +148,12 @@ if so then run the appropriate source block from the Library. ;; hash evaluation, since for a call line :var ;; extension *is* execution. (let ((params (nth 2 pre-info))) - (append (subseq pre-info 0 2) + (append (org-subseq pre-info 0 2) (list (cons (cons :c-var (cdr (assoc :var params))) (assq-delete-all :var (copy-tree params -(subseq pre-info 3)) +(org-subseq pre-info 3)) (old-hash (when cache-p (org-babel-current-result-hash pre-info))) (org-babel-current-src-block-location (point-marker))) (if (and cache-p (equal new-hash old-hash)) Modified lisp/org-table.el diff --git a/lisp/org-table.el b/lisp/org-table.el index 520ac8a..38a9171 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -2698,8 +2698,8 @@ not overwrite the stored one. (replace-match (save-match-data (org-table-make-reference - (org-sublist - fields (string-to-number (match-string 1 form)) + (org-subseq + fields (1- (string-to-number (match-string 1 form))) (string-to-number (match-string 2 form))) keep-empty numbers lispp)) t t form))) Modified lisp/org.el diff --git a/lisp/org.el b/lisp/org.el index 41fb22c..32f27b1 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -22059,12 +22059,13 @@ so values can contain further %-escapes if they are define later in TABLE. (setq string (replace-match sref t t string) string)) -(defun org-sublist (list start end) +;; This reimplements subseq from cl-subseq +(defun org-subseq (list start optional end) Return a section of LIST, from START to END. -Counting starts at 1. - (let (rtn (c start)) -(setq list (nthcdr (1- start) list)) -(while (and list (= c end)) +END is optional and counting starts at 0. + (let ((c start) (end (or end (length list))) rtn) +(setq list (nthcdr start list)) +(while (and list ( c end)) (push (pop list) rtn) (setq c (1+ c))) (nreverse rtn))) -- Bastien
Re: [O] Tables with line wrapping?
Hi Peter, Peter Davis p...@pfdstudio.com writes: This looks really interesting also. Is this feature going to fund its way to the trunk at some point? Sadly no, because Jambunathan does not want to sign the copyright agreement that would be requested for this. -- Bastien
Re: [O] Emacs Mac Port
Marcelo de Moraes Serpa celose...@gmail.com writes: @Bastien Yeah, this is one of my favorite features. Check it out: http://screencast.com/t/RVd0wfTJzVt Thanks! Looks neat indeed. -- Bastien
Re: [O] css classes to tables in html export
Hi Vikas, Vikas Rawal vikasli...@agrarianresearch.org writes: How do I add custom css classes to tables while publishing my project? C-h v org-html-table-* TAB HTH, -- Bastien
Re: [O] Best way to generate textile from orgmode ?
Hi Yasushi, Yasushi SHOJI ya...@atmark-techno.com writes: https://github.com/yashi/org-textile Great, thanks for sharing this! -- Bastien
Re: [O] [BUG] in org-element-link-parser (lilypond file does not export to latex)
Hello, Thorsten Jolitz tjol...@gmail.com writes: when trying to export this example lilypond file https://raw.github.com/mjago/ob-lilypond/master/examples/basic-mode/pdf-example/pdf-example.org to LaTeX (C-c C-e l L) I hit the following error: ,-- | Wrong type argument: integer-or-marker-p, nil `-- I cannot reproduce it. OTOH, I don't have Lilypond installed. It turns out that org-element tries to parse a link but ,-- | (defun org-element-link-parser () | Parse link at point. `-- Could you provide an ECM, that is the exact link generating this error? Regards, -- Nicolas Goaziou
Re: [O] MobileOrg 1.5.2 - Dropbox sync error
Hi Erwin, better to ask the MobileOrg developers directly I guess. HTH, -- Bastien
Re: [O] [bug] Incompatible agenda commands
Hi Sébastien, Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org writes: (setq org-agenda-sticky nil) and you'll be bitten by that bug! Still not bitten by this bug :) -- Bastien
Re: [O] org-agenda-do-date-late and emacs freeze
Hi Igor, Igor Sosa Mayor joseleopoldo1...@gmail.com writes: If I try to reproduce the error, I get this message: Debugger entered--Lisp error: (quit) org-agenda-fix-tags-filter-overlays-at(5696) org-agenda-show-new-time(#marker at 5932 in privat.org 2014-02-19 mié) org-agenda-date-later(1) org-agenda-do-date-later(nil) call-interactively(org-agenda-do-date-later nil nil) Thanks -- can't reproduce this... but make sure to tell us what version of Org and Emacs you are using M-x org-version RET M-x emacs-version RET -- Bastien
Re: [O] org-export: how to copy the parsed tree?
Vitalie Spinu spinu...@gmail.com writes: Is there an easy way to copy org sub-tree in :filter-parse-tree? The structure of the parsed tree is somewhat complicated with recursive references to parents in multiple places. So, copy-tree infloops. You will get a better answer most likely, but with (org-no-properties contents) you can get the original Org-syntax of a parse-tree element, e.g. applied to all sections (untested): , | (defun org-myexp-section (section contents info) | Transcode SECTION element into myexp syntax. | CONTENTS is its contents, as a string or nil. INFO is ignored. | (if (and contents (stringp contents) ( (length contents) 0)) | (format %S | (org-no-properties contents)) | )) ` -- cheers, Thorsten
Re: [O] Problems with org-drill installation
Hi Shahin, when installing from the tarball, you should run ~$ make autoloads or ~$ make so that M-x org-version RET returns the correct version. When installing from ELPA, you should do it from a fresh emacs session. Let me know if that helps, -- Bastien
Re: [O] Org indent mode
Got it. Thanks. On Sat, Mar 1, 2014 at 3:46 PM, Josiah Schwab jsch...@gmail.com wrote: Yes. We are clearly talking past each other. You need to set the org-hide text style (or face) so that it is the same color as your background. Then the stars will appear invisible. This is explained in the section of the docs I linked to: The leading stars are not truly replaced by whitespace, they are only fontified with the face org-hide that uses the background color as font color. If you are not using either white or black background, you may have to customize this face to get the wanted effect. Here's one way you might do that. Do M-x apropos and then search for org-hide. Click org-hide and then click customize this face. Then set the foreground color to be the same as your background color. Hope that helps. Josiah On Fri, Feb 28, 2014 at 8:27 PM, Chris Henderson henders...@gmail.comwrote: Hi, I'm not sure how to customize this. I have tried different variations of #+STARTUP: hidestars #+STARTUP: odd #+STARTUP: oddeven but they don't seem to be working. Maybe I'm doing something wrong. On Sat, Mar 1, 2014 at 3:10 PM, Josiah Schwab jsch...@gmail.com wrote: But did you try customizing the org-hide face? Josiah On Feb 28, 2014 7:14 PM, Chris Henderson henders...@gmail.com wrote: I've added (setq org-hide-leading-stars t) but still getting the leading stars. Thanks. On Sat, Mar 1, 2014 at 1:45 PM, Josiah Schwab jsch...@gmail.comwrote: You may need to customize the org-hide face. See the section Hiding Leading Stars at http://orgmode.org/manual/Clean-view.html Josiah On Fri, Feb 28, 2014 at 6:27 PM, Chris Henderson henders...@gmail.com wrote: I'm trying to setup Org indent mode for cleaner view but the preceding starts show up dimmed in grey color. How do I make them totally invisible? I've put this at the top of the .emacs: (setq org-startup-indented t) (setq org-indent-mode t) and running emacs version 24.3.1 and org version 8.2.5 from the command-line.
Re: [O] Bug: shift-enter in org tables leaves cursor in wrong position [8.2.5h (8.2.5h-6-g8e1386-elpa @ /cygdrive/c/Users/jason/.emacs.d/elpa/org-20140203/)]
Hi Michael, Michael Brand michael.ch.br...@gmail.com writes: is a regression for Shift-enter on 1 in the table below when hyperlinks are configured to be literal: | [[http://www.orgmode.org]] | 1 | | | [[http://www.orgmode.org]] | | | | [[http://www.orgmode.org]] | | | You mean when `bracket' is not part of `org-activate-links'? I can reproduce the problem... but it goes away when I instrument `org-move-to-column' for debugging. I'll have to digg deeper -- if you have more information on your side, please share. Thanks, -- Bastien
Re: [O] Problem upgrading org mode
Hi Arunabha, Arunabha Ghosh arunabha...@gmail.com writes: (add-to-list 'load-path /Users/agh/arun/dev/org-mode/lisp t) (add-to-list 'load-path /Users/agh/arun/dev/org-mode/contrib/lisp t) Quick guess: don't use the `t' at the end. Let me know, -- Bastien
Re: [O] Org release 8.2.5g (minor release from maint)
Eric Schulte writes: Oh, I did not realize `subseq' was part of the cl library. Since it seems subseq is a generally useful utility, would there be any appetite for implementing an org-subseq function? No, please. Besides, copying the info structure twice to splice in one changed element seems wasteful with or without using sublist. I look forward to the day when Org-mode can simply require cl-lib and cease maintaining org- versions of common cl utilities. WIth cl-lib in ELPA I don't really see what's the holdup there if you want to go that route. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Samples for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra
Re: [O] [BUG] in org-element-link-parser (lilypond file does not export to latex)
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Thorsten Jolitz tjol...@gmail.com writes: when trying to export this example lilypond file https://raw.github.com/mjago/ob-lilypond/master/examples/basic-mode/pdf-example/pdf-example.org to LaTeX (C-c C-e l L) I hit the following error: ,-- | Wrong type argument: integer-or-marker-p, nil `-- I cannot reproduce it. OTOH, I don't have Lilypond installed. It turns out that org-element tries to parse a link but ,-- | (defun org-element-link-parser () | Parse link at point. `-- Could you provide an ECM, that is the exact link generating this error? This is the first code block of the original .org file with one link (that could not be exported really, because it was evaluated on another machine so the eps did not really exist on my machine. But the org parser choked with this kind of result-links: #+begin_src org #+TITLE: Modes in the Key of C #+DATE: #+OPTIONS: timestamp:nil num:nil toc:nil #+LaTeX_HEADER: \usepackage[cm]{fullpage} * Ionian Mode Lorem ipsum dolor sit amet #+LaTeX: \linebreak #+ATTR_LaTeX: width=17cm #+begin_src lilypond :file ionian.eps :noweb yes version-and-paper \relative c' { c d e f g a b c b a g f e d c d e f g a b c b a g f e d c1 } #+end_src #+results[0c21e5c5bd30d880d2bd230aa09b7613c2554835]: [[file:ionian.eps]] #+end_src Here is what I get when I delete the above result link and evaluate the code-block on my machine - this parses and exports fine: #+begin_src org #+TITLE: Modes in the Key of C #+DATE: #+OPTIONS: timestamp:nil num:nil toc:nil #+LaTeX_HEADER: \usepackage[cm]{fullpage} * Ionian Mode Lorem ipsum dolor sit amet #+LaTeX: \linebreak #+ATTR_LaTeX: width=17cm #+begin_src lilypond :file ionian.eps :noweb yes version-and-paper \relative c' { c d e f g a b c b a g f e d c d e f g a b c b a g f e d c1 } #+end_src #+results: [[file:ionian.eps]] #+end_src -- cheers, Thorsten
Re: [O] org-export: how to copy the parsed tree?
Thorsten Jolitz tjol...@gmail.com writes: Vitalie Spinu spinu...@gmail.com writes: Is there an easy way to copy org sub-tree in :filter-parse-tree? The structure of the parsed tree is somewhat complicated with recursive references to parents in multiple places. So, copy-tree infloops. You will get a better answer most likely, but with (org-no-properties contents) you can get the original Org-syntax of a parse-tree element, e.g. applied to all sections (untested): , | (defun org-myexp-section (section contents info) | Transcode SECTION element into myexp syntax. | CONTENTS is its contents, as a string or nil. INFO is ignored. | (if (and contents (stringp contents) ( (length contents) 0)) | (format %S | (org-no-properties contents)) | )) ` I probably misunderstood your question. I don't know if there is an easy way to copy a subtree, but I do know about the problems with the recursive references, so I found a way to replace them with simple numeric :org-elem-id and :parent-id attributes: , | :filters-alist '((:filter-parse-tree | . org-myexp-filter-parse-tree-function) ` #+begin_src emacs-lisp (defun org-myexp-filter-parse-tree-function (tree backend info) Filter complete parsed TREE ignoring BACKEND and INFO. ;; optional (org-myexp-add-children (org-myexp-add-parent-ids (org-myexp-add-ids tree backend info) backend info) backend info)) (defun org-myexp-add-ids (tree backend info) Add ':org-elem-id' property to each element of parse TREE. (let ((counter 1) (structure 1)) (org-element-map tree myexp-default-map-types (lambda (--elem) (org-element-put-property --elem :org-elem-id counter) (setq counter (1+ counter)) (and (eq (org-element-type --elem) 'plain-list) (org-element-put-property --elem :structure-id structure) (setq structure (1+ structure)) tree) (defun org-myexp--collect-children (tree) Return alist with '(org-elem-id . parent-id)' pairs. The data is collected from parse TREE. (let (child-lst) (org-element-map tree 'headline (lambda (--headline) (push (cons (org-element-property :org-elem-id --headline) (org-element-property :parent-id --headline)) child-lst))) child-lst)) ;; optional (defun org-myexp-add-children (tree backend info) Add `:children' property to each headline in parse TREE. Assumes that all headlines are tagged with an `:org-elem-id' property and that the circular-list read-syntax of the `:parent' attribute has been replaced with simple integer values (the :org-elem-id of the elements parent). (let ((pairs (org-myexp--collect-children tree))) (org-element-map tree 'headline (lambda (--elem) (org-element-put-property --elem :children (reverse (delq nil (mapcar (lambda (--pair) (and (eq (cdr --pair) (org-element-property :org-elem-id --elem)) (car --pair))) pairs))) tree) (defun org-myexp-add-parent-ids (tree backend info) Add `:parent-id' and `:parent-structure-id' to parse-tree TREE. (org-element-map tree myexp-all-map-types (lambda (--elem) (let ((par (org-element-property :parent --elem))) (and (eq (org-element-type --elem) 'item) (eq (org-element-type par) 'plain-list) (org-element-put-property --elem :parent-structure-id (org-element-property :structure-id par))) (org-element-put-property --elem :parent-id (if (eq (org-element-type par) 'org-data) 0 (org-element-property :org-elem-id par) nil nil nil 'WITH-AFFILIATED) tree) #+end_src Then in the transcode functions I build the parse-tree again without the circular :parent attribut, but with the information contained in it now contained in :org-elem-id and :parent-id: #+begin_src emacs-lisp (defun org-myexp-headline (headline contents info) Transcode HEADLINE element into myexp syntax. CONTENTS is its contents, as a string or nil. INFO is ignored. (let ((props org-myexp-node-properties)) (setq org-myexp-node-properties nil) (format (headline %S %s) (list 'org-elem-id (org-element-property :org-elem-id headline) 'parent-id (org-element-property :parent-id headline) [...]) (org-no-properties contents #+end_src Not really an easy way, and I needed it for a very special purpose so it might not fit your needs. However, this can be used to convert the circular parse-tree to a
Re: [O] Bug: shift-enter in org tables leaves cursor in wrong position [8.2.5h (8.2.5h-6-g8e1386-elpa @ /cygdrive/c/Users/jason/.emacs.d/elpa/org-20140203/)]
Hi Bastien On Sat, Mar 1, 2014 at 10:02 AM, Bastien b...@gnu.org wrote: Michael Brand michael.ch.br...@gmail.com writes: is a regression for Shift-enter on 1 in the table below when hyperlinks are configured to be literal: | [[http://www.orgmode.org]] | 1 | | | [[http://www.orgmode.org]] | | | | [[http://www.orgmode.org]] | | | You mean when `bracket' is not part of `org-activate-links'? I don't know if and how the variable org-activate-links is related. I used the function org-toggle-link-display or the menu to get the state with the variable org-descriptive-links being nil which is for display the full links literally. Michael
Re: [O] binding org-id-goto to a key
Thx Bastien as always your answers are spot on and brilliant. i want to personally thank you again for everything you've contributed to the community in the past years, anytime i read a blog post of yours or a post in the mailing lists its always such a joy. its really appreciated! best Z On Sat, Mar 1, 2014 at 9:01 AM, Bastien b...@gnu.org wrote: Hi Xebar, Xebar Saram zelt...@gmail.com writes: im trying to bind some headers to specific keys using the org-id-goto command and so far have this: (global-set-key (kbd f9 l) 'org-id-goto 8460d499-ea32-4693-a8d4-0d08b00ba3f3) but im aware that this code isnt wrong. can anyone guide me in the right direction? (global-set-key (kbd C-f9) (lambda () (interactive) (org-id-goto 8460d499-ea32-4693-a8d4-0d08b00ba3f3))) For (kbd f9 l) to work, you need to have f9 to be a prefix key, so I changed it to (kbd C-f9) for my own test. (lambda () ...) is an anonymous function. (interactive) makes the function an interactive command, which is needed for the form to be bound to the key. HTH, -- Bastien
Re: [O] Bug: shift-enter in org tables leaves cursor in wrong position [8.2.5h (8.2.5h-6-g8e1386-elpa @ /cygdrive/c/Users/jason/.emacs.d/elpa/org-20140203/)]
Hi Michael, Michael Brand michael.ch.br...@gmail.com writes: I don't know if and how the variable org-activate-links is related. I used the function org-toggle-link-display or the menu to get the state with the variable org-descriptive-links being nil which is for display the full links literally. I see. The following patch fixes it but it's just a quick try, I need to review possible side-effects more carefully. In the meantime, if you can confirm it works for you, that'd help. Thanks, diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 1553e4f..9837e13 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -344,9 +344,12 @@ Works on both Emacs and XEmacs. (indent-line-to column))) (defun org-move-to-column (column optional force buffer ignore-invisible) - (let ((buffer-invisibility-spec ignore-invisible)) + (let ((buffer-invisibility-spec + (and ignore-invisible + (member '(org-link) buffer-invisibility-spec (if (featurep 'xemacs) - (org-xemacs-without-invisibility (move-to-column column force buffer)) + (org-xemacs-without-invisibility + (move-to-column column force buffer)) (move-to-column column force (defun org-get-x-clipboard-compat (value) -- Bastien
Re: [O] org-export: how to copy the parsed tree?
Hello, Vitalie Spinu spinu...@gmail.com writes: Is there an easy way to copy org sub-tree in :filter-parse-tree? The structure of the parsed tree is somewhat complicated with recursive references to parents in multiple places. So, copy-tree infloops. This is not really an answer to your question, but do you really need to copy the full tree? There are tools to modify it. You can also build a new parse tree and return it. Regards, -- Nicolas Goaziou
Re: [O] [BUG] in org-element-link-parser (lilypond file does not export to latex)
Thorsten Jolitz tjol...@gmail.com writes: This is the first code block of the original .org file with one link (that could not be exported really, because it was evaluated on another machine so the eps did not really exist on my machine. But the org parser choked with this kind of result-links: #+begin_src org #+TITLE: Modes in the Key of C #+DATE: #+OPTIONS: timestamp:nil num:nil toc:nil #+LaTeX_HEADER: \usepackage[cm]{fullpage} * Ionian Mode Lorem ipsum dolor sit amet #+LaTeX: \linebreak #+ATTR_LaTeX: width=17cm #+begin_src lilypond :file ionian.eps :noweb yes version-and-paper \relative c' { c d e f g a b c b a g f e d c d e f g a b c b a g f e d c1 } #+end_src #+results[0c21e5c5bd30d880d2bd230aa09b7613c2554835]: [[file:ionian.eps]] #+end_src I still don't get any export error. Neither on maint nor on master. Regards, -- Nicolas Goaziou
[O] bug#16751: 24.3.50; Export during Org export to HTML
Date: Tue, 25 Feb 2014 19:49:02 +0200 From: Eli Zaretskii e...@gnu.org Cc: sva-n...@mygooglest.com, 16...@debbugs.gnu.org From: Bastien b...@altern.org Cc: Sebastien Vauban sva-n...@mygooglest.com, 16...@debbugs.gnu.org Date: Tue, 25 Feb 2014 18:12:05 +0100 Eli Zaretskii e...@gnu.org writes: Ugh. Bastien, could you (or someone else of Org developers) please look into this? Why does the URI above causes the recent version of Org to pass an invalid file name such as ///opt/tomcat/4/apache-tomcat-4.1.40/... to expand-file-name I will look into this, but I can't promise anything before next week. Thanks. There's no rush. I will fix expand-file-name so it doesn't crash with such bogus file names. I fixed expand-file-name (trunk revision 116624). I'm keeping the bug open until the Org part is either fixed or we decide it doesn't need fixing.
Re: [O] [BUG] in org-element-link-parser (lilypond file does not export to latex)
Nicolas Goaziou n.goaz...@gmail.com writes: Thorsten Jolitz tjol...@gmail.com writes: This is the first code block of the original .org file with one link (that could not be exported really, because it was evaluated on another machine so the eps did not really exist on my machine. But the org parser choked with this kind of result-links: #+begin_src org #+TITLE: Modes in the Key of C #+DATE: #+OPTIONS: timestamp:nil num:nil toc:nil #+LaTeX_HEADER: \usepackage[cm]{fullpage} * Ionian Mode Lorem ipsum dolor sit amet #+LaTeX: \linebreak #+ATTR_LaTeX: width=17cm #+begin_src lilypond :file ionian.eps :noweb yes version-and-paper \relative c' { c d e f g a b c b a g f e d c d e f g a b c b a g f e d c1 } #+end_src #+results[0c21e5c5bd30d880d2bd230aa09b7613c2554835]: [[file:ionian.eps]] #+end_src I still don't get any export error. Neither on maint nor on master. Strangely enough, I cannot reproduce this error anymore today, although it was there yesterday. So ... sorry for the noise. -- cheers, Thorsten
Re: [O] org-capture doesn't narrow correctly if :prepend is t
Carsten Dominik carsten.dominik at gmail.com writes: Hi Adam, it is in my queue, but I have not yet had time to look at it. - Carsten +1 for this issue. It's still there in 8.2.5h. Looking forward to a fix! - Thomas
Re: [O] Blank page in LaTeX/PDF output
John Hendy jw.he...@gmail.com writes: On Fri, Feb 28, 2014 at 9:39 PM, Peter Davis p...@pfdstudio.com wrote: On 2/28/14, 10:32 PM, Nick Dokos wrote: You need *some* images in order to compile it. I just replaced all the image links with [[./foo.png]] I did not need any images. In fact, the version I posted I had just tested, and the image links in there are completely bogus. I just get empty boxes of the height I specified. Indeed - I first tried it by hand, running pdflatex on the command line and got what I thought were errors, but they were warnings only: I hit RET to continue past them and got the same empty boxes you got. And doing C-c C-e l o to go straight to PDF does the same thing. where foo.png is the emacs logo. And my koma-article is a copy of the article class, except the document class is scrartcl instead of article. I don't know where that came from. I can post my copy of koma-article, if that would help. We really need a minimal config, in my opinion. I just tried fiddling again and am having no luck after installing koma-script from CTAN (or is that even something I need?) and adding =(require 'ox-koma-letter)= to my emacs config (again, is that even needed?). I don't use koma, so I'm lost as to how to get anything usable from your document in order to troubleshoot. No, you don't need ox-koma-letter at all. You do need to have the scrartcl class from koma-script installed - check with kpsewhich - I get: , | $ kpsewhich scrartcl.cls | /usr/share/texmf-texlive/tex/latex/koma-script/scrartcl.cls ` and you need to have a koma-article class added to org-latex-classes. Here's what I used, but Peter may have a different definition (something must explain why we get different results!): --8---cut here---start-8--- (setq koma-article-class '(koma-article \\documentclass[11pt]{scrartcl} (\\section{%s} . \\section*{%s}) (\\subsection{%s} . \\subsection*{%s}) (\\subsubsection{%s} . \\subsubsection*{%s}) (\\paragraph{%s} . \\paragraph*{%s}) (\\subparagraph{%s} . \\subparagraph*{%s}))) (progn (require 'ox-latex) (add-to-list 'org-latex-classes koma-article-class t)) --8---cut here---end---8--- -- Nick
Re: [O] Org release 8.2.5g (minor release from maint)
Achim Gratz strom...@nexgo.de writes: Eric Schulte writes: I look forward to the day when Org-mode can simply require cl-lib and cease maintaining org- versions of common cl utilities. WIth cl-lib in ELPA I don't really see what's the holdup there if you want to go that route. I have the impression that cl-lib is (was?) frowned upon by upstream for packages that are included in the emacs distribution. But it's only a vague recollection at this point: am I wrong? am I thinking of something else common-lispish? -- Nick
Re: [O] Blank page in LaTeX/PDF output
John Hendy jw.he...@gmail.com writes: If you could include a minimal Emacs config as well, that would help others reproduce easier to help figure out what's going on. One more thing (for Peter): if you could produce the tex file and pdflatex it by hand, can you also post the log file it produces somewhere? If it's too big for the list, maybe pastebin it somewhere? -- Nick
Re: [O] Bug: shift-enter in org tables leaves cursor in wrong position [8.2.5h (8.2.5h-6-g8e1386-elpa @ /cygdrive/c/Users/jason/.emacs.d/elpa/org-20140203/)]
Hi Bastien On Sat, Mar 1, 2014 at 12:13 PM, Bastien b...@gnu.org wrote: I see. The following patch fixes it but it's just a quick try, I need to review possible side-effects more carefully. In the meantime, if you can confirm it works for you, that'd help. The patch works, thank you. I'll continue to use it. Michael
Re: [O] Blank page in LaTeX/PDF output
Peter Davis p...@pfdstudio.com writes: On 2/28/14, 7:38 PM, Nick Dokos wrote: John is correct, I think, although latex's behavior in leaving an empty page does not make much sense to me. Nevertheless, when I reduce the height of the last image to less than about 7.85 inches, the empty page goes away. AFAICT, num: and toc: settings do not affect this behavior. Thanks, Nick, but I have confirmed that adding num:nil eliminates the blank page, and removing that re-introduces the blank page. No other changes to the .org file were made. I was wondering if LaTeX has some predisposition to handle numbered section headings differently from unnumbered ones as far as pagination. I'll try to make a simple, clean sample that reproduces it, but it's going to take some trial-and-error testing. Nevertheless, can you please reduce the size of the last image to 7.8in and see whether the empty page goes away? Nick
Re: [O] Blank page in LaTeX/PDF output
Here are the two LaTeX files. The only differences, apart from creation time, are the the use of \section* instead of \section, so perhaps this is a LaTeX bug. Anyone know how to report that? -pd -- Peter Davis The Tech Curmudgeon www.techcurmudgeon.com no-blank-page-bug.tex Description: TeX document blank-page-bug.tex Description: TeX document
[O] References
I'm using [fn:1] to reference articles in an academic article, but how should I reference it back from the list of references at the end of the article please? Thanks Sharon. -- A taste of linux = http://www.sharons.org.uk my git repo = https://bitbucket.org/boudiccas/dots Debian testing, Fluxbox 1.3.5, emacs 24.3.50.1 Registered Linux user 561944 signature.asc Description: PGP signature
Re: [O] References
Sharon Kimble boudic...@talktalk.net writes: I'm using [fn:1] to reference articles in an academic article, but how should I reference it back from the list of references at the end of the article please? Thanks Sharon. Not sure what you mean: in the org-mode buffer or in some exported file? In the former case, C-c C-c on the footnote marker in the text takes you to the footnote and C-c C-c on the footnote marker in the footnote takes you back. -- Nick
Re: [O] org-export: how to copy the parsed tree?
Nicolas Goaziou on Sat, 01 Mar 2014 12:36:30 +0100 wrote: Hello, Vitalie Spinu spinu...@gmail.com writes: Is there an easy way to copy org sub-tree in :filter-parse-tree? The structure of the parsed tree is somewhat complicated with recursive references to parents in multiple places. So, copy-tree infloops. This is not really an answer to your question, but do you really need to copy the full tree? There are tools to modify it. You can also build a new parse tree and return it. Thanks Nocolas. I need to copy only a subtree associated with a headline. In a nutshell I need to flatten the tree of headlines for the csv type exporter. That is, I need to replicate the parent headlines across the children. For example * H1 bla bla ** HA some text ** HB some other text would translate into * H1 bla bla ** HA some text * H1 bla bla ** HB some other text I played with org-element-extract-element, org-element-set-contents and org-element-insert-before but failed a big deal. Main problem seems to be the lack of uniform interface to handle parents in connection to secondary elements (which I don't understand at this point). Is headline a secondary element? The :parent seems to be stored in 2 places for the headline, in the headline itself and in the :title. Most of the org code uses org-element-put-property and org-element-property to access the parent but some code like org-element-extract-element uses :parent from :title. This makes it difficult to program as there are no explicit getter/setter for the parent. BTW, is there a way to pretty print the org tree? I think that's the main barrier for me in understanding how it all works. Thanks, Vitalie
Re: [O] link interfering with brackets when abbreviated
Hi Nicolas, At Fri, 28 Feb 2014 00:43:19 +0100, Nicolas Goaziou wrote: Bastien b...@altern.org writes: If it is not, I suggest to discuss the change before implementing it. Nobody ever complained about the previous behavior, and both Michael and me are suppporting it. I didn't remove that non-essential feature for my pleasure, but because it didn't fit in the new internal model. As I already said, implementing it back is a bit of work and will probably not be very clean. Why bother? Let's separate those internal parser thing and interactive commands, while we discus. I agree to Nicolas that parser and internal functions should NOT be ambiguous nor confusing. However, we humans are not machines nor slave of computers. We tell computers what we want, or even, we want to make computers think and do what we are thinking. That's the reason why we, these days, have *-dwim commands. We don't want to make our users to adopt how computers work. Anyway, I don't understand why there is so much fuss about this. That's because a) the commands have been working, b) many other commands _do_ work even if it's not right on the elements. ie. S-right right after a timestamp, C-c C-c on checkbox list. Are you planning to remove these features, too? I think that the coolness of the feature eludes me for all I can see is a crude hack. What if we create org-open-at-point-dwim and map to C-c C-o. Nicolas, do you object? Anyway, thank you Nicolas for your work. We all appreciate your great work. Thanks, -- yashi
Re: [O] link interfering with brackets when abbreviated
Hi Nicolas, At Fri, 28 Feb 2014 00:43:19 +0100, Nicolas Goaziou wrote: Bastien b...@altern.org writes: If it is not, I suggest to discuss the change before implementing it. Nobody ever complained about the previous behavior, and both Michael and me are suppporting it. I didn't remove that non-essential feature for my pleasure, but because it didn't fit in the new internal model. As I already said, implementing it back is a bit of work and will probably not be very clean. Why bother? Let's separate those internal parser thing and interactive commands, while we discus. I agree to Nicolas that parser and internal functions should NOT be ambiguous nor confusing. However, we humans are not machines nor slave of computers. We tell computers what we want, or even, we want to make computers think and do what we are thinking. That's the reason why we, these days, have *-dwim commands. We don't want to make our users to adopt how computers work. Anyway, I don't understand why there is so much fuss about this. That's because a) the commands have been working, b) many other commands _do_ work even if it's not right on the elements. ie. S-right right after a timestamp, C-c C-c on checkbox list. Are you planning to remove these features, too? I think that the coolness of the feature eludes me for all I can see is a crude hack. What if we create org-open-at-point-dwim and map to C-c C-o. Nicolas, do you object? Anyway, thank you Nicolas for your work. We all appreciate your great work. Thanks, -- yashi
Re: [O] References
On Sat, 01 Mar 2014 13:22:45 -0500 Nick Dokos ndo...@gmail.com wrote: Sharon Kimble boudic...@talktalk.net writes: I'm using [fn:1] to reference articles in an academic article, but how should I reference it back from the list of references at the end of the article please? Thanks Sharon. Not sure what you mean: in the org-mode buffer or in some exported file? In the former case, C-c C-c on the footnote marker in the text takes you to the footnote and C-c C-c on the footnote marker in the footnote takes you back. The article is in org-mode and I can open the file easily in a buffer, and everywhere that the original article has a reference to a numbered item in the 'References' section at the end of the article, I have put [fn:*] where * is the number of the reference. The [fn:*] has been manually put in, without using any keybindings or macros. What I'm now looking for is some way to link my [fn:*] to its mate in the reference list. Can it be done please? Thanks Sharon. -- A taste of linux = http://www.sharons.org.uk my git repo = https://bitbucket.org/boudiccas/dots Debian testing, Fluxbox 1.3.5, emacs 24.3.50.1 Registered Linux user 561944 signature.asc Description: PGP signature
[O] Selected expansion
Hello, Each of the ** bullets below have quite a few lines of text. * Topics ** topic1 ** topic2 ** topic3 * Notices ** notice1 ** notice2 ** notice3 * Results ** result1 ** result2 ** result3 From the following display, is it possible to fully expand only the Notices in one command ? I am using Shift-TAB but it expands all sections at once. TAB by itself will not exapnd all under Notices (when the cursor is positionned at Notices). TAB will work for expanding each individual notice[n] one after the other moving the cursor around, but I'm looking for expanding all of them using only one command. * Topics * Notices * Results Thanks.
Re: [O] References
Sharon Kimble boudic...@talktalk.net writes: On Sat, 01 Mar 2014 13:22:45 -0500 Nick Dokos ndo...@gmail.com wrote: Sharon Kimble boudic...@talktalk.net writes: I'm using [fn:1] to reference articles in an academic article, but how should I reference it back from the list of references at the end of the article please? Thanks Sharon. Not sure what you mean: in the org-mode buffer or in some exported file? In the former case, C-c C-c on the footnote marker in the text takes you to the footnote and C-c C-c on the footnote marker in the footnote takes you back. The article is in org-mode and I can open the file easily in a buffer, and everywhere that the original article has a reference to a numbered item in the 'References' section at the end of the article, I have put [fn:*] where * is the number of the reference. The [fn:*] has been manually put in, without using any keybindings or macros. What I'm now looking for is some way to link my [fn:*] to its mate in the reference list. Can it be done please? Sure: here's the general outline: --8---cut here---start-8--- * Section This takes us to a footnote[fn:1]. * References [fn:1] This is the footnote. --8---cut here---end---8--- Just label each footnote with the corresponding footnote mark and you should be OK. After all, it's all plain text. -- Nick
[O] Links in node-property
Hi Nicolas Will org-open-at-point still support links in node-property? :PROPERTIES: :ID: 24ac0164-3c4f-4792-93ac-aaae68a19632 :related: [[id:15763c8f-f022-486e-9449-bac56f7aa028]] :features: http://orgmode.org/features.html :doc: http://orgmode.org/org.html :END: Michael
Re: [O] link interfering with brackets when abbreviated
Hello, Yasushi SHOJI ya...@atmark-techno.com writes: However, we humans are not machines nor slave of computers. We tell computers what we want, or even, we want to make computers think and do what we are thinking. That's the reason why we, these days, have *-dwim commands. We don't want to make our users to adopt how computers work. This is one of the things that annoy me: opening next link on the same line is not, IMO, dwim. See below. Anyway, I don't understand why there is so much fuss about this. That's because a) the commands have been working This is not a sufficient reason. We are discussing a minor feature. Removing it doesn't remove any functionality to Org, as the thing just saves a few keystrokes, on a good day. While re-implementing the function, it appears that the feature just doesn't fit. So this is a good time to ponder about its real usefulness, and, if it is worth bending the new function to add it back. I think it isn't. As I already said, opening the next link in the same line is dubious. In the following example, with point between the links, the previous behaviour was to open link2: [[link1]] [[link2]] Now consider the following case, where point is before the a: [[link1]] a very ... very long line of text [[link2]] The previous behaviour implied to also open link2. This is not really straightforward. Worse, if `visual-line-mode' is on, [[link2]] can be many lines below. In the following case, with point still before the first a, opening [[link2]] is just odd: [[link1]] a very ... very long line which spans over many visual lines of text [[link2]]. It is odd because in the same situation, without `visual-line-mode' but with `auto-fill-mode' on, C-c C-o will report No link found. So, why do we care about the same line? We could as well open the next link in the same paragraph (or verse block, table cell). I'm not arguing for the latter, but I insist on the fact that opening next link on the same line is arbitrary and not really dwim. OTOH, I'm sure Emacs users know (beginners aside, but they'll learn soon) how to move quickly point wherever they want, without even thinking about it. b) many other commands _do_ work even if it's not right on the elements. ie. S-right right after a timestamp, C-c C-c on checkbox list. Are you planning to remove these features, too? C-c C-c already uses Elements. I'll leave S-right for another day. I think that the coolness of the feature eludes me for all I can see is a crude hack. What if we create org-open-at-point-dwim and map to C-c C-o. Nicolas, do you object? Implementing it in `org-open-at-point' or `org-open-at-point-whatever' is still implementing it in Org. I still think it's not worth it. Regards, -- Nicolas Goaziou
Re: [O] link interfering with brackets when abbreviated
Hi Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: I insist on the fact that opening next link on the same line is arbitrary and not really dwim. And we insist on keeping the previous behavior, please trust us. Right now the speedy command `o' is broken. This is a pattern I use very frequently: use `n' to navigate to the next headline, then `o' to open the link there. Also `org-agenda-open-link' is now broken. Can you have a look and fix this later issue? I will then re-add the previous behavior on `org-open-at-point'. Thanks, -- Bastien
Re: [O] Links in node-property
Hello, Michael Brand michael.ch.br...@gmail.com writes: Will org-open-at-point still support links in node-property? No. According to Org syntax, there are no links in property drawers. There are also no links in comments, example blocks, fixed-width areas... Regards, -- Nicolas Goaziou
Re: [O] link interfering with brackets when abbreviated
Hi again, Bastien b...@gnu.org writes: Right now the speedy command `o' is broken. This is a pattern I use very frequently: use `n' to navigate to the next headline, then `o' to open the link there. Forget about this -- some draft code of mine interfered. Also `org-agenda-open-link' is now broken. This one is really broken. Thanks, -- Bastien
Re: [O] References
On Sat, 01 Mar 2014 15:03:55 -0500 Nick Dokos ndo...@gmail.com wrote: Sharon Kimble boudic...@talktalk.net writes: On Sat, 01 Mar 2014 13:22:45 -0500 Nick Dokos ndo...@gmail.com wrote: Sharon Kimble boudic...@talktalk.net writes: I'm using [fn:1] to reference articles in an academic article, but how should I reference it back from the list of references at the end of the article please? Thanks Sharon. Not sure what you mean: in the org-mode buffer or in some exported file? In the former case, C-c C-c on the footnote marker in the text takes you to the footnote and C-c C-c on the footnote marker in the footnote takes you back. The article is in org-mode and I can open the file easily in a buffer, and everywhere that the original article has a reference to a numbered item in the 'References' section at the end of the article, I have put [fn:*] where * is the number of the reference. The [fn:*] has been manually put in, without using any keybindings or macros. What I'm now looking for is some way to link my [fn:*] to its mate in the reference list. Can it be done please? Sure: here's the general outline: --8---cut here---start-8--- * Section This takes us to a footnote[fn:1]. * References [fn:1] This is the footnote. --8---cut here---end---8--- Just label each footnote with the corresponding footnote mark and you should be OK. After all, it's all plain text. Brilliant! Thank you very much, it works! And so easily too :) Thanks again Sharon. -- A taste of linux = http://www.sharons.org.uk my git repo = https://bitbucket.org/boudiccas/dots Debian testing, Fluxbox 1.3.5, emacs 24.3.50.1 Registered Linux user 561944 signature.asc Description: PGP signature
Re: [O] org-export: how to copy the parsed tree?
Vitalie Spinu spinu...@gmail.com writes: Thanks Nocolas. I need to copy only a subtree associated with a headline. In a nutshell I need to flatten the tree of headlines for the csv type exporter. That is, I need to replicate the parent headlines across the children. For example * H1 bla bla ** HA some text ** HB some other text would translate into * H1 bla bla ** HA some text * H1 bla bla ** HB some other text I played with org-element-extract-element, org-element-set-contents and org-element-insert-before but failed a big deal. In this case, I think I would build the tree, since data is duplicated (e.g. * H1), not moved. Main problem seems to be the lack of uniform interface to handle parents in connection to secondary elements (which I don't understand at this point). There is no such thing as secondary elements. I think you mean secondary strings. This is some parsed data that doesn't belong to the main hierarchy in the tree. I don't think any interface problem for :parent property. You simply use `org-element-property' and `org-element-put-property'. Is headline a secondary element? No. A headline is a full-fledged element. But, besides its contents, it contains additional data (its title) which is Org syntax and therefore qualifies as a secondary string. The :parent seems to be stored in 2 places for the headline, in the headline itself and in the :title. You are wrong. Headline's parent is stored only in the :parent property of the headline. You get it with: (org-element-property :parent headline) Within `:title', `:parent' property refers to the parent of the objects contained in :title, which is the headline itself: (eq (org-element-property :parent ;; The first object in the :title property. (car (org-element-property :title headline))) headline) = t There is only one parent per object/element/string. Most of the org code uses org-element-put-property and org-element-property to access the parent but some code like org-element-extract-element uses :parent from :title. `org-element-extract-element' checks if the element/object you're removing belong to a secondary string or to the contents of the current element. Moreover, this function removes the :parent property, so you shouldn't bother about where it came from. This makes it difficult to program as there are no explicit getter/setter for the parent. See above. BTW, is there a way to pretty print the org tree? I think that's the main barrier for me in understanding how it all works. Use `pp' and set both `print-level' and `print-circle' accordingly. Regards, -- Nicolas Goaziou
Re: [O] Links in node-property
Hi Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: Michael Brand michael.ch.br...@gmail.com writes: Will org-open-at-point still support links in node-property? No. According to Org syntax, there are no links in property drawers. There are also no links in comments, example blocks, fixed-width areas... Believe me, there *are* links in comments, I can see them :) Right now, hitting C-c C-o on this link # http://orgmode.org in an org-mode buffer produces the attached backtrace, which is a problem /per se/ (easily fixable, I guess.) Anyway, not supporting links in comments does not feel right, as links in comments are both frequent and useful. I'm sorry for the frustration it will inevitably create, but at this stage I suggest to simply revert the commits related to the rewriting of `org-open-at-point'. To my knowledge, there is no bug that this rewrite fixes, there is no gain in speed, and only a regression (not opening the next link) and a bug (see `org-agenda-open-link'.) What do you think? Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) =(55 nil) (let ((end (org-element-property :end context))) (= (save-excursion (if (invisible-p (point)) (progn (goto-char (next-single-property-change (point) (quote invisible) nil end (skip-chars-forwardend) (point)) end)) (cond ((and (memq type (quote (headline inlinetask))) (progn (save-excursion (beginning-of-line) (looking-at org-complex-heading-regexp)) (or (not (match-beginning 5)) ( (point) (match-beginning 5) (let* ((data (org-offer-links-in-entry (current-buffer) (point) arg)) (links (car data)) (links-end (cdr data))) (if links (let ((--dolist-tail-- (if ... ... links)) link) (while --dolist-tail-- (setq link (car --dolist-tail--)) (search-forward link nil links-end) (goto-char (match-beginning 0)) (org-open-at-point) (setq --dolist-tail-- (cdr --dolist-tail-- (require (quote org-attach)) (org-attach-reveal (quote if-exists) ((let ((end (org-element-property :end context))) (= (save-excursion (if (invisible-p (point)) (progn (goto-char ...))) (skip-chars-forward end) (point)) end)) (user-error No link found)) ((eq type (quote timestamp)) (org-follow-timestamp-link)) ((and (memq type (quote (headline inlinetask))) (progn (save-excursion (beginning-of-line) (looking-at org-complex-heading-regexp)) (and (match-beginning 5) (= (point) (match-beginning 5) (org-tags-view arg (substring (match-string 5) 0 -1))) ((eq type (quote link)) (let ((type (org-element-property :type context)) (path (org-element-property :path context))) (save-current-buffer (set-buffer (or reference-buffer (current-buffer))) (cond ((equal type file) (if (string-match [*?{] ...) (dired path) (apply ... path arg ...))) ((assoc type org-link-protocols) (funcall (nth 1 ...) path)) ((equal type help) (let (...) (cond ... ... ...))) ((equal type mailto) (let (... ... ... final-args) (apply cmd ...))) ((member type (quote ...)) (browse-url (org-link-escape-browser ...))) ((equal type doi) (browse-url (org-link-escape-browser ...))) ((equal type message) (browse-url (concat type : path))) ((equal type shell) (let (... ...) (if ... ... ...))) ((equal type elisp) (let (...) (if ... ... ...))) ((equal type id) (require (quote ord-id)) (funcall (nth 1 ...) path)) ((member type (quote ...)) (if (run-hook-with-args-until-success ... path) nil (if ... ... ...) (let ... ...))) (t (browse-url-at-point)) ((or (eq type (quote footnote-reference)) (and (eq type (quote footnote-definition)) (save-excursion (skip-chars-forward ) (let ((begin ...)) (if begin ( ... begin) (= ... ...)) (org-footnote-action)) (t (user-error No link found))) (let* ((context (org-element-context)) type) (while (and (not (memq (setq type (org-element-type context)) (quote (headline inlinetask link footnote-definition footnote-reference timestamp (setq context (org-element-property :parent context (cond ((and (memq type (quote (headline inlinetask))) (progn (save-excursion (beginning-of-line) (looking-at org-complex-heading-regexp)) (or (not (match-beginning 5)) ( (point) (match-beginning 5) (let* ((data (org-offer-links-in-entry (current-buffer) (point) arg)) (links (car data)) (links-end (cdr data))) (if links (let ((--dolist-tail-- ...) link) (while --dolist-tail-- (setq link ...) (search-forward link nil links-end) (goto-char ...) (org-open-at-point) (setq --dolist-tail-- ...))) (require (quote org-attach)) (org-attach-reveal (quote if-exists) ((let ((end (org-element-property :end context))) (= (save-excursion (if (invisible-p ...) (progn ...)) (skip-chars-forward end) (point)) end)) (user-error No link found)) ((eq type (quote timestamp)) (org-follow-timestamp-link)) ((and (memq type (quote (headline inlinetask))) (progn (save-excursion (beginning-of-line) (looking-at org-complex-heading-regexp)) (and (match-beginning 5) (= (point) (match-beginning 5)
Re: [O] org-export: how to copy the parsed tree?
Nicolas Goaziou on Sat, 01 Mar 2014 22:02:55 +0100 wrote: [...] In this case, I think I would build the tree, since data is duplicated (e.g. * H1), not moved. Is there an idiomatic way to do this? Like constructors of org elements? Or, one just starts with an empty '(headline) list and populate it with org-element-set-contents and org-element-put-property? [...] The :parent seems to be stored in 2 places for the headline, in the headline itself and in the :title. You are wrong. Headline's parent is stored only in the :parent property of the headline. You get it with: (org-element-property :parent headline) Within `:title', `:parent' property refers to the parent of the objects contained in :title, which is the headline itself: (eq (org-element-property :parent ;; The first object in the :title property. (car (org-element-property :title headline))) headline) = t It makes sense now. Thanks. [...] BTW, is there a way to pretty print the org tree? I think that's the main barrier for me in understanding how it all works. Use `pp' and set both `print-level' and `print-circle' accordingly. Thanks. Didn't know about this. Vitalie
Re: [O] link interfering with brackets when abbreviated
Bastien b...@gnu.org writes: And we insist on keeping the previous behavior, please trust us. This is not a matter of trust. I asked about use-cases to understand why this feature was needed, and all I got was because it was here. Also `org-agenda-open-link' is now broken. Can you have a look and fix this later issue? Would you mind elaborating a bit about it? I will then re-add the previous behavior on `org-open-at-point'. I guess that closes the discussion then. Regards, -- Nicolas Goaziou
Re: [O] link interfering with brackets when abbreviated
Nicolas Goaziou n.goaz...@gmail.com writes: Bastien b...@gnu.org writes: And we insist on keeping the previous behavior, please trust us. This is not a matter of trust. I asked about use-cases to understand why this feature was needed, and all I got was because it was here. More precisely, the answer was: because we use it and find it useful. Also `org-agenda-open-link' is now broken. Can you have a look and fix this later issue? Would you mind elaborating a bit about it? C-c C-o throws a No link found message when hit on a link in an agenda view. I will then re-add the previous behavior on `org-open-at-point'. I guess that closes the discussion then. We can raise again the discussion about suppressing this feature any time but I personally think this is a waste of time. Thanks, -- Bastien
Re: [O] Links in node-property
Bastien b...@gnu.org writes: Believe me, there *are* links in comments, I can see them :) Right now, hitting C-c C-o on this link # http://orgmode.org in an org-mode buffer produces the attached backtrace, which is a problem /per se/ (easily fixable, I guess.) My bad. This should now be fixed. Anyway, not supporting links in comments does not feel right, as links in comments are both frequent and useful. Comments, by definition, are dead data. It just doesn't make sense to expect to have an active link, or timestamp, or whatever inside. If you put an active timestamp in a comment, you don't expect it to show in the agenda, right? If you need live non-exportable data, you can stuff it in a regular drawer. I'm sorry for the frustration it will inevitably create, but at this stage I suggest to simply revert the commits related to the rewriting of `org-open-at-point'. To my knowledge, there is no bug that this rewrite fixes, there is no gain in speed, and only a regression (not opening the next link) and a bug (see `org-agenda-open-link'.) What do you think? I think that if we reverted each buggy commit, we wouldn't be far from the very first commit in Org. Anyway, I suggest to either explain to me why opening the next link is needed, so we can discuss on how to do it best, or implement the feature yourself, as you intended to do a few minutes ago. In any case, I don't see the need to trash the few hours of work I invested already in this (well, almost) working function. Regards, -- Nicolas Goaziou
Re: [O] link interfering with brackets when abbreviated
Bastien b...@gnu.org writes: This is not a matter of trust. I asked about use-cases to understand why this feature was needed, and all I got was because it was here. More precisely, the answer was: because we use it and find it useful. Thank you for the precision. Now, what about caring to give me one (or more) use case? Also `org-agenda-open-link' is now broken. Can you have a look and fix this later issue? Would you mind elaborating a bit about it? C-c C-o throws a No link found message when hit on a link in an agenda view. Sorry for not being clear. I did try, I didn't get any error. My dummy entry was: * TODO [[http://orgmode.org]] in a block agenda and * [[http://orgmode.org]] DEADLINE: 2014-03-01 sam. in regular agenda. Both times, I could open the link. So, could you send me a dummy entry where the bug can be reproduced? It will save me a lot of time. Regards, -- Nicolas Goaziou
Re: [O] List of figures
check out this implementation for tables: http://kitchingroup.cheme.cmu.edu/blog/2014/03/01/Getting-a-list-of-tables-in-an-org-buffer/ John --- John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu On Thu, Feb 27, 2014 at 10:00 PM, Thomas S. Dye t...@tsdye.com wrote: Aloha John, John Kitchin jkitc...@andrew.cmu.edu writes: Maybe I am missing something, what would the utility of #+toc: figures be? Is it only for export? Yes, it is. I would make a link: [[elisp:org-list-of-figures]] where org-list-of-figures is an emacs-lisp function that would parse the buffer and present you with a list of clickable links to the figures. You could alternatively make this a new org-link, so you could also specify how it exports, eg. [[lof:click-me][List of Figures]] This is a neat idea. Thanks! All the best, Tom That would be pure org-markup, and make org more useful, and it would also happen to support LaTeX export too. I guess you would recognize figures as extensions in the file links. John --- John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu On Wed, Feb 26, 2014 at 11:37 AM, Thomas S. Dye t...@tsdye.com wrote: Aloha Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: Hello, t...@tsdye.com (Thomas S. Dye) writes: I can imagine that a list of figures is a difficult problem in some other back-ends. However, its absence in LaTeX export seems unusual. Org doesn't cover all LaTeX facilities. There are #+LATEX: and #+BEGIN_LATEX...#+END_LATEX to fill the gap. Would it make sense to have this work as expected for LaTeX export (and perhaps other back-ends where it does make sense) We can start to discuss what a good implementation could be for major back-ends. But implementing it for LaTeX only is, IMO, not worth the trouble: #+toc: figures vs. #+latex: \listoffigures AFAICT the new exporter works flawlessly. I'm confident that it will let me produce LaTeX to any practical specification. My original query came about because I was trying to write Org markup and *not* drop down to LaTeX. In this context--Org as a lightweight markup language--the possibility of creating all but one of the lists-of with #+TOC: seems like the markup language core is missing a piece. I look forward to the discussion of implementations for the major back-ends. Let me know if I can help in any way. All the best, Tom -- Thomas S. Dye http://www.tsdye.com Maybe I am missing something, what would the utility of #+toc: figures be? Is it only for export? I would make a link: [[elisp:org-list-of-figures]] where org-list-of-figures is an emacs-lisp function that would parse the buffer and present you with a list of clickable links to the figures. You could alternatively make this a new org-link, so you could also specify how it exports, eg. [[lof:click-me][List of Figures]] That would be pure org-markup, and make org more useful, and it would also happen to support LaTeX export too. I guess you would recognize figures as extensions in the file links. John --- John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu On Wed, Feb 26, 2014 at 11:37 AM, Thomas S. Dye t...@tsdye.com wrote: Aloha Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: Hello, t...@tsdye.com (Thomas S. Dye) writes: I can imagine that a list of figures is a difficult problem in some other back-ends. However, its absence in LaTeX export seems unusual. Org doesn't cover all LaTeX facilities. There are #+LATEX: and #+BEGIN_LATEX...#+END_LATEX to fill the gap. Would it make sense to have this work as expected for LaTeX export (and perhaps other back-ends where it does make sense) We can start to discuss what a good implementation could be for major back-ends. But implementing it for LaTeX only is, IMO, not worth the trouble: #+toc: figures vs. #+latex: \listoffigures AFAICT the new exporter works flawlessly. I'm confident that it will let me produce LaTeX to any practical specification. My original query came about because I was trying to write Org markup and *not* drop down to LaTeX. In this context--Org as a
Re: [O] link interfering with brackets when abbreviated
Hi Nicolas, Thanks for your time. At Sat, 01 Mar 2014 21:20:18 +0100, Nicolas Goaziou wrote: Anyway, I don't understand why there is so much fuss about this. That's because a) the commands have been working This is not a sufficient reason. We are discussing a minor feature. Removing it doesn't remove any functionality to Org, as the thing just saves a few keystrokes, on a good day. Ok. If this is yet another bickshed, I'll drop from the discussion. While re-implementing the function, it appears that the feature just doesn't fit. So this is a good time to ponder about its real usefulness, and, if it is worth bending the new function to add it back. I think it isn't. As I already said, opening the next link in the same line is dubious. In the following example, with point between the links, the previous behaviour was to open link2: [[link1]] [[link2]] Now consider the following case, where point is before the a: [[link1]] a very ... very long line of text [[link2]] The previous behaviour implied to also open link2. This is not really straightforward. If the point is before the a, that means the point is right after the link, it should open `link1' instead of `link2', IMNSHO. This isn't even the previous behavior, I admit, but if you move the pointer to the end of the line (that's right after the link2), it _opened_ links2. This behavior works quite well with Emacs' cursor movement. ;; uga, `forward-word' doesn't work as I expected on ;; [[http://google.com][google]]. It stops at the first `o'. Worse, if `visual-line-mode' is on, [[link2]] can be many lines below. In the following case, with point still before the first a, opening [[link2]] is just odd: [[link1]] a very ... very long line which spans over many visual lines of text [[link2]]. It is odd because in the same situation, without `visual-line-mode' but with `auto-fill-mode' on, C-c C-o will report No link found. Both should report No link found. `org-end-of-line' takes care of `visual-line-mode', why not `org-open-at-link'? -- yashi
[O] Partial word emphasis suggestion
Dear Org-mode members, A couple of years ago, I asked how to emphasis partial word (e.g. =no-emphasis=on-subword=) without blank character, and someone pointed out this link: http://thread.gmane.org/gmane.emacs.orgmode/46197/focus=46263 Basically, it suggest to add unicode word joiner character (\u2060) in `org-emphasis-regexp-components' like this: (org-set-emph-re 'org-emphasis-regexp-components '( \t('\{\\\u2060 - \t.,:!?;'\)}\\\u2060 \t\r\n,\' . 1))) Some human languages (Korean, including CJK) uses lots of postfix components, so we need a partial word emphasis a lot. From above link, I manually insert the word joiner character by binding a command that calls `insert-char', but it was too cumbersome. I made following minor mode, which inserts the word joiner if it detects the need. --BEGINNING-OF-SCRIPT-- (defun different-command-p (command name) Return t iff COMMAND is a command and has different from NAME (and (commandp command) (not (eq name command)) ;string-match name (symbol-name command))) command)) (defun call-next-command (keys not-this-command) Interactively call the command that has a binding of KEYS, but not NOT-THIS-COMMAND (let ((command (catch 'found (mapc (lambda (map) (let ((cmd (different-command-p (lookup-key map keys) not-this-command))) (when cmd (throw 'found cmd (current-minor-mode-maps)) (or (different-command-p (lookup-key (current-local-map) keys) not-this-command) (different-command-p (lookup-key (current-global-map) keys) not-this-command) (when (commandp command) (call-interactively command (defun org-insert-word-joiner-or-space () (interactive) (save-match-data (when (looking-back \\([=/]\\)\\(.*\\)\\1\\([^[:space:]\u2060]+\\) (line-beginning-position) 'greedy) ;; 2nd match = emphasised phrase (e.g. =code=) ;; 3rd match = partial word appended (save-excursion (goto-char (match-beginning 3)) (insert-char #x2060))) (call-next-command (this-command-keys-vector) 'org-insert-word-joiner-or-space))) (defvar org-wordjoin-mode-map (let ((map (make-sparse-keymap))) (define-key map [?\ ] 'org-insert-word-joiner-or-space) (define-key map [(control ?j)] 'org-insert-word-joiner-or-space) (define-key map [(control ?m)] 'org-insert-word-joiner-or-space) (define-key map [(tab)] 'org-insert-word-joiner-or-space) map) Keymap for `org-wordjoin-mode') (define-minor-mode org-wordjoin-mode Enable automatic insertion of word joiner nil WordJoin :keymap org-wordjoin-mode-map) --END-OF-SCRIPT-- Q1. Is there better way to do this? (esp. I think the regular expression in `looking-back' is not 100% compatible with org-mode's pattern for the emphasis. But I couldn't come up with better one.) Q2. If I remember correctly, I read from the mailing list that partial word emphasis will not be supported in org-mode. Is it possible to org-mode to include this kind of minor mode? If possible, I hope that some experts can come up with better implementation of this and include that in the official package. Or, at least insert word joiner character character in `org-emphasis-regexp-components' please. Thank you,
Re: [O] References
Sharon Kimble boudic...@talktalk.net writes: Just label each footnote with the corresponding footnote mark and you should be OK. After all, it's all plain text. Brilliant! Thank you very much, it works! And so easily too :) It is indeed brilliant: Carsten's vision of doing so much *with plain text* keeps paying out dividends time after time. BTW, you might want to find out about org-footnote-action (and perhaps bind it to some key so you can easily call it): no need to do things by hand. -- Nick
Re: [O] MobileOrg
On Thu, Feb 27, 2014 at 10:34 PM, David Masterson dsmaster...@gmail.com wrote: Anyone using MobileOrg on iOS? I can't figure out how to set it up from the documentation -- I think I'm missing something. I have a number of questions: Not on iOS, but I've been wanting to [re]setup MobileOrg for Android, so I went through the steps just now. Hopefully they can translate sufficiently to get you started... I'm starting off with nothing. I have a directory containing some .org files, Dropbox account, and nothing MobileOrg related in .emacs. Here we go... 1. What needs to be setup for the first time push from Emacs to the Dropbox Apps/MobileOrg directory? I added the following to .emacs: #+begin_src .emacs ;; where are the .org files you want on your phone? (setq org-directory ~/vault/personal/home-notes) ;; where is your sync directory going to be? (setq org-mobile-directory ~/Dropbox/mobile-org) ;; if you make changes on your phone, where do you want the chnages ;; to live? (setq org-mobile-inbox-for-pull ~/vault/personal/home-notes/mobileorg.org) ;; what files in org-directory do you want synced? (setq org-mobile-files '(~/vault/personal/home-notes/home-notes.org ~/vault/personal/home-notes/personal.org ~/vault/personal/home-notes/todo.org ~/vault/personal/home-notes/whisky.org)) #+end_src 2. What should the results of the first time push be that I should check to ensure that it worked? I'm writing this is as I go... but here's what happened for me! I ended up with the following directory structure: $ tree --charset=ASCII ~/Dropbox/mobile-org/ /home/jwhendy/Dropbox/mobile-org/ |-- agendas.org |-- checksums.dat |-- home-notes.org |-- index.org |-- mobileorg.org |-- personal.org |-- todo.org `-- whisky.org 3. What is MobileOrg looking for in the Dropbox directory? The maintainer would better be able to answer this... but for one, it's looking for the index.org file, which tells it about the files contained. If you have custom agenda views, it will tell it about those as well. I think the checksums.dat file has something to do with whether or not things need to be re-synced or if they're up to date. 4. What do I need to configure in MobileOrg? My steps (though, on Android, not iOS): - Open MobileOrg, choose I want to sync using: a Dropbox account - I'm taken to a login screen for Dropbox; click Log in - Dropbox app opens and asks if I want to give permission to MobileOrg; I choose Allow - Like a silly pants, I didn't sync Dropbox after doing the above step, so the folder isn't listed - Start Dropbox on Linux and let it sync - Click back a few times in MobileOrg and re-do the above steps to refresh the directory list - Choose my mobile-org directory from the list of available Dropbox folders, click Done - Then I'm taken to a sort of home screen with options: Setup Wizard, Settings, Synchronize, Webstie - Click Synchronize - A list of my .org files pops up in the app and I can navigate around and look at them 5. What will MobileOrg put back in the Dropbox directory? I pressed the + in the upper right (again, Android app...) which opened up a capture interface. - I title the note Test - There was a dropdown menu for the file to store it in; I chose Captures, which was automatically created for me. - I added the following text: #+begin_src mobile capture * heading ** sub heading? #+end_src I pressed the synchronize icon in the upper right and... the Captures file vanished!! Like I said, I was typing this in real time :) I did the same thing (pressed the + symbol in the upper right to create a capture), except this time, no Captures file was created/suggested, and instead an already existing file, home-notes.org, was the default. I left it as that and added a capture titled Test with the content text, stuff. I tapped to synchronize again. Back on the computer, I opened up mobileorg.org (where we told new stuff to go) and found the following contents: #+begin_src mobileorg.org * Test * a heading ** sub heading? * F(edit:addheading) [[olp:home-notes.org][home-notes.org]] ** Old value ** New value Test stuff ** End of edit #+end_src So, looks like it did get my initial captures, along with some interesting structure for what it's going to add to my home-notes.org file. 6. What do I need to do to get Emacs to pull from the Dropbox directory? Now that there was some content in mobileorg.org, I saved home-notes.org as home-notes.org.bk (just to compare to for you) and then ran `M-x org-mobile-pull`. It opened up home-notes.org, and the message buffer printed out: 2 new, 1 edits, 0 flags, 0 errors It also add this to the top of the file: #+LAST_MOBILE_CHANGE: 2014-03-01 21:01:22 At the very end of the file, sure enough, I got this: #+begin_src added-stuff * Test stuff #+end_src Remember how I saved a backup? When running `diff`, it confirms that the only change was that headline I added from my
Re: [O] MobileOrg
On Sat, Mar 1, 2014 at 9:14 PM, John Hendy jw.he...@gmail.com wrote: [snip] 1. What needs to be setup for the first time push from Emacs to the Dropbox Apps/MobileOrg directory? I added the following to .emacs: #+begin_src .emacs ;; where are the .org files you want on your phone? (setq org-directory ~/vault/personal/home-notes) ;; where is your sync directory going to be? (setq org-mobile-directory ~/Dropbox/mobile-org) ;; if you make changes on your phone, where do you want the chnages ;; to live? (setq org-mobile-inbox-for-pull ~/vault/personal/home-notes/mobileorg.org) Skimming this to make sure I didn't mess anything up... the above caught my eye. I momentarily wondered if the inbox-for-pull file should be in my computer's directory where the master .org files are, or pointing to that file in my Dropbox folder. Checked the documentation, which says: #+begin_src org-mobile-inbox-for-pull doc org-mobile-inbox-for-pull is a variable defined in `org-mobile.el'. Its value is ~/vault/personal/home-notes/mobileorg.org Original value was ~/org/from-mobile.org Documentation: The file where captured notes and flags will be appended to. During the execution of `org-mobile-pull', the file `org-mobile-capture-file' will be emptied it's contents have been appended to the file given here. This file should be in `org-directory', and not in the staging area or on the web server. You can customize this variable. #+end_src So, whew. It should live in what I'm calling the master directory where your computer's files are, not where you're staging for sync with the phone (Dropbox in this case). John [snip]