Re: [O] Naming a table produced by a CALL
Hi Loris, "Loris Bennett" writes: > Andreas Leha writes: > >> "Loris Bennett" writes: >> >>> Hi, >>> >>> I have a CALL which produces a table, which just gets the keyword >>> RESULT. I would like to plot the data in the table with R and so would >>> like to refer to the data in the table. >>> >>> It seems I need to need to replace RESULT by NAME in >>> org-babel-results-keyword, but how do I pass the actual name? >>> >>> Cheers, >>> >>> Loris >> >> Make the CALL named: >> >> #+name: foo >> #+call: foo() >> >> HTH, >> Andreas > > Thanks. In retrospect, that seems quite obvious. Where is this > documented and should it be mentioned here: > > http://orgmode.org/manual/Evaluating-code-blocks.html > This is a 'not-so-old' feature. And I do not know whether it is documented at all. I agree that 'Evaluating code blocks' is where the documentation should go. Regards, Andreas > ? > > Cheers, > > Loris
[O] org-table-copy-down feature request
Hi Org Devs and Users, at present, the only reasonable values of org-table-copy-increment are nil or non-nil. How about enabling to use it as an increment value? This would be very useful in the following case: I want to make a table with dates for subsequent classes (and table is better than headlines for me, since for each class I put - among others - the number of problems solved during that class, so that I can use the spreadsheet to compute the total and average-per-hour numbers; useful for planning for the remainder of the semester;)). It would be great to set org-table-copy-increment to 7 so that I get timestamps increased by one week. Another change which would help me might be to have a special value like 'arithmetic, so that the increment could be computed from /this and previous/ entries. (This might be even better, mimicking Excel's/LibreOffice's functionality, which is a bit broken in those applications, since it seems to require a mouse, but is very useful nonetheless.) Another, related problem I have with org-table-copy-down is that it overwrites rows. It might be better for it to insert a new row /if/ the entry in the next row is nonempty. What do you think? -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
[O] Error in org-agenda-get-deadlines
Hi List, this is probably not a bug but rather a problem with my configuration (since nobody else complained about it so far). When calling the agenda with 'C-a a' I get the following error , | Debugger entered--Lisp error: (wrong-type-argument stringp nil) | re-search-forward(nil nil t)... | org-agenda-get-deadlines()... | org-agenda-get-day-entries("/home...") | org-agenda-list(nil) ... | org-agenda(nil) | call-interactively(org-agenda nil nil) ` and an empty agenda buffer. Debugging reveals that in the following function 'regexp' is nil because both 'org-deadline-time-hour-regexp' and 'org-deadline-time-regexp'are nil, causing the error later on in the re-search-forward call: ,- | (defun org-agenda-get-deadlines (&optional with-hour) | "Return the deadline information for agenda display. | When WITH-HOUR is non-nil, only return deadlines with an hour | specification like [h]h:mm." | (let* ([...] | (regexp (if with-hour | org-deadline-time-hour-regexp |org-deadline-time-regexp)) ; => nil |[...] ) | (goto-char (point-min)) | (while (re-search-forward regexp nil t) [...]) ; => error | ...)) `- I wonder why these variables, defined in org.el, are nil? I don't seem to set them anywhere, and they should be defined once org.el is loaded, shouldn't they? -- cheers, Thorsten
Re: [O] LaTeX export: Unknown LaTeX class `org-article'
Peter Davis writes: [...] > Ok, something weird is going on. This worked on my office MacBook, but > when I try on the home one, also with org 8.2.3c, > org-export-latex-classes is defined, but org-latex-classes is not. > > Any clues? this sounds like a mixed installation. do you have an old version of org lying around, maybe as part of the emacs installation? are the two systems running different versions of emacs? where does "M-x find-library RET org RET" take you? -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429
Re: [O] LaTeX export: Unknown LaTeX class `org-article'
Peter Davis writes: [...] > worked! (NB: the variable names are all lower case.) indeed. the mixed case LaTeX happened because I have "latex" as an abbrev for "LaTeX" and, unfortunately, "-s" terminates the word. I didn't notice the abbrev kicking in. sorry about any confusion! -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429
Re: [O] Error in org-agenda-get-deadlines
Thorsten Jolitz writes: PS I forgot: #+BEGIN_SRC emacs-lisp (message "%s\n\nOrg: %s" (emacs-version) (org-version)) #+END_SRC #+results: : GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.6) : of 2014-01-18 on mnt-storage-buildroots-staging-x86_64-eric : : Org: 8.2.5g -- cheers, Thorsten
Re: [O] Narrowing vs indirect buffer
Alan L Tyree writes: > Thanks Bastien. I like narrowing a lot better but only just discovered > it. It is a terrific facility. Also available with the `s' speedy key (just in case.) -- Bastien
Re: [O] [PATCH][ox-koma-letter] changed-in-buffer, subject, minor fixes
Nicolas, Nicolas Goaziou writes: > Rasmus writes: > >> Nicolas Goaziou writes: >> I finally had the time to fix these old patches. Sorry about the wait. >>> >>> You should update Org first. I modified large parts of ox-koma-letter.el >>> recently so your patches will probably not apply. Also, some parts are >>> not necessary anymore. >> >> I did. . . And I formatted the patch against origin/master. I'll >> look into it. Thanks. > > After a cursory look, it seems that patches 1 and 2 are not necessary > anymore. I didn't tackle down subject vs title issue, so patch 3 is > needed. Though, I think it needs some changes to be applied. Would you give the attached patches a spin? I think they work nicely; only the second patch is non-trivial. Basically, one can ignore subject and title differences as now by setting org-koma-letter-prefer-subject to t and not use the SUBJECT keyword. I have set the default of -prefer-subject to nil per the discussion with Alan and Michael Strey. It should apply against master. –Rasmus -- Dung makes an excellent fertilizer >From 10d5518e9f48f18898de138b98b3be97b446dbe3 Mon Sep 17 00:00:00 2001 From: Rasmus Date: Sat, 25 Jan 2014 14:08:15 +0100 Subject: [PATCH 1/2] Documentation fixes for ox-koma-script.el * ox-koma-letter.el commentary (org-koma-letter-use-backaddress): Better documentation. --- contrib/lisp/ox-koma-letter.el | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el index 7f2cd22..b1f37b8 100644 --- a/contrib/lisp/ox-koma-letter.el +++ b/contrib/lisp/ox-koma-letter.el @@ -105,11 +105,16 @@ ;; \[EXTRA]")) ;; ;; Then, in your Org document, be sure to require the proper class -;; with : +;; with: ;; ;;#+LATEX_CLASS: my-letter ;; ;; Or by setting `org-koma-letter-default-class'. +;; +;; You may have to load (LaTeX) Babel as well, e.g., by adding +;; it to `org-latex-packages-alist', +;; +;;(add-to-list 'org-latex-packages-alist '("AUTO" "babel" nil)) ;;; Code: @@ -252,7 +257,7 @@ This option can also be set with the OPTIONS keyword, e.g.: :group 'org-export-koma-letter) (defcustom org-koma-letter-use-backaddress nil - "Non-nil prints return address in small line above to address. + "Non-nil prints return address in line above to address. This option can also be set with the OPTIONS keyword, e.g.: \"backaddress:t\"." :group 'org-export-koma-letter -- 1.8.5.3 >From 99cffa500dc86482bf217d725224cbbf19687711 Mon Sep 17 00:00:00 2001 From: Rasmus Date: Sat, 25 Jan 2014 14:15:03 +0100 Subject: [PATCH 2/2] Allow separate subject and title in ox-koma-letter * ox-koma-letter.el (org-koma-letter-use-title): New variable. (org-koma-letter-prefer-subject): New variable. (org-koma-letter-template): Allow separate subject and title. --- contrib/lisp/ox-koma-letter.el | 37 - 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el index b1f37b8..d5ee1de 100644 --- a/contrib/lisp/ox-koma-letter.el +++ b/contrib/lisp/ox-koma-letter.el @@ -335,6 +335,14 @@ This option can also be set with the OPTIONS keyword, e.g.: :group 'org-export-koma-letter :type 'boolean) +(defcustom org-koma-letter-use-title t + "Non-nil means use a title in the letter if present. + +See also `org-koma-letter-prefer-subject' for the handling of +title versus subject." + :group 'org-export-koma-letter + :type 'boolean) + (defcustom org-koma-letter-default-class "default-koma-letter" "Default class for `org-koma-letter'. The value must be a member of `org-latex-classes'." @@ -348,6 +356,14 @@ A headline is only used if #+OPENING is not set. See also :group 'org-export-koma-letter :type 'boolean) +(defcustom org-koma-letter-prefer-subject nil + "Non-nil means title should be interpret as subject if subject is missing. + +This may be useful for older documents where the SUBJECT keyword +was not present." +:group 'org-export-koma-letter +:type 'boolean) + (defconst org-koma-letter-special-tags-in-letter '(to from) "Header tags related to the letter itself.") @@ -377,6 +393,7 @@ A headline is only used if #+OPENING is not set. See also (:opening "OPENING" nil org-koma-letter-opening) (:closing "CLOSING" nil org-koma-letter-closing) (:signature "SIGNATURE" nil org-koma-letter-signature newline) +(:subject "SUBJECT" nil nil space) (:special-headings nil "special-headings" org-koma-letter-prefer-special-headings) (:special-tags nil nil (append @@ -393,6 +410,8 @@ A headline is only used if #+OPENING is not set. See also (:with-phone nil "phone" org-koma-letter-use-phone) (:with-place nil "place" org-koma-letter-use-place) (:with-subject nil "subject" org-koma-letter-subject-format) +(:with-title nil "title" org-koma-letter-use-title) +(:with-title-as-subject nil
Re: [O] Cursor jumps unexpectedly when calling org-agenda-todo
Hi Matt, Matt Lundin writes: > Hi Bastien, > > Commit e5259962f61c398d84d43d33c29a6f021c9b326a introduced a change > (perhaps unintentional) in the function org-agenda-todo. Line 8870 > added another... > > (setq col (current-column)) > > Is this supposed to be there? Not at all, I just fixed this. Thanks for the clear report, -- Bastien
Re: [O] Error in org-agenda-get-deadlines
Hi Thorsten, Thorsten Jolitz writes: > I wonder why these variables, defined in org.el, are nil? I don't seem > to set them anywhere, and they should be defined once org.el is loaded, > shouldn't they? Not when Org is loaded, but when a buffer is in Org mode. I can't reproduce this, maybe you can bissect your config and see what's wrong there? -- Bastien
Re: [O] LaTeX export: list with non-optional argument
Hello, Andreas Leha writes: > I would (obviously?) vote in favour of such a change. > - It does not hurt too much for the other use cases to include the > square brackets manually. > - It provides more flexibility in general. > - It solves my special use case. Done in maint. Thank you for reporting the problem. Regards, -- Nicolas Goaziou
Re: [O] LaTeX export: list with non-optional argument
Nicolas Goaziou writes: > Hello, > > Andreas Leha writes: > >> I would (obviously?) vote in favour of such a change. >> - It does not hurt too much for the other use cases to include the >> square brackets manually. >> - It provides more flexibility in general. >> - It solves my special use case. > > Done in maint. Thank you for reporting the problem. > Thank you! - Andreas
Re: [O] [bug][ox-latex] Captions in equations
Nicolas, Nicolas Goaziou writes: >> OK. I can prepare a patch. > > Great. Thank you. > >> In LaTeX the floating would be kind of odd, I think. At the very >> least math floats shouldn't be Figure or Tables (IMO); unfortunately >> the Internets seem to suggest that you usually create additional >> floats via packages such as newfloat of "caption". HTML should also >> be considered... > > IIRC there is a "caption" package that can add captions to objects > without making them floats. We could support it, but without requiring > that package by default. Attached is a simple patch that works by silently drops the caption in a sneaky way. I didn't experience any problems when testing it, but you might have more insights as to whether this approach have latent issues. I think we had the discussion with leaving out packages earlier, when discussing things like wrap-float etc. As I recall, the consensus was to include the necessary packages. Thus, I think solution (iii) would require adding caption to the default package alist. Caption is a package that's very good, so I wouldn't mind it. But, I'm still not convinced that non-floating caption for equation is the correct behavior. –Rasmus -- ツ >From 3470c44a7ef48a92848c39741b25e7c7cf0dddf8 Mon Sep 17 00:00:00 2001 From: Rasmus Date: Sat, 25 Jan 2014 15:27:30 +0100 Subject: [PATCH] Drop caption in ox-latex math-tables * ox-latex.el (org-latex--math-table): Drop captions silently. --- lisp/ox-latex.el | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 4522c6b..4f961cb 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -2577,7 +2577,10 @@ used as a communication channel. This function assumes TABLE has `org' as its `:type' property and `inline-math' or `math' as its `:mode' attribute.." - (let* ((caption (org-latex--caption/label-string table info)) + (let* (;; Silently drop captions as they are not supported in + ;; math-mode. + (caption (org-latex--caption/label-string + (org-element-put-property table :caption nil) info)) (attr (org-export-read-attribute :attr_latex table)) (inlinep (equal (plist-get attr :mode) "inline-math")) (env (or (plist-get attr :environment) @@ -2651,8 +2654,7 @@ This function assumes TABLE has `org' as its `:type' property and '(0 nil)) (funcall same-mode-p prev)) (setq cluster-beg prev)) - (and (or (org-element-property :caption cluster-beg) - (org-element-property :name cluster-beg)) + (and (org-element-property :name cluster-beg) "\n\\end{equation}"))) (t "\\]") -- 1.8.5.3
Re: [O] LaTeX export: Unknown LaTeX class `org-article'
On Sat, Jan 25, 2014 at 12:34:34PM +, Eric S Fraga wrote: > Peter Davis writes: > > [...] > > > Ok, something weird is going on. This worked on my office MacBook, but > > when I try on the home one, also with org 8.2.3c, > > org-export-latex-classes is defined, but org-latex-classes is not. > > > > Any clues? > > this sounds like a mixed installation. do you have an old version of > org lying around, maybe as part of the emacs installation? are the two > systems running different versions of emacs? > Both running emacs 24.3.1, same build > where does "M-x find-library RET org RET" take you? locate-library shows ~/.emacs.d/elpa/org-20140104/org.elc on the home machine, and ~/.emacs.d/elpa/org-20131118/org.elc on the work machine. But both show org-version as 8.2.3c, and the work machine, with the seemingly older org folder, seems to have the newer variable names. Maybe ".../org-mmdd/org.elc" just reflects the installation date? Thanks, -pd -- Peter Davis The Tech Curmudgeon www.techcurmudgeon.com
[O] [ANN] Markdown exporter for leanpub.com
Greetings, I have written a small markdown exporter that improves over the default one for publication with http://leanpub.com. In particular, it separates code from its output, and it handles footnotes properly. It's a very limited one-morning hack, but I thought it might be of interest to others: https://github.com/juanre/ox-leanpub (I am writing a book with lots of code samples and their output. Exporting for the web was simple: http://juanreyero.com/hacker-ways/terminal.html but going to ebook required more work :-) Best, jm -- http://greaterskies.com http://juanreyero.com
[O] Electric-indent-mode and lists
Hello, Emacs 24.3.1 on Arch. emacs -Q M-x electric-indent-mode C-x C-f some/nonexistent/file.org Now entering * abc + a + b + c Each list entry is idented furthermore. I doesn't happen if I use M-Ret to enter a list item. Or is this behavior intended? Thanks! Florian
Re: [O] Error in org-agenda-get-deadlines
Bastien writes: > Hi Thorsten, > > Thorsten Jolitz writes: > >> I wonder why these variables, defined in org.el, are nil? I don't seem >> to set them anywhere, and they should be defined once org.el is loaded, >> shouldn't they? > > Not when Org is loaded, but when a buffer is in Org mode. > > I can't reproduce this, maybe you can bissect your config > and see what's wrong there? Ok, thanks, I did that and as I thought the problem was in my init file: ,-- | (setq org-todo-keywords | (quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!/!)") | (sequence ; <= undefined |(concat | "WAITING(w@/!)" "HOLD(h@/!)" | "|" "CANCELLED(c@/!)" "PHONE") `-- I had that in my old init-file, but have no idea where that `sequence' function was defined - somehow it worked. -- cheers, Thorsten
Re: [O] Error in org-agenda-get-deadlines
Thorsten Jolitz writes: > Bastien writes: >> I can't reproduce this, maybe you can bissect your config >> and see what's wrong there? > > Ok, thanks, I did that and as I thought the problem was in my init file: > > ,-- > | (setq org-todo-keywords > | (quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!/!)") > | (sequence ; <= undefined > |(concat > | "WAITING(w@/!)" "HOLD(h@/!)" > | "|" "CANCELLED(c@/!)" "PHONE") > `-- > > I had that in my old init-file, but have no idea where that `sequence' > function was defined - somehow it worked. Now I had a look at 'org-todo-keywords' and found the real culprit: , | org-todo-keywords is a variable defined in `org.el'. | Its value is | ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!/!)") | (sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" "CANCELLED(c@/!)" "PHONE")) | | Original value was | ((sequence "TODO" "DONE")) | | | Documentation: | List of TODO entry keyword sequences and their interpretation. | This is a list of sequences. | | Each sequence starts with a symbol, either `sequence' or `type', ` It was ok or even required to start each sequence of keyword with symbol 'sequence, but using function `concat' in the sequence definition caused the error. -- cheers, Thorsten
[O] emacs calc and src block editing
Hello, There is a niggling aspect of editing source code blocks. If, while in the src block buffer (reached by C-c '), if you start up calc and request "calc-copy-to-buffer" to place a result in the source code being edited, the copy is actually placed in the original org buffer and subsequently lost when exiting the src buffer. In my opinion, the copy should be place in the src buffer at point. I have no idea whether or how this could be fixed. It's not a major problem but I thought I would mention it in case it's easy to fix. This happens with current org even though I am writing this on a system with an older version. Thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429
Re: [O] bug: "Please save the buffer to a file before refiling" when the buffer is already saved"
I seem to get this: Debugger entered--Lisp error: (error "Invalid target location") signal(error ("Invalid target location")) user-error("Invalid target location") org-refile-get-location("Goto" nil nil 4) org-refile(4) -- 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] bug: "Please save the buffer to a file before refiling" when the buffer is already saved"
When I run refile goto in the same buffer, it goes to the correct location and then does that. When I run refile goto in a different buffer, it does not go anywhere and it does that. IMO the behavior should be the same regardless of what buffer I start refile goto in. On 1/25/14, Samuel Wales wrote: > I seem to get this: > > Debugger entered--Lisp error: (error "Invalid target location") > signal(error ("Invalid target location")) > user-error("Invalid target location") > org-refile-get-location("Goto" nil nil 4) > org-refile(4) > > -- > 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. > -- 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] [PATCH][ox-koma-letter] changed-in-buffer, subject, minor fixes
Hello, Rasmus writes: > Would you give the attached patches a spin? I think they work nicely; > only the second patch is non-trivial. Basically, one can ignore > subject and title differences as now by setting > org-koma-letter-prefer-subject to t and not use the SUBJECT keyword. > > I have set the default of -prefer-subject to nil per the discussion > with Alan and Michael Strey. > > It should apply against master. It looks good. Thank you. A few minor remarks below. > +(defcustom org-koma-letter-use-title t > + "Non-nil means use a title in the letter if present. > + > +See also `org-koma-letter-prefer-subject' for the handling of > +title versus subject." > + :group 'org-export-koma-letter > + :type 'boolean) You should also talk about the OPTIONS item, i.e., "title:nil", as in other defcustoms. > +(defcustom org-koma-letter-prefer-subject nil > + "Non-nil means title should be interpret as subject if subject is missing. > + > +This may be useful for older documents where the SUBJECT keyword > +was not present." > +:group 'org-export-koma-letter > +:type 'boolean) Ditto. > - ;; Subject > - (let ((with-subject (plist-get info :with-subject))) > + ;; Subject and title > + (let ((with-subject (plist-get info :with-subject)) > + (title-as-subject (plist-get info :with-title-as-subject)) > + (subject (org-string-nw-p (org-export-data (plist-get info :subject) > info))) > + (title (org-string-nw-p (org-export-data (plist-get info :title) > info `title-as-subject', `subject' and `title' belong to the `let' below, not this one. > (when with-subject > (concat > (unless (eq with-subject t) > (format "\\KOMAoption{subject}{%s}\n" > (if (symbolp with-subject) with-subject > (mapconcat #'symbol-name with-subject "," > - (let ((subject (org-export-data (plist-get info :title) info))) > - (and (org-string-nw-p subject) > -(format "\\setkomavar{subject}{%s}\n\n" subject)) > + (let ((subject (if title-as-subject (or subject title) subject)) > + (title (if title-as-subject (and subject title) title))) > + (concat > +(and (org-string-nw-p subject) > + (format "\\setkomavar{subject}{%s}\n" subject)) > +(and (org-string-nw-p title) > + (format "\\setkomavar{title}{%s}\n" title)) > +(when (or (org-string-nw-p title) (org-string-nw-p subject)) > "\n")) Regards, -- Nicolas Goaziou
Re: [O] [bug][ox-latex] Captions in equations
Hello, Rasmus writes: > Attached is a simple patch that works by silently drops the caption in > a sneaky way. I didn't experience any problems when testing it, but > you might have more insights as to whether this approach have latent > issues. Thank you. Altering the parse tree seems a bit drastic to me, though. See below. > I think we had the discussion with leaving out packages earlier, when > discussing things like wrap-float etc. As I recall, the consensus was > to include the necessary packages. Thus, I think solution (iii) would > require adding caption to the default package alist. Caption is a > package that's very good, so I wouldn't mind it. But, I'm still not > convinced that non-floating caption for equation is the correct > behavior. We don't need to add "caption" to the default packages set. We can specify that this feature is available only if that package is required. > - (let* ((caption (org-latex--caption/label-string table info)) > + (let* (;; Silently drop captions as they are not supported in > + ;; math-mode. > + (caption (org-latex--caption/label-string > +(org-element-put-property table :caption nil) info)) We could replace (caption (org-latex--caption/label-string ...)) with (label (let ((label (org-element-property :name table))) (and label (format "\\label{%s}\n" (org-export-solidify-link-text label) and change "caption" into "label" later in the function. WDYT? Regards, -- Nicolas Goaziou