emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Fix 'ob-sed-test' on BSD/macOS
@ 2022-10-06 19:25 Rudolf Adamkovič
  2022-10-07  4:13 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Rudolf Adamkovič @ 2022-10-06 19:25 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 116 bytes --]

Please see the attached two patches:

(1) fixes 'ob-sed-test' on BSD/macOS, and
(2) fixes a typo in 'ob-sed'.

Rudy

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ob-sed-test-Make-the-tests-pass-on-BSD-systems-such-.patch --]
[-- Type: text/x-patch, Size: 976 bytes --]

From 868f878cb50c5234a16b2675688256892467f5f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= <salutis@me.com>
Date: Thu, 6 Oct 2022 21:14:17 +0200
Subject: [PATCH 1/2] ob-sed-test: Make the tests pass on BSD systems, such as
 macOS

* testing/examples/ob-sed-test.org: Fix BSD sed incompatibility
---
 testing/examples/ob-sed-test.org | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/testing/examples/ob-sed-test.org b/testing/examples/ob-sed-test.org
index aae1323ca..2f8bcb089 100644
--- a/testing/examples/ob-sed-test.org
+++ b/testing/examples/ob-sed-test.org
@@ -30,6 +30,9 @@
   :ID:       E3C6A8BA-39FF-4840-BA8E-90D5C4365AB1
   :END:
 
-  #+BEGIN_SRC sed :in-file test2.txt :cmd-line "-i"
+  /Note:/ Use =-i.backup= instead of just =-i= because the BSD =sed=,
+  unlike the GNU =sed=, requires =-i <extension>=.
+
+  #+BEGIN_SRC sed :in-file test2.txt :cmd-line "-i.backup"
     s/test/tested again/
   #+END_SRC
-- 
2.37.3


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-ob-sed-Fix-typo.patch --]
[-- Type: text/x-patch, Size: 949 bytes --]

From 34e352b07a53b070a6ea02f820c8d63d0abecebc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rudolf=20Adamkovi=C4=8D?= <salutis@me.com>
Date: Thu, 6 Oct 2022 21:18:57 +0200
Subject: [PATCH 2/2] ob-sed: Fix typo

* lisp/ob-sed.el: Fix a typo in a comment
---
 lisp/ob-sed.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-sed.el b/lisp/ob-sed.el
index 9befa7163..ecebef925 100644
--- a/lisp/ob-sed.el
+++ b/lisp/ob-sed.el
@@ -35,7 +35,7 @@
 ;; In addition to the normal header arguments, ob-sed also provides
 ;; :cmd-line and :in-file. :cmd-line allows one to pass other flags to
 ;; the sed command like the "--in-place" flag which makes sed edit the
-;; file pass to it instead of outputting to standard out or to a
+;; file passed to it instead of outputting to standard out or to a
 ;; different file. :in-file is a header arguments that allows one to
 ;; tell Org Babel which file the sed script to act on.
 
-- 
2.37.3


[-- Attachment #4: Type: text/plain, Size: 254 bytes --]

-- 
"It is no paradox to say that in our most theoretical moods we may be
nearest to our most practical applications."
-- Alfred North Whitehead, 1861-1947

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Fix 'ob-sed-test' on BSD/macOS
  2022-10-06 19:25 Fix 'ob-sed-test' on BSD/macOS Rudolf Adamkovič
@ 2022-10-07  4:13 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2022-10-07  4:13 UTC (permalink / raw)
  To: Rudolf Adamkovič; +Cc: emacs-orgmode

Rudolf Adamkovič <salutis@me.com> writes:

> Please see the attached two patches:
>
> (1) fixes 'ob-sed-test' on BSD/macOS, and
> (2) fixes a typo in 'ob-sed'.

Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=48ac65bea08d385065c4b57f64a276f2b0d86a07
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a220492064c674ef09589b43799e8868489783a4

Thanks for your contribution!

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-07  4:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-06 19:25 Fix 'ob-sed-test' on BSD/macOS Rudolf Adamkovič
2022-10-07  4:13 ` Ihor Radchenko

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).