Re: [O] BUG: unwanted ":" in org agenda tags-todo result lines
Am 26.05.2018 um 12:32 schrieb Nicolas Goaziou: Hello, Rainer Stengele writes: Emacs : GNU Emacs 25.3.1 (x86_64-w64-mingw32) of 2017-09-17 Package: Org mode version 9.1.13 (release_9.1.13-763-g2621db @ c:/Users/rstengele/AppData/Roaming/.emacs.d/org/lisp/) I configured a minimal Emacs startup file as here (add-to-list 'load-path "~/.emacs.d/org/lisp/") (require 'org) (global-set-key "\C-ca" 'org-agenda) ;; test specific settings ;; (setq org-complete-tags-always-offer-all-agenda-tags t) (setq org-agenda-files '("~/org/bug-agenda.org")) (setq org-agenda-custom-commands '(("H" "tags-todo" ;; standard Aegis view ((tags-todo "ACTIVE") The file "~/org/bug-agenda.org" contains the following: * TODO todo 1 :ACTIVE: SCHEDULED: <2018-05-25 Fr> * TODO todo 2 :ACTIVE: SCHEDULED: <2018-05-25 Fr> Starting with "emacs.exe -Q -l ~\mini-init.el" the resulting agenda is this: Headlines with TAGS match: ACTIVE bug-agenda: TODO todo 1 : :ACTIVE: bug-agenda: TODO todo 2 : :ACTIVE: Please look at the ":" after the 2 todo lines. I do not know where these are coming from and consider them unwanted. Can someone please recreate and try to fix this please? Fixed. Thank you. Regards, Thanks, Nicolas. works as expected now. Regards, Rainer
Re: [O] running a source code by name
"Julian M. Burgos" writes: > Dear list, > > I have an org file with an R source code block. I want to have a second > code block with an elisp call to run that first code. Something like this > > > #+begin_src emacs-lisp :results silent :tangle no > > ... Some elisp code to run the "myRcode" block. (org-sbe myRcode) Untested. > > #+end_src > > #+NAME: myRcode > #+beg in_src R :results silent :tangle no > > ... My R code here > > #+end_src > > What would be the best way to do it? > > Many thanks, > > Julian > > > -- > Julian Mariano Burgos, PhD > Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/ > Marine and Freshwater Research Institute > Botnsjávarsviðs / Demersal Division > Skúlagata 4, 121 Reykjavík, Iceland > Sími/Telephone : +354-5752037 > Bréfsími/Telefax: +354-5752001 > Netfang/Email: julian.bur...@hafogvatn.is > > -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler
Re: [O] [patch] Check org-structure-template-alist
Aaron Ecay writes: > Hi Rasmus, > > 2018ko maiatzak 27an, Rasmus-ek idatzi zuen: > > [...] > >> If there’s any better way to display the error > > org-display-warning? That’s great. Thanks! > [...] > >> + (mapconcat 'identity >> + '("Please update the entries of `%s'." >> +"" >> +"In Org 9.2 the format was changed from something akin to" >> +" (\"s\" \"#+BEGIN_SRC ?\\n#+END_SRC\" " >> +"to something akin to" >> +"(\"s\" . \"src\")" >> +"See (info \"(org)org-structure-template-alist\")" >> +"" >> +"The following entries must be updated:" >> +"" >> +"%s" >> +"%s") >> + "\n") > > You could use a multiline string literal. IMO itʼs less ugly (but > still ugly...) Same difference to me. Rasmus -- C is for Cookie
Re: [O] running a source code by name
OK, I have to note that this will also do the job that the OP requested: #+begin_src emacs-lisp :results silent :var result=myRcode #+end_src although it seems a little strange to write an empty src block for its side effects. I suppose I should have suggested this in the first place: #+begin_src emacs-lisp :results silent :noweb yes <> #+end_src although the return value from the noweb reference could be troublesome depending on what else is included in the latter src block. Chuck > On May 28, 2018, at 1:16 PM, John Kitchin wrote: > > Here is yet another variation, that may be suitable for what you want: > > > #+name: myPyCode > #+BEGIN_SRC python > print('Hello') > #+END_SRC > > > #+BEGIN_SRC emacs-lisp :var results=myPyCode > results > #+END_SRC > > #+RESULTS: > : Hello > > > 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 Mon, May 28, 2018 at 9:25 AM, Berry, Charles wrote: > > > > On May 28, 2018, at 7:35 AM, Eric S Fraga wrote: > > > > On Monday, 28 May 2018 at 11:13, Julian M. Burgos wrote: > >> Dear list, > >> > >> I have an org file with an R source code block. I want to have a second > >> code block with an elisp call to run that first code. Something like this > >> > >> > >> #+begin_src emacs-lisp :results silent :tangle no > >> > >> ... Some elisp code to run the "myRcode" block. > > > > Something along the lines of: > > > >(org-babel-goto-named-src-block "myRcode") > >(org-babel-execute-src-block) > > > > should do the job? > > Maybe wrap it in > > (save-excursion ... ) > > or use > > (org-sbe "myRcode") > > or > > (org-babel-ref-resolve "myRcode") > > which both can also pass :var args. > > HTH, > > Chuck > > > > >
[O] Issues with org-babel-detangle and :comments noweb
Hi Everybody, I am trying to have noweb references working with org-babel-detangle. Let's use this example: ``` #+NAME: a #+BEGIN_SRC clojure (def a "a") #+END_SRC #+NAME: b #+BEGIN_SRC clojure (def a "b") #+END_SRC #+NAME: c #+BEGIN_SRC clojure (def a "c") #+END_SRC #+NAME: a #+BEGIN_SRC clojure (def a "a") #+END_SRC #+NAME: test #+BEGIN_SRC clojure :tangle test.clj :mkdirp yes :noweb yes :padline yes :results silent :comments noweb <> <> <> #+END_SRC ``` Once tangled, the test.clj file looks like: ``` ;; [[file:test.org::test][test]] ;; [[file:test.org::a][a]] (def a "a") ;; a ends here ;; [[file:test.org::a][a]] (def a "a") ;; a ends here ;; [[file:test.org::b][b]] (def a "b") ;; b ends here ;; [[file:test.org::c][c]] (def a "c") ;; c ends here ;; test ends here ``` If I perform org-babel-tangle-jump-to-org everything works fine, I jump to the block codes. However if I perform org-babel-detangle, when I get the message "Not in tangle code". The problem appears to be that the references are "embedded" in the tangled block code. If I move the "test ends here" above, then it works, but then when the tangled block code get detangled, I loose the noweb references. Any idea if there is a work around for that? I would like to use org-babel-tangle-jump-to-org and org-babel-detangle while being about to change the order of the code within the block codes in the tangled file. Thanks! Take care, Fred
Re: [O] running a source code by name
> On May 28, 2018, at 7:35 AM, Eric S Fraga wrote: > > On Monday, 28 May 2018 at 11:13, Julian M. Burgos wrote: >> Dear list, >> >> I have an org file with an R source code block. I want to have a second >> code block with an elisp call to run that first code. Something like this >> >> >> #+begin_src emacs-lisp :results silent :tangle no >> >> ... Some elisp code to run the "myRcode" block. > > Something along the lines of: > >(org-babel-goto-named-src-block "myRcode") >(org-babel-execute-src-block) > > should do the job? Maybe wrap it in (save-excursion ... ) or use (org-sbe "myRcode") or (org-babel-ref-resolve "myRcode") which both can also pass :var args. HTH, Chuck
Re: [O] C++ is not accepted for SRC block evaluation
Hi Nicolas, 2018ko maiatzak 27an, Nicolas Goaziou-ek idatzi zuen: [...] > > We probably need to implement a mapping between languages symbols and > files and use it in `org-babel-do-load-languages'. The implicit mapping > it uses currently has shortcomings. > > We could also leave it like this (even with my patch reverted), and > document it somehow. Maybe a third column per language in (info "(org) > Languages") to hold the file name. > > WDYT? Improved documentation is never a bad thing. OTOH, I personally would not spend time on implementing the mapping you propose. org-babel-do-load-languages is IMO a relic. I think that all babel languages should be autoloaded, just like normal lisp libraries are. If I had to sketch a design for this, it would be a macro like: (org-babel-define-language R :evaluate org-babel-R-evaluate :session org-babel-R-creaete-session :language-name "R" ;; Both these Could be optional, with the :language-mode R-mode ;; default calculated from the language name ...) This macro would expand to: (add-to-list org-src-lang-modes ...) (add-to-list org-babel-tangle-lang-exts ...) ;; Possibly some others ... (add-to-list org-babel-languages-alist '(R . (evaluate . org-babel-R-evaluate) (session . org-babel-R-create-session) ...)) The intent of the last one would be to get rid of all the (fboundp (intern (concat "org-babel-thingy:" language))) stuff. The org-babel-define-language call(s) in each ob-foo.el file would be marked as autoloads, so that the relevant alists would all be fully populated on emacs startup. org-babel-(do-)load-languages would disappear. Iʼve held back on implementing this (among other reasons) because it would be a big disruption to the babel ecosystem. For all the languages in core and contrib it would be manageable, but there are third-party libraries that would have to be transitioned as well, plus the growing pains of user config files, etc. It would not be a small project. (OTOH, I see other benefits as well. In the longer term, it would be nice to solve the longstanding problems with e.g. the python backend by communicating with a jupyter kernel, rather than trying to drive a python repl attached to a pipe. A more manageable API for babel languages than (fboundp (intern "magic-name")) would probably make it easier to implement this.) ...in any case, the mapping that you propose is not an unreasonable idea in the abstract. But the problem only arises (AFAIK) for the C++/D languages, and itʼs been with us for a long time. My own opinion is that we can just document and live with the situation until something much better comes along. But I also donʼt want to stop you from implementing a small and reasonable fix if you are motivated to do so. :) -- Aaron Ecay
Re: [O] unable to edit indirect-buffer in fundamental mode without losing pretty printing in base buffer org mode
Hi Nicolas, 2018ko maiatzak 27an, Nicolas Goaziou-ek idatzi zuen: > > Aaron Ecay writes: > >> Of course, done in c32938b7f. I did not realize how the freeze for 9.2 >> was working. > > Thank you. > > BTW, I'm considering creating a "next" branch for pending patches that > I'm refraining to push to master. It could help moving forward. +1 on this idea from me. > > We can of course discuss it on the ML, but it would be nice to make > clear what is the problem to solve first. I describe the problem as: Org tries to be slightly WYSIWYG in terms of subscripts (with the relevant configuration settings). But the facade over the underlying textual markup is imperfect. Users sometimes need to edit the textual markup. The patch I created is based on a very similar emacs feature (prettify-symbols-mode). (Unlike the org feature, the emacs feature only font-locks a static list of strings; it doesnʼt handle subscripts where the content to be font-locked can vary). Once org supports emacs 25+ only (is it actually the case already?), I think it would be a good idea to replace the org-entities font-locking with the emacs built-in feature. Then my patch could extend that for subscripts (and we could recycle the core emacs defcustoms which control the featureʼs optionality, rather than needing our own). -- Aaron Ecay
Re: [O] running a source code by name
On Monday, 28 May 2018 at 11:13, Julian M. Burgos wrote: > Dear list, > > I have an org file with an R source code block. I want to have a second > code block with an elisp call to run that first code. Something like this > > > #+begin_src emacs-lisp :results silent :tangle no > > ... Some elisp code to run the "myRcode" block. Something along the lines of: (org-babel-goto-named-src-block "myRcode") (org-babel-execute-src-block) should do the job? -- Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-591-gee336b signature.asc Description: PGP signature
[O] ox-odt in Org 8.2.10 and 9.1.13: killed buffer is read-only
Make any .org file, and export it. The error is something like this: --8<---cut here---start->8--- Making completion list... LaTeX to MathML converter not available. Formatting LaTeX using verbatim Wrote /tmp/odt-21540L0A/meta.xml Using vacuous schema [2 times] OpenDocument export failed: Buffer is read-only: # Mark set --8<---cut here---end--->8--- I verified that "/tmp/odt-21540L0A/meta.xml" and "/tmp/odt-21540L0A" don't exist. Side question: how do we debug this problem? Setting debug-on-error doesn't help. -- - Formas de contato: https://libreplanet.org/wiki/User:Adfeno#vCard - Ativista do /software/ livre (não confundir com gratuito). Avaliador da liberdade de /software/ e de /sites/. - Arquivos que aceito: https://libreplanet.org/wiki/User:Adfeno#Arquivos - Contribuições à sociedade: https://libreplanet.org/wiki/User:Adfeno#Contributions - Gosta do meu trabalho? Contrate-me ou doe algo para mim! https://libreplanet.org/wiki/User:Adfeno#Suporte - Use comunicações sociais federadas padronizadas, onde o "social" permanece independente do fornecedor. #DeleteWhatsApp. Use #XMPP (https://libreplanet.org/wiki/XMPP.pt), #DeleteFacebook #DeleteInstagram #DeleteTwitter #DeleteYouTube. Use #ActivityPub via #Mastodon (https://joinmastodon.org/). - #DeleteNetflix #CancelNetflix. Evite #DRM: https://www.defectivebydesign.org/
[O] running a source code by name
Dear list, I have an org file with an R source code block. I want to have a second code block with an elisp call to run that first code. Something like this #+begin_src emacs-lisp :results silent :tangle no ... Some elisp code to run the "myRcode" block. #+end_src #+NAME: myRcode #+beg in_src R :results silent :tangle no ... My R code here #+end_src What would be the best way to do it? Many thanks, Julian -- Julian Mariano Burgos, PhD Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/ Marine and Freshwater Research Institute Botnsjávarsviðs / Demersal Division Skúlagata 4, 121 Reykjavík, Iceland Sími/Telephone : +354-5752037 Bréfsími/Telefax: +354-5752001 Netfang/Email: julian.bur...@hafogvatn.is