emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Timothy <tecosaur@gmail.com>
To: markgdawson@gmail.com
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] ob-tangle.el: Fix error in org-tangle from org-src edit buffer
Date: Sun, 19 Sep 2021 20:57:40 +0800	[thread overview]
Message-ID: <871r5ken8g.fsf@gmail.com> (raw)
In-Reply-To: <CAAgMa4Na2zurLgq0PRnDtsm6w=YRozOuTed8r_00KcHELTd5UQ@mail.gmail.com>


Hi Mark,

Many thanks for not only tracking down this problem but making a fix and
submitting it 🙂. I've just pushed this as 986341b with minor tweaks to the
commit message.

Mark Dawson <markgdawson@gmail.com> writes:

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

--
Timothy


      reply	other threads:[~2021-09-19 12:59 UTC|newest]

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

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=871r5ken8g.fsf@gmail.com \
    --to=tecosaur@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=markgdawson@gmail.com \
    /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).