Re: [O] Some progress
Uwe Brauer writes: "Uwe" == Uwe Brauer writes: >> I really never used tag search as provided by the agenda. So today I >> just copied the examples of >> http://orgmode.org/worg/org-tutorials/advanced-searching.html > >> * TODO Buy clothes for wedding > :wedding:important:errands: >> SCHEDULED: <2010-12-01 Wed> >> :PROPERTIES: >> :estimated-cost: 100 >> :END: >> [2010-11-17 Wed 12:22] > > [...] >> However nothing was found, I expected, as in occur, a buffer showing me >> all the tags matching my search criterion, but there was none. > >> What do I miss? > > It seems that I have to add the file in which I am searching to the > list of agenda files > (https://stackoverflow.com/questions/24966333/emacs-org-mode-tags-not-found) > that however is not described in the manual nor is it intuitive. I disagree. The agenda is based on agenda files. So it's clear that the agenda-tag-search applies only to the agenda files. And it's in the manual in section (info "(org) Tag searches"). > Now I can search and find tags in headings, but I cannot find > properties, how do I find these? * TODO Buy clothes for wedding :PROPERTIES: :estimated_cost: 100 :END: C-c a m estimated_cost="100" finds the subtree. Note the underscore instead of the hyphen. '-' in the property name breaks the search AFAICS. See further (info "(org) Tag searches") which also has something about searching for tags in the current buffer. Best regards, -- Marco Wahl -- GPG: 0x49010A040A3AE6F2
Re: [O] HTML Export of Links to Source Blocks seems broken
Hello, timor writes: > considering the following example: > > -- > #+NAME: test_fun > #+BEGIN_SRC js > function test_fun() { > > } #+END_SRC > > Link to [[test_fun]] > > #+NAME: another_test_fun > #+BEGIN_SRC js > function another_test_fun() { > > } > #+END_SRC > > Link to [[another_test_fun]] > - > > the exported html code creates to tags, like this: > > > Link to 1 > > > and this: > > > Link to 1 > > > Is that behavior desired? Yes, it is. Those are internals targets. Org handles them, well, internally. > I would expect the link text to actually spell "test_fun" and > "another_test_fun" in this case, since those are the names of the > source blocks. This is a reasonable expectation only if you are a bit careful about the value of the NAME keyword. See `org-latex-prefer-user-labels' for more information. > As a workaround, is there anywhere in the exporter that I could hook > into to change the link text myself? There is no equivalent to `org-latex-prefer-user-labels' in HTML export back-end at the moment. Though, patches to add one are welcome since this is a quite frequent request. Regards, -- Nicolas Goaziou
Re: [O] How to have #+ORGTBL: SEND install converted table to MORE than 1 receiver location?
Hello, Omid writes: > I'm just resending this question because I haven't received any > answers/ideas in a week. I also asked it in > https://emacs.stackexchange.com/questions/23836/how-to-have-org-mode-radio-table-install-converted-table-to-more-than-one-receiv, > with no answers so far. [...] >>> Is there a way to have #+ORGTBL: SEND install converted table to MORE >>> than 1 receiver location? Specifically, in LaTeX I have >>> >>> \begin{comment} >>> #+ORGTBL: SEND r_hf-vector orgtbl-to-generic :splice t :lend " " >>> :sep " & " >>> | f | >>> | 0 | >>> | \vdots | >>> | 0 | >>> \end{comment} >>> >>> And I'd like it to be installed in both locations below. >>> >>> % BEGIN RECEIVE ORGTBL r_hf-vector >>> f \\ >>> 0 \\ >>> \vdots \\ >>> 0 \\ >>> % END RECEIVE ORGTBL r_hf-vector >>> >>> % BEGIN RECEIVE ORGTBL r_hf-vector >>> f \\ >>> 0 \\ >>> \vdots \\ >>> 0 \\ >>> % END RECEIVE ORGTBL r_hf-vector This was not possible until a few minutes ago. This is now solved in development version. Regards, -- Nicolas Goaziou
Re: [O] org copied a few files to ~/.org-timestamps
Hello, Mirko Vukovic writes: > Mirko Vukovic gmail.com> writes: > >> >> Hello, >> >> (org 8.3.4 on Emacs 24.4.1 on Windows 7) >> >> Some of my org-files are ending up in ~/.org-timestamps. >> >> For example, the file ~/org/general.org also has a copy on ~/.org- >> timestamps. This copy was generated a few days ago. >> >> Any thoughts on why that would happen? >> >> Thanks, >> >> Mirko >> >> > I did a bit of digging: > > Only files that reside in ~/org and that are loaded via the agenda are > then reassigned to the ~/.org-timestamps directory. If I manually load > the file, then it is not reassigned to that directory. > > I used this code snippet to identify them: > (save-excursion > (let (matches) > (dolist (buffer (buffer-list)) > (let ((file-name (buffer-file-name buffer))) > (when (and file-name >(string-match "org-timestamps" file-name)) > (push file-name matches > (reverse matches))) No idea about what is going on. Did you try with Emacs -q (or a variation including stable Org)? Regards, -- Nicolas Goaziou
Re: [O] Some progress
>>> "Marco" == Marco Wahl writes: > Uwe Brauer writes: > "Uwe" == Uwe Brauer writes: > I disagree. The agenda is based on agenda files. So it's clear that > the agenda-tag-search applies only to the agenda files. And it's in the > manual in section (info "(org) Tag searches"). Well ok, I found the paragraph in question, you are right, >> Now I can search and find tags in headings, but I cannot find >> properties, how do I find these? > * TODO Buy clothes for wedding > :PROPERTIES: > :estimated_cost: 100 > :END: > C-c a m estimated_cost="100" > finds the subtree. > Note the underscore instead of the hyphen. '-' in the property name > breaks the search AFAICS. > See further (info "(org) Tag searches") which also has something about > searching for tags in the current buffer. Thanks! But, the point is: suppose I do not recall the exact content of that property, so I would like to search for all PROPERTIES which contain estimated_cost. How can I do that? It seems that (org-entry-properties nil) is the command in question regards Uwe
Re: [O] extract a region from a table and export it
> #+BEGIN_SRC emacs-lisp :var data=example-table[,0] > (mapcar 'list data) > #+END_SRC > #+RESULTS: > | 1 | > | 2 | > | 3 | > | 4 | thanks that worked great!
Re: [O] extract a region from a table and export it
>>> "John" == John Kitchin writes: > (require 'dash) > #+tblname: tab2 > | 1 | a | 3 | > | 2 | b | 4 | > | 3 | c | 6 | > | 4 | d | 7 | > #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] > (-zip-with 'list c0 c2) > #+END_SRC That does not work for me (I loaded dash) Here is the backtrace I also deleted the "-" in (-zip-with 'list c0 c2) to obtain (zip-with 'list c0 c2), but zip-with is not known as a command. Debugger entered--Lisp error: (wrong-type-argument listp "nil") -zip-with(list "nil" "nil") (let ((c0 (quote "nil")) (c2 (quote "nil"))) (-zip-with (quote list) c0 c2)) (progn (let ((c0 (quote "nil")) (c2 (quote "nil"))) (-zip-with (quote list) c0 c2))) eval((progn (let ((c0 (quote "nil")) (c2 (quote "nil"))) (-zip-with (quote list) c0 c2 org-babel-execute:emacs-lisp("(-zip-with 'list c0 c2)" ((:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "code") (:results . "replace") (:var c0 . "nil") (:var c2 . "nil") (:session . "none") (:hlines . "no") (:result-type . value) (:result-params "replace") (:rowname-names) (:colname-names))) org-babel-execute-src-block(nil) org-babel-execute-src-block-maybe() org-babel-execute-maybe() org-babel-execute-safely-maybe() run-hook-with-args-until-success(org-babel-execute-safely-maybe) org-ctrl-c-ctrl-c(nil) funcall-interactively(org-ctrl-c-ctrl-c nil) call-interactively(org-ctrl-c-ctrl-c nil nil) command-execute(org-ctrl-c-ctrl-c)
Re: [O] HTML Export of Links to Source Blocks seems broken
Hello Nicolas, 2016-06-17 9:51 GMT+02:00 Nicolas Goaziou : >> the exported html code creates to tags, like this: >> >> >> Link to 1 >> >> >> and this: >> >> >> Link to 1 >> >> >> Is that behavior desired? > > Yes, it is. Those are internals targets. Org handles them, well, > internally. Why is the link text set to "1" in both cases? >> I would expect the link text to actually spell "test_fun" and >> "another_test_fun" in this case, since those are the names of the >> source blocks. > > This is a reasonable expectation only if you are a bit careful about the > value of the NAME keyword. See `org-latex-prefer-user-labels' for more > information. Thanks for the pointer. I tried to see the effect of that variable, but I noticed that for latex export, a \ref{orgsrcblock1} tag is created, although the listing in the exported latex code does not provide a "target" to link to at all. This is probably unrelated to my original problem, but keeps me from understanding how the mechanism around `org-latex-prefer-user-labels` works. (maybe related: http://emacs.stackexchange.com/questions/20947/how-to-reference-source-blocks-in-org-text) >> As a workaround, is there anywhere in the exporter that I could hook >> into to change the link text myself? > > There is no equivalent to `org-latex-prefer-user-labels' in HTML export > back-end at the moment. Though, patches to add one are welcome since > this is a quite frequent request. I was more thinking along the lines of treating internal links to named blocks in the same way that external links in HTML export are treated: For [[http://some/url]], the link text is simply set to the target, the target being the external web page. For [[some_named_block]] the link text should then also be the name of the target, in that case the target being the source block. I tried to debug what happens during html export, and traced the link resolution to `org-html-link`, with the link type being "fuzzy". Then, it correctly identifies the link target(via `org-export-resolve-fuzzy-link`), but for some reason seems to do some form of generic numbering for the link text. I would probably add a case for (org-element-type destination) being "src-block", and then use the :name property of the link destination as link text. Does that route make sense? Regards, timor
Re: [O] extract a region from a table and export it
the problem seems to be that c0 and c2 are set to nil for some reason. I doubt dash has anything to do with it. Try these: #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] c0 #+END_SRC #+RESULTS: | 1 | 2 | 3 | 4 | #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] c2 #+END_SRC #+RESULTS: | 3 | 4 | 6 | 7 | Here is a non-dash solution that works for two lists. #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] (loop for a in c0 for b in c2 collect (list a b)) #+END_SRC #+RESULTS: | 1 | 3 | | 2 | 4 | | 3 | 6 | | 4 | 7 | Uwe Brauer writes: "John" == John Kitchin writes: > >> (require 'dash) >> #+tblname: tab2 >> | 1 | a | 3 | > >> | 2 | b | 4 | >> | 3 | c | 6 | >> | 4 | d | 7 | > >> #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] >> (-zip-with 'list c0 c2) >> #+END_SRC > > That does not work for me (I loaded dash) > > Here is the backtrace > I also deleted the "-" in (-zip-with 'list c0 c2) to obtain > (zip-with 'list c0 c2), but zip-with is not known as a command. -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu
Re: [O] extract a region from a table and export it
John Kitchin writes: D> the problem seems to be that c0 and c2 are set to nil for some reason. I > doubt dash has anything to do with it. Try these: > > #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] > c0 > #+END_SRC > > > #+RESULTS: > | 1 | 2 | 3 | 4 | > > #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] > c2 > #+END_SRC > > > #+RESULTS: > | 3 | 4 | 6 | 7 | > > Here is a non-dash solution that works for two lists. > > #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] > (loop for a in c0 for b in c2 collect (list a b)) > #+END_SRC Or #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] (cl-mapcar 'list c0 c2) #+END_SRC -- This message is brought to you by the department of redundant departments
Re: [O] HTML Export of Links to Source Blocks seems broken
Hello, timor writes: > Why is the link text set to "1" in both cases? This is just a nonsensical number because Org does not know what to number. If you want to number source blocks, you need to add a caption to them. > Thanks for the pointer. I tried to see the effect of that variable, > but I noticed that for latex export, a \ref{orgsrcblock1} tag is > created, although the listing in the exported latex code does not > provide a "target" to link to at all. If `org-latex-prefer-user-labels' is non-nil, no \ref{orgsrcblock1} is created. > I was more thinking along the lines of treating internal links to > named blocks in the same way that external links in HTML export are > treated: > For [[http://some/url]], the link text is simply set to the target, > the target being the external web page. > For [[some_named_block]] the link text should then also be the name of > the target, in that case the target being the source block. I think the way to go is to create an equivalent to `org-latex-prefer-user-labels' and to turn it off by default. It boils down to creating a wrapper around `org-export-get-reference', e.g. `org-html--reference' and replace it in the file. It should also be tested when cross-referencing data in a published project. Regards, -- Nicolas Goaziou
Re: [O] extract a region from a table and export it
Thanks but none works for me in the following I will show my results #+tblname: tab2 | 1 | a | 3 | | 2 | b | 4 | | 3 | c | 6 | | 4 | d | 7 | #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] c0 #+END_SRC #+RESULTS: : nil I obtain #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] c2 #+END_SRC #+RESULTS: : nil > Here is a non-dash solution that works for two lists. #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] (loop for a in c0 for b in c2 collect (list a b)) #+END_SRC #+RESULTS:
Re: [O] extract a region from a table and export it
> John Kitchin writes: D> the problem seems to be that c0 and c2 are set to nil for some reason. I > Or > #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] > (cl-mapcar 'list c0 c2) > #+END_SRC Thanks but I obtain #+RESULTS: | 110 | 110 | | 105 | 105 | | 108 | 108 | Which is wrong.
Re: [O] extract a region from a table and export it
Uwe Brauer writes: >> John Kitchin writes: >D> the problem seems to be that c0 and c2 are set to nil for some reason. I > >> Or > >> #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] >> (cl-mapcar 'list c0 c2) >> #+END_SRC > > Thanks but I obtain > > #+RESULTS: > | 110 | 110 | > | 105 | 105 | > | 108 | 108 | > > Which is wrong. Incidentally, (mapcar 'string-to-char '("n" "i" "l")) => (110 105 108) Probably your references are not right. E.g. in Org-8.2 this file would produce your observed result. #+tblname: tab2 | 1 | a | 3 | | 2 | b | 4 | | 3 | c | 6 | | 4 | d | 7 | #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] (cl-mapcar 'list c0 c2) #+END_SRC -- A clever person solves a problem. A wise person avoids it
Re: [O] extract a region from a table and export it
Uwe Brauer writes: >> John Kitchin writes: >D> the problem seems to be that c0 and c2 are set to nil for some reason. I > >> Or > >> #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] >> (cl-mapcar 'list c0 c2) >> #+END_SRC > > Thanks but I obtain > > #+RESULTS: > | 110 | 110 | > | 105 | 105 | > | 108 | 108 | > > Which is wrong. Incidentally, (mapcar 'string-to-char '("n" "i" "l")) => (110 105 108) Probably your references are not right. E.g. in Org-8.2 this file would produce your observed result. #+tblname: tab2 | 1 | a | 3 | | 2 | b | 4 | | 3 | c | 6 | | 4 | d | 7 | #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] (cl-mapcar 'list c0 c2) #+END_SRC -- A clever person solves a problem. A wise person avoids it
Re: [O] extract a region from a table and export it
Those look like characters somehow to me. What org version are you using? and what emacs? John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Fri, Jun 17, 2016 at 9:08 AM, Uwe Brauer wrote: > >> John Kitchin writes: >D> the problem seems to be that c0 and c2 are set to nil for some > reason. I > >> Or > >> #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] >> (cl-mapcar 'list c0 c2) >> #+END_SRC > > Thanks but I obtain > > #+RESULTS: > | 110 | 110 | > | 105 | 105 | > | 108 | 108 | > > Which is wrong. > > >
Re: [O] How to keep something at the bottom of an Org file
Hi! Nicolas Goaziou writes: >> * COMMENT *MUST BE BOTTOMMOST TREE* >> :meta:bottommost: >> >> MUST BE BOTTOMMOST TREE TO HAVE *GUARANTEED* EFFECT. >> >> Recall that no local variable setting is taken into account above a >> page break. >> >> >> Local Variables: >> eval: (git-auto-commit-mode) >> End: >> >> at the bottom to have git-auto-commit-mode for that file. >> >> I try to be disciplined but often the subtree bubbles up, e.g. after >> sorting. >> >> Has anyone a good idea how to deal with this issue? > > I guess you could use `org-after-sorting-entries-or-items-hook' to > bubble down entries with :bottommost: tag. Thanks, I try this. FWIW here is the configuration I use, in case that someone is interested: (setf org-after-sorting-entries-or-items-hook (lambda () (search-forward ":bottommost:") (org-cut-subtree) (goto-char (point-max)) (org-paste-subtree 1))) Best regards, -- Marco Wahl -- GPG: 0x49010A040A3AE6F2
Re: [O] Some progress
Uwe Brauer writes: > > > * TODO Buy clothes for wedding > > :PROPERTIES: > > :estimated_cost: 100 > > :END: > > > C-c a m estimated_cost="100" > > > finds the subtree. > > > Note the underscore instead of the hyphen. '-' in the property name > > breaks the search AFAICS. > > > See further (info "(org) Tag searches") which also has something about > > searching for tags in the current buffer. > > Thanks! > > But, the point is: suppose I do not recall the exact content of that > property, so I would like to search for all PROPERTIES which contain > estimated_cost. How can I do that? What about just searching the text? C-c a / :estimated_cost: Ciao, -- Marco Wahl -- GPG: 0x49010A040A3AE6F2
Re: [O] extract a region from a table and export it
>>> "John" == John Kitchin writes: > Those look like characters somehow to me. What org version are you using? > and what emacs? Me? Emacs 25.1.5 and 8.3.4 Uwe
Re: [O] extract a region from a table and export it
>>> "Rasmus" == Rasmus writes: > Uwe Brauer writes: >> > John Kitchin writes: D> the problem seems to be that c0 and c2 are set to nil for some reason. I >> >> > Or >> >> > #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] >> > (cl-mapcar 'list c0 c2) >> > #+END_SRC >> >> Thanks but I obtain >> >> #+RESULTS: >> | 110 | 110 | >> | 105 | 105 | >> | 108 | 108 | >> >> Which is wrong. > Incidentally, > (mapcar 'string-to-char '("n" "i" "l")) => (110 105 108) > Probably your references are not right. E.g. in Org-8.2 this file would > produce your observed result. I am using org 8.3.5 so this is a bug of version 8.3.5?
Re: [O] How to have #+ORGTBL: SEND install converted table to MORE than 1 receiver location?
Thank you. Omid On 06/17/2016 04:26 AM, Nicolas Goaziou wrote: > Hello, > > Omid writes: > >> I'm just resending this question because I haven't received any >> answers/ideas in a week. I also asked it in >> https://emacs.stackexchange.com/questions/23836/how-to-have-org-mode-radio-table-install-converted-table-to-more-than-one-receiv, >> with no answers so far. > > [...] > Is there a way to have #+ORGTBL: SEND install converted table to MORE than 1 receiver location? Specifically, in LaTeX I have \begin{comment} #+ORGTBL: SEND r_hf-vector orgtbl-to-generic :splice t :lend " " :sep " & " | f | | 0 | | \vdots | | 0 | \end{comment} And I'd like it to be installed in both locations below. % BEGIN RECEIVE ORGTBL r_hf-vector f \\ 0 \\ \vdots \\ 0 \\ % END RECEIVE ORGTBL r_hf-vector % BEGIN RECEIVE ORGTBL r_hf-vector f \\ 0 \\ \vdots \\ 0 \\ % END RECEIVE ORGTBL r_hf-vector > > This was not possible until a few minutes ago. This is now solved in > development version. > > Regards, >
[O] How to make `file+function` to accept an argument in org-capture?
I am starting to write an org-capture template with a `file+function` tag. It works pretty well if I put the function exactly with accordance to the documentation[1]. However, I am trying to make this function to accept an argument to let it find the store place programmably. I did some investigation on the org source, but it seems that it is not easy to work this out without hard code modification. Can this be a new feature of org-capture? or you guys have an alternative to implement this? [1] http://orgmode.org/manual/Template-elements.html#Template-elements
[O] Exporting to LaTeX Ignores Title Option in #+Options:.
I have a bunch of org-files that I want to export. They all have a #+TITLE: but I don't want the Title to appear in the exported code. If I export the following minimal file: #+TITLE: My Title. #+AUTHOR: Ian Barton. #+STARTUP: content indent #+DATE: [2016-06-18 Sat 07:43] #+OPTIONS: title:nil I get the following output: \author{Ian Barton.} \date{\textit{[2016-06-18 Sat 07:43]}} \title{My Title.} I thought that setting title:nil in #+Options: suppressed export of the title. Is this expected behaviour with LaTeX? Ian.