Org-mode mailing list
 help / color / mirror / 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
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: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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://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

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git