emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Grant Rettke <gcr@wisdomandwonder.com>
To: Frederick Giasson <fred@curbside.com>
Cc: Org-mode <emacs-orgmode@gnu.org>,
	Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: org-detangle seems broken
Date: Tue, 5 Jun 2018 18:19:35 -0500	[thread overview]
Message-ID: <CAAjq1mdSE9u+6-qipdERqvRDSH-=CDPWFcVr-gzFGiuHw0q3tw@mail.gmail.com> (raw)
In-Reply-To: <CADjL5rURioNueu-Pk9CvyN-yfGS=iHNDhs0t32jvBw6dKx49Qg@mail.gmail.com>

On Tue, Jun 5, 2018 at 7:18 AM, Frederick Giasson <fred@curbside.com> wrote:
> There is one last thing related to =org-babel-detangle= that seems "broken"
> is that as far as I can see, the top =save-excursion= should save the
> position of the cursor of the source file and keep the buffer at that
> position when we perform a detangling on it, no?
>
> Right now, the behavior is that when we do a detangle from a source file,
> the org file get opened in the buffer of the source file.
>
> However, I think that the right behavior is that when we detangle that the
> remain at the same position in the source file otherwise this gets confusing
> in my opinion.
>
> Is that a bug or the expected behavior?

I think it is expected. The code looks like this:

(when (setq new-body (org-babel-tangle-jump-to-org))
      (org-babel-update-block-body new-body))

The first time I detangled I was surprised, too.

But then it hit me: if you are detangling then you probably might want to
1. See the updated code
2. Commit the updated code

So now I like it.

  reply	other threads:[~2018-06-05 23:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01 17:27 org-detangle seems broken Frederick Giasson
2018-06-02 10:17 ` Nicolas Goaziou
2018-06-04 12:42   ` Frederick Giasson
2018-06-05  9:59     ` Nicolas Goaziou
2018-06-05 12:18       ` Frederick Giasson
2018-06-05 23:19         ` Grant Rettke [this message]
2018-06-06 12:31           ` Frederick Giasson
2018-06-06 16:04             ` Grant Rettke
2018-06-06 16:18               ` Frederick Giasson

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='CAAjq1mdSE9u+6-qipdERqvRDSH-=CDPWFcVr-gzFGiuHw0q3tw@mail.gmail.com' \
    --to=gcr@wisdomandwonder.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=fred@curbside.com \
    --cc=mail@nicolasgoaziou.fr \
    /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).