emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Mark Dawson <markgdawson@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] ob-tangle.el: Fix error in org-tangle from org-src edit buffer
Date: Sat, 11 Sep 2021 08:05:36 +0100	[thread overview]
Message-ID: <CAAgMa4Na2zurLgq0PRnDtsm6w=YRozOuTed8r_00KcHELTd5UQ@mail.gmail.com> (raw)

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

[PATCH] ob-tangle.el: Fix error in org-tangle from org-src edit
 buffer

(org-babel-tangle) : Fix stringp error which happens when confirming
successful tangle when `org-babel-tangle` is called from an org-src edit
buffer.

TINYCHANGE
---
 lisp/ob-tangle.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 2f60ef9a4..0768c8588 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -281,7 +281,10 @@ matching a regular expression."
  (if (= block-counter 1) "" "s")
  (file-name-nondirectory
   (buffer-file-name
-   (or (buffer-base-buffer) (current-buffer)))))
+   (or (buffer-base-buffer)
+                       (current-buffer)
+                       (and (org-src-edit-buffer-p)
+                            (org-src-source-buffer))))))
  ;; run `org-babel-post-tangle-hook' in all tangled files
  (when org-babel-post-tangle-hook
   (mapc
-- 
2.30.1

[-- Attachment #2: Type: text/html, Size: 1139 bytes --]

             reply	other threads:[~2021-09-11  7:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-11  7:05 Mark Dawson [this message]
2021-09-19 12:57 ` [PATCH] ob-tangle.el: Fix error in org-tangle from org-src edit buffer Timothy

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='CAAgMa4Na2zurLgq0PRnDtsm6w=YRozOuTed8r_00KcHELTd5UQ@mail.gmail.com' \
    --to=markgdawson@gmail.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).