all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Frederick Giasson <fred@curbside.com>
To: Grant Rettke <gcr@wisdomandwonder.com>
Cc: Org-mode <emacs-orgmode@gnu.org>,
	Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: org-detangle seems broken
Date: Wed, 6 Jun 2018 08:31:50 -0400	[thread overview]
Message-ID: <CADjL5rXducKAX3f=bBS_HUgJxXWdzg804bOKxMe0n+wFOXAaBA@mail.gmail.com> (raw)
In-Reply-To: <CAAjq1mdSE9u+6-qipdERqvRDSH-=CDPWFcVr-gzFGiuHw0q3tw@mail.gmail.com>

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

Hi Grant,


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

Yeah not sure I fully understand that code. Basically it does this for each
code block that needs to be detangled right? I am just not sure why the
focus doesn't return back to the source at the end of the process.


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

Yes, I agree with you. However on a team that work on a LP project,
different people have different preferences and workflows. Personally I
only code in the Org-file, and toggle a code block to its major mode if I
need something provided by the major mode (coding in Clojure). However,
some people prefer see the full namespace (one namespace per Org file)
directly in Cider (the major mode) and detangle from there (this is why I
got interested in detangling).

In their case, having the buffer switching back to the Org file is a bit
irritating, particularly since there is no (yet) any function that let you
switch to the tangle source file of a code block.

If this is really the behavior, then I think that a new option should be
added to it such that we can choose one behavior or the other. If a
function that jump from a code block to its tangled source is created, then
we could use it with that option in `org-babel-detangle` to switch back to
the source if it is the wish of the user.

Thoughts?


Thanks,

Fred

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

  reply	other threads:[~2018-06-06 12:31 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
2018-06-06 12:31           ` Frederick Giasson [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADjL5rXducKAX3f=bBS_HUgJxXWdzg804bOKxMe0n+wFOXAaBA@mail.gmail.com' \
    --to=fred@curbside.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=gcr@wisdomandwonder.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.