From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: 63 failures for org-test-run-all-tests in an Emacs GUI
Date: Fri, 23 Jan 2015 16:42:21 +0100 [thread overview]
Message-ID: <86a919mrky.fsf@example.com> (raw)
In-Reply-To: 87387jey7m.fsf@nicolasgoaziou.fr
[-- Attachment #1: Type: text/plain, Size: 1399 bytes --]
Nicolas Goaziou wrote:
> Sebastien Vauban writes:
>> Nicolas Goaziou wrote:
>>> Sebastien Vauban writes:
>>>
>>>> Did I misunderstand the change of last year (Dec '13) or should `sh'
>>>> language be abandoned in favor of `shell'?
>>>
>>> I think you're right.
>>>
>>>> IIUC, then, those blocks should be updated: ...
>>>> And those inline calls as well: ...
>>>> I am willing to make the patch.
>>>
>>> Great. Please do.
>>
>> Here it is.
>
> Thanks.
>
> Unfortunately, I'm still unable to apply your patch. Before using "git
> format-patch", please ensure that your patch is the only one on top of
> HEAD, and send it again.
Here is a patch you can apply with no problem -- just checked it on
a fresh copy of master.
And you know what? I've understood the problem: when editing the *patch
file* to include the results of `C-x 4 a', and *saving* it, all the
trailing spaces *in the patch file* are removed, because of my custom:
#+begin_src emacs-lisp
(add-hook 'before-save-hook (lambda ()
;; Nuke all trailing whitespaces in the
;; buffer.
(unless (eq major-mode 'message-mode)
(delete-trailing-whitespace))))
#+end_src
Hence, Git fails to find some of the lines it searches for, when trying
to apply my changes...
Best regards,
Seb
--
Sebastien Vauban
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Replace-sh-language-by-shell.patch --]
[-- Type: text/x-patch, Size: 12642 bytes --]
From 744facc265a7fc3808d8af1438c2393be9168ef4 Mon Sep 17 00:00:00 2001
From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
Date: Fri, 23 Jan 2015 16:13:16 +0100
Subject: [PATCH] Replace `sh' language by `shell'
* testing/README, testing/examples/babel.org, ob-shell-test.org, testing/lisp/test-ob-exp.el, test-ob.el: Replace `sh' language by `shell'.
---
testing/README | 2 +-
testing/examples/babel.org | 54 +++++++++++++++++++-------------------
testing/examples/ob-shell-test.org | 11 ++++----
testing/lisp/test-ob-exp.el | 12 ++++-----
testing/lisp/test-ob.el | 24 ++++++++---------
5 files changed, 51 insertions(+), 52 deletions(-)
diff --git a/testing/README b/testing/README
index 34f6fcd..d8a31ac 100644
--- a/testing/README
+++ b/testing/README
@@ -17,7 +17,7 @@ relative to the base of the Org-mode directory.
Also note that many of the current tests uses babel evaluation...
-#+BEGIN_SRC sh :dir (expand-file-name "..")
+#+BEGIN_SRC shell :dir (expand-file-name "..")
# For Emacs earlier than 24, add -L /path/to/ert
emacs -Q --batch \
-L lisp/ -L testing/ -L testing/lisp -l lisp/org.el \
diff --git a/testing/examples/babel.org b/testing/examples/babel.org
index 1f9ce3d..7bdc2ff 100644
--- a/testing/examples/babel.org
+++ b/testing/examples/babel.org
@@ -125,7 +125,7 @@
(list (my-map 'list #'+
(append prev-row '(0))
(append '(0) prev-row)))))))
-
+
(pascals-triangle n)
#+end_src
@@ -196,9 +196,9 @@ an = sign.
:results: silent
:ID: 54cb8dc3-298c-4883-a933-029b3c9d4b18
:END:
-Here is one in the middle src_sh{echo 1} of a line.
-Here is one at the end of a line. src_sh{echo 2}
-src_sh{echo 3} Here is one at the beginning of a line.
+Here is one in the middle src_shell{echo 1} of a line.
+Here is one at the end of a line. src_shell{echo 2}
+src_shell{echo 3} Here is one at the beginning of a line.
* exported inline source block
:PROPERTIES:
@@ -206,10 +206,10 @@ src_sh{echo 3} Here is one at the beginning of a line.
:results: silent
:exports: code
:END:
-Here is one in the middle src_sh{echo 1} of a line.
-Here is one at the end of a line. src_sh{echo 2}
-src_sh{echo 3} Here is one at the beginning of a line.
-Here is one that is also evaluated: src_sh[:exports both]{echo 4}
+Here is one in the middle src_shell{echo 1} of a line.
+Here is one at the end of a line. src_shell{echo 2}
+src_shell{echo 3} Here is one at the beginning of a line.
+Here is one that is also evaluated: src_shell[:exports both]{echo 4}
* mixed blocks with exports both
:PROPERTIES:
@@ -235,27 +235,27 @@ Here is one that is also evaluated: src_sh[:exports both]{echo 4}
:noweb-sep: ""
:END:
-#+begin_src sh :tangle yes :noweb yes :shebang "#!/bin/sh"
+#+begin_src shell :tangle yes :noweb yes :shebang "#!/bin/sh"
<<fullest-disk>>
#+end_src
** query all mounted disks
-#+begin_src sh :noweb-ref fullest-disk
+#+begin_src shell :noweb-ref fullest-disk
df
#+end_src
** strip the header row
-#+begin_src sh :noweb-ref fullest-disk
+#+begin_src shell :noweb-ref fullest-disk
|sed '1d'
#+end_src
** sort by the percent full
-#+begin_src sh :noweb-ref fullest-disk
+#+begin_src shell :noweb-ref fullest-disk
|awk '{print $5 " " $6}'|sort -n |tail -1
#+end_src
** extract the mount point
-#+begin_src sh :noweb-ref fullest-disk
+#+begin_src shell :noweb-ref fullest-disk
|awk '{print $2}'
#+end_src
* resolving sub-trees as references
@@ -290,20 +290,20 @@ has length 14
:results: silent
:ID: 0D0983D4-DE33-400A-8A05-A225A567BC74
:END:
-src_sh{echo "One"} block at start of line
- One spaced block in src_sh{ echo "middle" } of line
-src_sh{echo 2} blocks on the src_emacs-lisp{"same"} line
- Inline block with src_sh[:results silent]{ echo "parameters" }.
+src_shell{echo "One"} block at start of line
+ One spaced block in src_shell{ echo "middle" } of line
+src_shell{echo 2} blocks on the src_emacs-lisp{"same"} line
+ Inline block with src_shell[:results silent]{ echo "parameters" }.
* org-babel-get-inline-src-block-matches (with empty args)
:PROPERTIES:
:results: silent
:ID: d55dada7-de0e-4340-8061-787cccbedee5
:END:
-src_sh[]{echo "One"} block at start of line
- One spaced block in src_sh[]{ echo "middle" } of line
-src_sh[]{echo 2} blocks on the src_emacs-lisp[]{"same"} line
- Inline block with src_sh[:results silent]{ echo "parameters" }.
+src_shell[]{echo "One"} block at start of line
+ One spaced block in src_shell[]{ echo "middle" } of line
+src_shell[]{echo 2} blocks on the src_emacs-lisp[]{"same"} line
+ Inline block with src_shell[:results silent]{ echo "parameters" }.
* exporting a code block with a name
:PROPERTIES:
@@ -312,7 +312,7 @@ src_sh[]{echo 2} blocks on the src_emacs-lisp[]{"same"} line
exporting a code block with a name
#+name: qux
-#+begin_src sh :foo "baz"
+#+begin_src shell :foo "baz"
echo bar
#+end_src
* noweb no-export and exports both
@@ -324,13 +324,13 @@ Weird interaction.
here is one block
#+name: noweb-no-export-and-exports-both-1
-#+BEGIN_SRC sh :exports none
+#+BEGIN_SRC shell :exports none
echo 1
#+END_SRC
and another
-#+BEGIN_SRC sh :noweb no-export :exports both
+#+BEGIN_SRC shell :noweb no-export :exports both
# I am inside the code block
<<noweb-no-export-and-exports-both-1>>
#+END_SRC
@@ -373,11 +373,11 @@ Here is a call line with more than just the results exported.
:END:
#+name: strip-export-1
-#+BEGIN_SRC sh :exports none
+#+BEGIN_SRC shell :exports none
i="10"
#+END_SRC
-#+BEGIN_SRC sh :noweb strip-export :exports code :results silent
+#+BEGIN_SRC shell :noweb strip-export :exports code :results silent
<<strip-export-1>>
echo "1$i"
#+END_SRC
@@ -444,7 +444,7 @@ comments for ":var":
#+HEADER: :var c=(or (org-entry-get org-babel-current-src-block-location "c" t) "0")
#+HEADER: :var d=(or (org-entry-get org-babel-current-src-block-location "d" t) "0")
#+HEADER: :var e=(or (org-entry-get org-babel-current-src-block-location "e" t) "0")
-#+BEGIN_SRC sh :shebang #!/bin/sh :exports results :results verbatim
+#+BEGIN_SRC shell :shebang #!/bin/sh :exports results :results verbatim
printf "shell a:$a, b:$b, c:$c, d:$d, e:$e"
#+END_SRC
diff --git a/testing/examples/ob-shell-test.org b/testing/examples/ob-shell-test.org
index a54e5c0..ce4ae79 100644
--- a/testing/examples/ob-shell-test.org
+++ b/testing/examples/ob-shell-test.org
@@ -22,7 +22,7 @@
:ID: 0ba56632-8dc1-405c-a083-c204bae477cf
:END:
** Generic shell: no arrays
-#+begin_src sh :exports results :var array=sample_array
+#+begin_src shell :exports results :var array=sample_array
echo ${array}
#+end_src
@@ -32,7 +32,7 @@ echo ${array}
** Bash shell: support for arrays
Bash will see a simple indexed array. In this test, we check that the
returned value is indeed only the first item of the array, as opposed to
-the generic serialiation that will return all elements of the array as
+the generic serialiation that will return all elements of the array as
a single string.
#+begin_src bash :exports results :var array=sample_array
echo ${array}
@@ -47,7 +47,7 @@ echo ${array}
:END:
** Generic shell: no special handing
The shell will see all values as a single string.
-#+begin_src sh :exports results :var table=sample_mapping_table
+#+begin_src shell :exports results :var table=sample_mapping_table
echo ${table}
#+end_src
@@ -69,13 +69,13 @@ echo ${table[second]}
:ID: 82320a48-3409-49d7-85c9-5de1c6d3ff87
:END:
** Generic shell: no special handing
-#+begin_src sh :exports results :var table=sample_big_table
+#+begin_src shell :exports results :var table=sample_big_table
echo ${table}
#+end_src
#+RESULTS:
: bread 2 kg spaghetti 20 cm milk 50 dl
-
+
** Bash shell: support for associative arrays with lists
Bash will see an associative array that contains each row as a single
string. Bash cannot handle lists in associative arrays.
@@ -85,4 +85,3 @@ echo ${table[spaghetti]}
#+RESULTS:
: 20 cm
-
diff --git a/testing/lisp/test-ob-exp.el b/testing/lisp/test-ob-exp.el
index 9a586f2..aec4588 100644
--- a/testing/lisp/test-ob-exp.el
+++ b/testing/lisp/test-ob-exp.el
@@ -1,6 +1,6 @@
;;; test-ob-exp.el
-;; Copyright (c) 2010-2014 Eric Schulte
+;; Copyright (c) 2010-2015 Eric Schulte
;; Authors: Eric Schulte
;; This file is not part of GNU Emacs.
@@ -242,11 +242,11 @@ Here is one at the end of a line. =2=
(should
(string-match
(replace-regexp-in-string
- "\\\\\\[]{" "\\(?:\\[]\\)?{" ;accept both src_sh[]{...} or src_sh{...}
- (regexp-quote "Here is one in the middle src_sh[]{echo 1} of a line.
-Here is one at the end of a line. src_sh[]{echo 2}
-src_sh[]{echo 3} Here is one at the beginning of a line.
-Here is one that is also evaluated: src_sh[]{echo 4} =4=")
+ "\\\\\\[]{" "\\(?:\\[]\\)?{" ;accept both src_shell[]{...} or src_shell{...}
+ (regexp-quote "Here is one in the middle src_shell[]{echo 1} of a line.
+Here is one at the end of a line. src_shell[]{echo 2}
+src_shell[]{echo 3} Here is one at the beginning of a line.
+Here is one that is also evaluated: src_shell[]{echo 4} =4=")
nil t)
(org-test-at-id "cd54fc88-1b6b-45b6-8511-4d8fa7fc8076"
(org-narrow-to-subtree)
diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el
index 1f375ed..1a35d5f 100644
--- a/testing/lisp/test-ob.el
+++ b/testing/lisp/test-ob.el
@@ -294,7 +294,7 @@ this is simple"
(test-at-id "d55dada7-de0e-4340-8061-787cccbedee5")))
(ert-deftest test-org-babel/inline-src_blk-default-results-replace-line-1 ()
- (let ((test-line "src_sh{echo 1}")
+ (let ((test-line "src_shell{echo 1}")
(org-babel-inline-result-wrap "=%s="))
;; src_ at bol line 1...
(org-test-with-temp-text
@@ -475,14 +475,14 @@ this is simple"
(ert-deftest test-org-babel/combining-scalar-and-raw-result-types ()
(org-test-with-temp-text-in-file "
-#+begin_src sh :results scalar
+#+begin_src shell :results scalar
echo \"[[file:./cv.cls]]\"
#+end_src
#+name:
: [[file:./cv.cls]]
-#+begin_src sh :results raw scalar
+#+begin_src shell :results raw scalar
echo \"[[file:./cv.cls]]\"
#+end_src
"
@@ -513,7 +513,7 @@ echo \"[[file:./cv.cls]]\"
(ert-deftest test-org-babel/just-one-results-block ()
"Test that evaluating two times the same code block does not result in a
duplicate results block."
- (org-test-with-temp-text "#+begin_src sh\necho Hello\n#+end_src\n"
+ (org-test-with-temp-text "#+begin_src shell\necho Hello\n#+end_src\n"
(org-babel-execute-src-block)
(org-babel-execute-src-block) ; second code block execution
(should (search-forward "Hello")) ; the string inside the source code block
@@ -673,27 +673,27 @@ on two lines
(check-eval "no-export" nil))))
(ert-deftest test-ob/noweb-expansion-1 ()
- (org-test-with-temp-text "#+begin_src sh :results output :tangle yes
+ (org-test-with-temp-text "#+begin_src shell :results output :tangle yes
<<foo>>
#+end_src
#+name: foo
-#+begin_src sh
+#+begin_src shell
bar
#+end_src"
(should (string= (org-babel-expand-noweb-references) "bar"))))
(ert-deftest test-ob/noweb-expansion-2 ()
- (org-test-with-temp-text "#+begin_src sh :results output :tangle yes
+ (org-test-with-temp-text "#+begin_src shell :results output :tangle yes
<<foo>>
#+end_src
#+name: foo
-#+begin_src sh :noweb-sep \"\"
+#+begin_src shell :noweb-sep \"\"
bar
#+end_src
-#+begin_src sh :noweb-ref foo :noweb-sep \"\"
+#+begin_src shell :noweb-ref foo :noweb-sep \"\"
baz
#+end_src"
(should (string= (org-babel-expand-noweb-references) "barbaz"))))
@@ -816,7 +816,7 @@ If not inserted correctly then the second evaluation will fail
trying to find the :END: marker."
(org-test-with-temp-text
"- indented
- #+begin_src sh :results file wrap
+ #+begin_src shell :results file wrap
echo test.txt
#+end_src"
(org-babel-next-src-block 1)
@@ -1145,7 +1145,7 @@ Paragraph"
| 1 | bar |
| 2 | baz |
-#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
+#+begin_src shell :var data=input-table :exports results :colnames '(Rev Author)
echo \"$data\"
#+end_src
@@ -1163,7 +1163,7 @@ echo \"$data\"
| 1 | bar |
| 2 | baz |
-#+begin_src sh :var data=input-table :exports results :colnames '(Rev Author)
+#+begin_src shell :var data=input-table :exports results :colnames '(Rev Author)
echo \"$data\"
#+end_src
"
--
2.1.1
next prev parent reply other threads:[~2015-01-23 15:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-22 15:45 63 failures for org-test-run-all-tests in an Emacs GUI Sebastien Vauban
2014-12-24 9:53 ` Nicolas Goaziou
2014-12-24 10:33 ` Sebastien Vauban
2014-12-24 12:39 ` Sebastien Vauban
2014-12-24 16:14 ` Nicolas Goaziou
[not found] ` <87egrp2ffk.fsf-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org>
2014-12-29 16:06 ` [PATCH] Replace `org-ctrl-c-ctrl-c' by `org-babel-execute-maybe' in tests Sebastien Vauban
2014-12-30 8:53 ` Nicolas Goaziou
2014-12-30 11:32 ` Sebastien Vauban
2014-12-30 21:46 ` Nicolas Goaziou
[not found] ` <87y4polsjv.fsf-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org>
2014-12-30 23:34 ` Sebastien Vauban
2015-01-03 10:56 ` Nicolas Goaziou
2015-01-23 15:05 ` Sebastien Vauban
2015-01-23 23:14 ` Nicolas Goaziou
2015-01-30 13:29 ` Sebastien Vauban
2015-01-30 17:30 ` Nicolas Goaziou
2014-12-31 9:25 ` 63 failures for org-test-run-all-tests in an Emacs GUI Sebastien Vauban
2015-01-03 10:57 ` Nicolas Goaziou
2015-01-09 21:01 ` Sebastien Vauban
2015-01-10 10:17 ` Nicolas Goaziou
2015-01-23 15:42 ` Sebastien Vauban [this message]
2015-01-23 23:15 ` Nicolas Goaziou
[not found] ` <87ppa584wz.fsf-Gpy5sJQTEQHwkn9pgDnJRVAUjnlXr6A1@public.gmane.org>
2015-01-30 14:09 ` Sebastien Vauban
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86a919mrky.fsf@example.com \
--to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).