emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Rudolf Adamkovič" <salutis@me.com>
To: emacs-orgmode@gnu.org
Subject: Fix 'ob-sed-test' on BSD/macOS
Date: Thu, 06 Oct 2022 21:25:07 +0200	[thread overview]
Message-ID: <m2lepssqjw.fsf@me.com> (raw)

[-- 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

             reply	other threads:[~2022-10-06 19:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06 19:25 Rudolf Adamkovič [this message]
2022-10-07  4:13 ` Fix 'ob-sed-test' on BSD/macOS Ihor Radchenko

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=m2lepssqjw.fsf@me.com \
    --to=salutis@me.com \
    --cc=emacs-orgmode@gnu.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).