[O] No syntax highlight in ledger source block
I cannot make it show syntax highlighting in the org-mode ledger block. It is just shown with plain text. But if I bring it to the edit buffer, it displays the syntax properly. Can anyone help me to trace this problem?
Re: [O] Problem with bash arrays from list-valued org-babel :var assignments?
Hello, Keith Amidonwrites: > With current org-mode, when I try to execute the following org-babel > block: > > #+begin_src bash :var lst='(1 2 3 4 5 6 7) > printf "%s\n" "${lst[*]}" > #+end_src > > > I get result and the following error in the minibuffer: > >Wrong type argument: listp, 1 Fixed. Thank you. Regards, -- Nicolas Goaziou
Re: [O] 6 failing tests on master branch
On Fri, Jun 9, 2017 at 4:05 PM Nicolas Goaziouwrote: > Hello, > > Kaushal Modi writes: > > > Here's a patch rebased off maint (as it's just test and manual change > with > > edits to a backward compatible Tramp syntax). > > LGTM. > > Thank you. > Thanks, pushed to maint, merged to master. -- Kaushal Modi
Re: [O] 6 failing tests on master branch
Hello, Kaushal Modiwrites: > Here's a patch rebased off maint (as it's just test and manual change with > edits to a backward compatible Tramp syntax). LGTM. Thank you. Regards, -- Nicolas Goaziou0x80A93738
Re: [O] make test is failing? [ob-fortran stuff]
I see. Thanks. Yours, Christian Kaushal Modi writes: > Turns out the Fortran compiler binary gfortran is part of GCC. Those > fortran tests fail for GCC 4.4.7 but not when using GCC 6.1.0. > > On Tue, Feb 23, 2016 at 3:59 AM Christian Moewrote: > >> >> I always fail the Fortran tests too, on Mac OS X 10.6.8, though >> supposedly there's a Fortran interpreter in there somewhere. >> >> Yours, >> Christian >> >> Kaushal Modi writes: >> >> > Hi all, >> > >> > I cloned a fresh copy of org-mode and ran "make test" for the first time. >> > >> > The following are failing: >> > >> > 3 unexpected results: >> >FAILED ob-fortran/list-matrix-from-table1 >> >FAILED ob-fortran/list-matrix-from-table2 >> >FAILED ob-fortran/list-var-from-table >> > >> > Is it known? Or it's failing just for me? >> > >> > I am running Emacs version: GNU Emacs 25.0.91.1 >> (x86_64-unknown-linux-gnu, >> > GTK+ Version 2.24.23) of 2016-02-21, built using commit >> > e19c1c301700430ae428f40c2a364671f5d50dcf. >> > >> > >> > -- >> > Kaushal Modi >> >> -- > > Kaushal Modi
Re: [O] 6 failing tests on master branch
On Fri, Jun 9, 2017 at 12:27 PM Nicolas Goaziouwrote: > AFAIU, the function doesn't need to change, but the manual needs to be > updated since, in (info "(org) External links") there is: > > /myself@some.where:papers/last.pdfsame as above > > which is no longer a valid syntax. > Here's a patch rebased off maint (as it's just test and manual change with edits to a backward compatible Tramp syntax). There were some alignment issues in that External links section. So I have fixed that too. -- Kaushal Modi 0001-Update-remote-file-syntax-for-Tramp.patch Description: Binary data
Re: [O] make test is failing? [ob-fortran stuff]
> "Kaushal" == Kaushal Modiwrites: Kaushal> Turns out the Fortran compiler binary gfortran is part of Kaushal> GCC. Those fortran tests fail for GCC 4.4.7 but not when Kaushal> using GCC 6.1.0. All tests pass for me and I'm using gcc-4.7 Best wishes, Colin. -- -- Colin Baxter m43...@yandex.com GnuPG fingerprint: 68A8 799C 0230 16E7 BF68 2A27 BBFA 2492 91F5 41C8
Re: [O] Allow #+SETUPFILE to point to an URL for the org file
I have attached the updated patch, rebased to master. On Sun, May 28, 2017 at 3:36 AM Nicolas Goaziouwrote: > This is a good idea. We could even display a read-only buffer with the > contents of the document, using new `org-file-contents'. > > Anyway, this can be done in a different patch. > Thanks. I was on the fence about whether I should open the cached file in a read-only buffer.. but then the function was named `org-edit-special'.. the "edit" part. But if you are fine, I can work on that in a different commit. > > +indirectly through a file included using @samp{#+SETUPFILE: > filename/URL} > > filename/URL > file name or URL > > > +@item #+SETUPFILE: file/URL > > file/URL > file name or URL > > > +reset the temporary file cache. Org also parses and loads the file/URL > > file/URL > document > > > +during normal exporting process. Org parses the contents of this > > file/URL as > > file/URL document > > > +buffer for these lines and update the information. Also reset the org > file > > org > Org > Done. > > +(defvar ffap-url-regexp) ;Silence byte-compiler > > I think this can go at the beginning of the "org.el". > Done. > > +;; Reset the cache of files downloaded by `org-file-contents'. > > +(clrhash org--file-cache)) > > Note that we can still implement a non-interactive > `org-reset-setupfile-cache' function and call it here instead. (clrhash > org--file-cache) may be a bit low level at this point. > Done, except that I named the function org-reset-file-cache as the file cache can be updated by org-file-contents function in general for any file. > Otherwise, LGTM. Would you want to throw in some tests? You can use > cl-letf to bind `url-retrieve-synchronously' to a function returning > a buffer containing some dumb (valid or invalid) output. > Done! I, though used invalid URLs in the test. (If they become valid at some point in distant future (I doubt), then we can update the test :)) -- Kaushal Modi 0001-Allow-org-file-contents-to-fetch-file-contents-from-.patch Description: Binary data
Re: [O] 6 failing tests on master branch
Hello, Kaushal Modiwrites: > Does org-export-file-uri need to change? Because now > > (org-export-file-uri "/ssh:myself@some.where:papers/last.pdf") > > returns > > "file://ssh:myself@some.where:papers/last.pdf" AFAIU, the function doesn't need to change, but the manual needs to be updated since, in (info "(org) External links") there is: /myself@some.where:papers/last.pdfsame as above which is no longer a valid syntax. Regards, -- Nicolas Goaziou0x80A93738
Re: [O] 6 failing tests on master branch
On Fri, Jun 9, 2017 at 12:02 PM Michael Albinuswrote: > Kaushal Modi writes: > > The stronger Tramp file name syntax requires now a method. Something > like "/ssh:myself@some.where:papers/last.pdf". This is backward > compatible with Emacs 25, 24, etc pp. > Thanks for the quick reply! @Nicholas Does org-export-file-uri need to change? Because now (org-export-file-uri "/ssh:myself@some.where:papers/last.pdf") returns "file://ssh:myself@some.where:papers/last.pdf" -- Kaushal Modi
Re: [O] 6 failing tests on master branch
Kaushal Modiwrites: > This seems to be related to a tramp file notation change on emacs > master. I don't use tramp, but I heard about it on emacs-devel. Indeed. > Here is a test expression: > > (find-file-name-handler "/myself@some.where:papers/last.pdf" > 'file-remote-p) > > On emacs 25.2, that returns tramp-file-name-handler. > On emacs master, that returns nil. > > @Michael How should the above find-file-name-handler arg change to > support that test file path? The stronger Tramp file name syntax requires now a method. Something like "/ssh:myself@some.where:papers/last.pdf". This is backward compatible with Emacs 25, 24, etc pp. > Thanks. Best regards, Michael.
Re: [O] 6 failing tests on master branch
On Fri, Jun 9, 2017 at 10:26 AM Kaushal Modiwrote: > This one should be easy to debug since >> >> (org-export-file-uri "/myself@some.where:papers/last.pdf") >> >> is easy to reproduce. Could you investigate where the spurious "/" comes >> from? >> > > Will do. > This seems to be related to a tramp file notation change on emacs master. I don't use tramp, but I heard about it on emacs-devel. Here is a test expression: (find-file-name-handler "/myself@some.where:papers/last.pdf" 'file-remote-p) On emacs 25.2, that returns tramp-file-name-handler. On emacs master, that returns nil. So, on emacs 25.2, in org-export-file-uri, the (org-file-remote-p filename) case evaluates to true. Whereas, on emacs master, the execution falls into the default (t ..) case. .. and thus the spurious "/". Copying the tramp dev Michael Albinus on this for help. @Michael How should the above find-file-name-handler arg change to support that test file path? Thanks. -- Kaushal Modi
Re: [O] make test is failing? [ob-fortran stuff]
Turns out the Fortran compiler binary gfortran is part of GCC. Those fortran tests fail for GCC 4.4.7 but not when using GCC 6.1.0. On Tue, Feb 23, 2016 at 3:59 AM Christian Moewrote: > > I always fail the Fortran tests too, on Mac OS X 10.6.8, though > supposedly there's a Fortran interpreter in there somewhere. > > Yours, > Christian > > Kaushal Modi writes: > > > Hi all, > > > > I cloned a fresh copy of org-mode and ran "make test" for the first time. > > > > The following are failing: > > > > 3 unexpected results: > >FAILED ob-fortran/list-matrix-from-table1 > >FAILED ob-fortran/list-matrix-from-table2 > >FAILED ob-fortran/list-var-from-table > > > > Is it known? Or it's failing just for me? > > > > I am running Emacs version: GNU Emacs 25.0.91.1 > (x86_64-unknown-linux-gnu, > > GTK+ Version 2.24.23) of 2016-02-21, built using commit > > e19c1c301700430ae428f40c2a364671f5d50dcf. > > > > > > -- > > Kaushal Modi > > -- Kaushal Modi
Re: [O] newbye questions [the nnir-article-group issue]
>Fran?ois Pattewrites: > >> Le 05/06/2017 ? 12:07, Eric Abrahamsen a ?crit : >>> Fran?ois Patte writes: >>> Le 05/06/2017 ? 01:33, Eric Abrahamsen a ?crit : > Fran?ois Patte writes: > >> Bonjour, >> >> Ijust discovered org-mode for emacs and I want to explore the >> capabilities of this mode for LaTeX documents. >> >> I have a few preliminary questions: >> >> 1- I installed org-mode from ELPA and I get a warning message >> when I open a *.org file: >> Eager macro-expansion failure: (error "Autoloading failed to >> define function nnir-article-group") >> >> What does it mean and how to get rid of this message. > That's a macro from Gnus, the mail/news client. I'm not quite > sure why it would be getting triggered from Org. Would you run > `toggle-debug-on-error', and trigger the warning again? I don't know much with the lisp syntax; here is what I have done: opened emacs, M-x toggle-debug-on-error RET C-f file.org And the message is still there This message does not appear if I open file without the .org >>> extension. >>> Sorry -- of course it's a *warning*, not an error. >>> >>> My only guess is that this is caused by the call to >>> `nnir-article-group' inside `org-gnus-store-link' in the file >>> org-gnus.el. That file has >>> >>> (eval-when-compile (require 'gnus-sum)) >>> >>> And gnus-sum.el has: >>> >>> (autoload 'nnir-article-group "nnir" nil nil 'macro) >>> >>> So theoretically that should take care of it. >>> >>> What version of Emacs are you using? >> >> 25.2.1 >> >> and org-mode version: 9.0.7 (from elpa) > I'm sorry, I just don't know enough about how Emacs loads and > evaluates these forms to tell you what's going wrong. The nnir macro > should definitely be available in your setup. I don't even know why > loading that Org library would make it complain. > > Hopefully someone with more experience can take it from here. Sorry! I certainly don't have more experience, but maybe it will help if I report my own. I have the very same problem with the following configuration: Org mode version 9.0.8 (9.0.8-elpa @ /home/cochard/.emacs.d/elpa/org-20170606/) GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.12) of 2015-05-07 on buildvm-08.phx2.fedoraproject.org 'uname -a' gives: Linux frac.u-strasbg.fr 4.1.13-100.fc21.x86_64 #1 SMP Tue Nov 10 13:13:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux I've had this problem since I updated org ELPA on 24 dec 2016 (NB: I have not changed my GNU emacs version or GNU/Linux distribution). I performed the following tests (all independently from one another), all with a void .emacs file. (1) With 'emacs --no-site-file' -> the error is present. (2) With 'emacs --no-site-file' and after commenting the line (autoload 'nnir-article-group "nnir" nil nil 'macro) in file /usr/share/emacs/24.5/lisp/gnus/gnus-sum.el (after having gunzip'ed it) and also after having hidden the corresponding .elc file -> the error is not present. (3) With 'emacs --no-site-file --no-site-lisp' -> the error is not present. (4) With 'emacs --no-site-file' and after hiding files nnir.el and nnir.elc, which are in dir /usr/share/emacs/site-lisp/gnus-bonus -> the error is not present. The begining of file /usr/share/emacs/site-lisp/gnus-bonus/ is ;;; nnir.el --- search mail with various search engines -*- coding: iso-8859-1 -*- ;; Copyright (C) 1998 Kai Großjohann ;; $Id: nnir.el,v 1.1.1.1 2003-04-04 20:16:09 lolando Exp $ This file contains: (require 'gnus-sum) Regards, Alain -- EOST (École et Observatoire des Sciences de la Terre) IPG (Institut de Physique du Globe) | alain.coch...@unistra.fr 5 rue René Descartes [bureau 106] | Phone: +33 (0)3 68 85 50 44 F-67084 Strasbourg Cedex, France| Fax: +33 (0)3 68 85 01 25
Re: [O] 6 failing tests on master branch
On Thu, Jun 8, 2017 at 5:10 PM Nicolas Goaziouwrote: > > I remember reading that someone else too saw the fortran errors.. Is it > > because I don't have fortran on my system? > > No, I don't think so. OTOH, I have no idea about where this comes from. > Did little digging, TIL that the gfortran binary is part of GCC.. as gfortran binary. So I do have fortran, but I never use it. Also found out why fortran tests were failing for me.. by default the gcc version on my system (RHEL 6.6) is 4.4.7. Using GCC 6.1.0 passes the full "make test" on emacs 25.2. For example, this is one of the ob-fortran examples that was failing: * matrix :PROPERTIES: :ID: 3f73ab19-d25a-428d-8c26-e8c6aa933976 :END: Real matrix as input #+name: fortran-input-matrix1 | 0.0 | 42.0 | | 0.0 | 0.0 | | 0.0 | 0.0 | #+name: fortran-input-matrix2 | 0.0 | 0.0 | 0.0 | | 0.0 | 0.0 | 42.0 | #+begin_src fortran :var s=fortran-input-matrix1 :results silent write (*, '(i2)'), nint(s(1,2)) #+end_src #+begin_src fortran :var s=fortran-input-matrix2 :results silent write (*, '(i2)'), nint(s(2,3)) #+end_src Doing C-c C-c on the first source block gives this error with gcc 4.4.7: /tmp/babel-6872M6V/fortran-src-6872rcR.F90:4.27: real, parameter :: s(3,2) = transpose( reshape( (/(/0.0, 42.0/), (/0.0, 0.0/), 1 Error: transformational intrinsic 'transpose' at (1) is not permitted in an initialization expression /bin/sh: /tmp/babel-6872M6V/fortran-bin-68724mX: Permission denied That expression is apparently legal in newer fortran, is my guess. > > About the other 3 errors: > > Since our buildbot doesn't report any problem, this seems specific to > Emacs master. > Thanks. I confirm that make test on org master passes with emacs 25.2. > Test test-org-export/file-uri condition: > > (ert-test-failed > > ((should > >(equal "file://myself@some.where:papers/last.pdf" > > (org-export-file-uri "/myself@some.where > :papers/last.pdf"))) > > :form > > (equal "file://myself@some.where:papers/last.pdf" > > "file:///myself@some.where:papers/last.pdf") > > :value nil :explanation > > (arrays-of-different-length 40 41 > > "file://myself@some.where:papers/last.pdf" > > "file:///myself@some.where:papers/last.pdf" first-mismatch-at 7))) > > This one should be easy to debug since > > (org-export-file-uri "/myself@some.where:papers/last.pdf") > > is easy to reproduce. Could you investigate where the spurious "/" comes > from? > Will do. > >FAILED 646/734 test-org/custom-properties > >FAILED 668/734 test-org/forward-paragraph > > These one are related to invisible text. I don't what is going to change > in this area in next Emacs release. > I'll have to leave this for a future debug.. Someone else wants to help out with this? > You can run, e.g., > > BTEST_RE="foo" make test > Thanks! -- Kaushal Modi
Re: [O] Problem with bash arrays from list-valued org-babel :var assignments?
On 09/06/17 05:56, Keith Amidon wrote: With current org-mode, when I try to execute the following org-babel block: #+begin_src bash :var lst='(1 2 3 4 5 6 7) printf "%s\n" "${lst[*]}" #+end_src I get result and the following error in the minibuffer: Wrong type argument: listp, 1 This, on the other hand works fine: #+begin_src emacs-lisp :var lst='(1 2 3 4 5 6 7) lst #+end_src In investigating this, I looked into the code for how bash variables are set from the org variables and found this code in ob-shell that I don't really understand: (defun org-babel--variable-assignments:bash (varname values sep hline) "Represents the parameters as useful Bash shell variables." (if (listp values) (if (and (listp (car values)) (= 1 (length (car values (org-babel--variable-assignments:bash_array varname values sep hline) (org-babel--variable-assignments:bash_assoc varname values sep hline)) (org-babel--variable-assignments:sh-generic varname values sep hline))) Based on that code, I'd expect this to work, and it does: #+begin_src bash :var lst='((1) (2) (3) (4) (5) (6) (7)) printf "%s\n" "${lst[*]}" #+end_src #+RESULTS: : 1 2 3 4 5 6 7 But I agree that it would still be nice if the more intuitive form that you mentioned also worked. Regards, Neil
[O] Problem with bash arrays from list-valued org-babel :var assignments?
With current org-mode, when I try to execute the following org-babel block: #+begin_src bash :var lst='(1 2 3 4 5 6 7) printf "%s\n" "${lst[*]}" #+end_src I get result and the following error in the minibuffer: Wrong type argument: listp, 1 This, on the other hand works fine: #+begin_src emacs-lisp :var lst='(1 2 3 4 5 6 7) lst #+end_src In investigating this, I looked into the code for how bash variables are set from the org variables and found this code in ob-shell that I don't really understand: (defun org-babel--variable-assignments:bash (varname values sep hline) "Represents the parameters as useful Bash shell variables." (if (listp values) (if (and (listp (car values)) (= 1 (length (car values (org-babel--variable-assignments:bash_array varname values sep hline) (org-babel--variable-assignments:bash_assoc varname values sep hline)) (org-babel--variable-assignments:sh-generic varname values sep hline))) I *think* that the org-babel--variable-assignments:bash_assoc function is supposed to allow initializing bash arrays with arbitrary key/value mappings when each element of the list is itself a list where the first element of the sublist is the key of the mapping and the remaining elements form the value, whereas the org-babel--variable- assignments:bash_array function is supposed to create integer-indexed bash arrays for simple lists. However, if that is the case, the logic for picking between them doesn't work as I would expect, since a simple list like the example at the beginning of this email, '(1 2 3 4 5 6 7), will will fail the test (listp (car values)) and result in the bash_assoc version being called when the list is not of the correct form for that function. The following version of the function that replaces the current test with a simpler one seems to do what I think the expected behavior should be for both types of lists, but it isn't clear to me whether the current code is trying to support some other use cases that I don't understand: (defun org-babel--variable-assignments:bash (varname values sep hline) "Represents the parameters as useful Bash shell variables." (if (listp values) (if (not (listp (car values))) (org-babel--variable-assignments:bash_array varname values sep hline) (org-babel--variable-assignments:bash_assoc varname values sep hline)) (org-babel--variable-assignments:sh-generic varname values sep hline))) In any case, it seems like the simple example at the beginning of this message should work. Is this a bug or am I missing something? Thanks, Keith