From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederick Giasson Subject: Re: org-detangle seems broken Date: Mon, 4 Jun 2018 08:42:27 -0400 Message-ID: References: <87wovhmr0v.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="00000000000031830f056dd044bf" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPoog-0006kn-PB for emacs-orgmode@gnu.org; Mon, 04 Jun 2018 08:42:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPoof-0001XH-JV for emacs-orgmode@gnu.org; Mon, 04 Jun 2018 08:42:30 -0400 Received: from mail-qk0-x234.google.com ([2607:f8b0:400d:c09::234]:46000) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPoof-0001VU-5I for emacs-orgmode@gnu.org; Mon, 04 Jun 2018 08:42:29 -0400 Received: by mail-qk0-x234.google.com with SMTP id c198-v6so24806610qkg.12 for ; Mon, 04 Jun 2018 05:42:28 -0700 (PDT) In-Reply-To: <87wovhmr0v.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org --00000000000031830f056dd044bf Content-Type: multipart/alternative; boundary="00000000000031830b056dd044bd" --00000000000031830b056dd044bd Content-Type: text/plain; charset="UTF-8" Hi Nicolas, Here it is. If you =detangle= the =broken-detangle--working.el= file, it will work as expected. However, if you try to detangle the =broken-detangle--NOT-working.el= file, you should get a "Not in a source block" error in *message*. Another thing I noted while creating the ECM is if there is only *one* code block in the =.org= file, then it throws a =End of Buffer= error. On Sat, Jun 2, 2018 at 6:17 AM, Nicolas Goaziou wrote: > Hello, > > Frederick Giasson writes: > > > It appears that org-detangle is broken. I am using spacemacs, but even > with > > a vanilla Emacs (emacs -Q) it appears to be broken. > > > > When I tangle a file with =:comments link= every things works as expected > > and the comments are added in the tangled file. > > > > When I just detangle that tangled file, everything get detangled as > > expected. > > > > If I change one or two lines, it normally works as expected. > > > > If I change more than 4 lines, I always get the error message "Not in a > > block file". > > > > Some debugging shows that the function =org-element-at-point= sometimes > tag > > the element as =paragraph= instead of =src-block=, like if it doesn't > know > > where it is... somehow. > > > > Does anybody use that function without experiencing this (apparent major) > > issue? > > Could you provide an ECM demonstrating the issue? > > Thank you. > > Regards, > > -- > Nicolas Goaziou > --00000000000031830b056dd044bd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Nicolas,

Here it is. If y= ou =3Ddetangle=3D the =3Dbroken-detangle--working.el=3D file, it will work = as expected.

However, if you try to detangle the = =3Dbroken-detangle--NOT-working.el=3D file, you should get a "Not in a= source block" error in *message*.

Another th= ing I noted while creating the ECM is if there is only *one* code block in = the =3D.org=3D file, then it throws a =3DEnd of Buffer=3D error.
=


On Sat, Jun 2, 2018 at 6:17 AM, Nicolas Goaziou <mail@n= icolasgoaziou.fr> wrote:
He= llo,

Frederick Giasson <fred@curbside.co= m> writes:

> It appears that org-detangle is broken. I am using spacemacs, but even= with
> a vanilla Emacs (emacs -Q) it appears to be broken.
>
> When I tangle a file with =3D:comments link=3D every things works as e= xpected
> and the comments are added in the tangled file.
>
> When I just detangle that tangled file, everything get detangled as > expected.
>
> If I change one or two lines, it normally works as expected.
>
> If I change more than 4 lines, I always get the error message "No= t in a
> block file".
>
> Some debugging shows that the function =3Dorg-element-at-point=3D some= times tag
> the element as =3Dparagraph=3D instead of =3Dsrc-block=3D, like if it = doesn't know
> where it is... somehow.
>
> Does anybody use that function without experiencing this (apparent maj= or)
> issue?

Could you provide an ECM demonstrating the issue?

Thank you.

Regards,

--
Nicolas Goaziou

--00000000000031830b056dd044bd-- --00000000000031830f056dd044bf Content-Type: application/octet-stream; name="broken-detangle.org" Content-Disposition: attachment; filename="broken-detangle.org" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ji08wc9w0 KiBFeHBlcmllbmNlIGJyb2tlbiBkZXRhbmdsZQoKSW4gdGhpcyBleGFtcGxlLCBpZiB3ZSB0YW5n bGUgdGhpcyBmaWxlIGFuZCBpbW1lZGlhdGVseSBkZXRhbmdsZSBpdCwgZXZlcnl0aGluZyBpcyB3 b3JraW5nIGFzIGV4cGVjdGVkIHdpdGhvdXQgZXJyb3IgbWVzc2FnZXMgZnJvbSBPcmcuCgojK0JF R0lOX1NSQyBlbGlzcCA6dGFuZ2xlIGJyb2tlbi1kZXRhbmdsZS5lbCA6Y29tbWVudHMgbGluawoo ZGVmdW4gdGVzdAogICAgKG1lc3NhZ2UgImJyb2tlbiBkZXRhbmdsZSIpKQojK0VORF9TUkMKCklm IEkgdXBkYXRlIHRoZSAqc291cmNlKiBmaWxlIHdpdGggdGhlIGZvbGxvd2luZyBjb2RlIGFuZCB0 aGF0IEkgZGV0YW5nbGUgaXQsIGl0IHdvcmtzIGFzIGV4cGVjdGVkOgoKIytCRUdJTl9TUkMgZWxp c3AgOnRhbmdsZSBicm9rZW4tZGV0YW5nbGUuZWwgOmNvbW1lbnRzIGxpbmsKKGRlZnVuIHRlc3QK ICAgIChtZXNzYWdlICJicm9rZW4gZGV0YW5nbGUiKQogIChtZXNzYWdlICJ0ZXN0IikpCiMrRU5E X1NSQwoKSG93ZXZlciwgaWYgSSBhZGQgYSBsaW5lIG9mIGNvZGUgbGlrZSB0aGlzLCB0aGVuIEkg YW0gY3VycmVudGx5IGdldHRpbmcgYSA9Tm90IGluIGEgc291cmNlIGJsb2NrIi4KCiMrQkVHSU5f U1JDIGVsaXNwIDp0YW5nbGUgYnJva2VuLWRldGFuZ2xlLmVsIDpjb21tZW50cyBsaW5rCihkZWZ1 biB0ZXN0CiAgICAobWVzc2FnZSAiYnJva2VuIGRldGFuZ2xlIikKICAgIChtZXNzYWdlICJ0ZXN0 IikKICAgIChtZXNzYWdlICJ0ZXN0IikpCiMrRU5EX1NSQwoKQW5vdGhlciB0aGluZyB0byBub3Rl LCBpZiB0aGVyZSBpcyBvbmx5ICpvbmUqIGNvZGUgYmxvY2sgaW4gdGhlIE9yZ21vZGUgZmlsZSwg dGhlbiBJIGFtIGdldHRpbmcgYSA9RW5kIG9mIEJ1ZmZlcj0gaW5zdGVhZC4K --00000000000031830f056dd044bf Content-Type: text/x-emacs-lisp; charset="US-ASCII"; name="broken-detangle--NOT-working.el" Content-Disposition: attachment; filename="broken-detangle--NOT-working.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ji08wcaa1 OzsgW1tmaWxlOn4vRG9jdW1lbnRzL2dpdC9icm9rZW4tZGV0YW5nbGUub3JnOjoqRXhwZXJpZW5j ZSUyMGJyb2tlbiUyMGRldGFuZ2xlXVtFeHBlcmllbmNlIGJyb2tlbiBkZXRhbmdsZToxXV0KKGRl ZnVuIHRlc3QKICAobWVzc2FnZSAiYnJva2VuIGRldGFuZ2xlIikKICAobWVzc2FnZSAidGVzdCIp CiAgKG1lc3NhZ2UgInRlc3QiKSkKOzsgRXhwZXJpZW5jZSBicm9rZW4gZGV0YW5nbGU6MSBlbmRz IGhlcmUKCjs7IFtbZmlsZTp+L0RvY3VtZW50cy9naXQvYnJva2VuLWRldGFuZ2xlLm9yZzo6KkV4 cGVyaWVuY2UlMjBicm9rZW4lMjBkZXRhbmdsZV1bRXhwZXJpZW5jZSBicm9rZW4gZGV0YW5nbGU6 Ml1dCihkZWZ1biB0ZXN0CiAgICAobWVzc2FnZSAiYnJva2VuIGRldGFuZ2xlIikKICAobWVzc2Fn ZSAidGVzdCIpKQo7OyBFeHBlcmllbmNlIGJyb2tlbiBkZXRhbmdsZToyIGVuZHMgaGVyZQoKOzsg W1tmaWxlOn4vRG9jdW1lbnRzL2dpdC9icm9rZW4tZGV0YW5nbGUub3JnOjoqRXhwZXJpZW5jZSUy MGJyb2tlbiUyMGRldGFuZ2xlXVtFeHBlcmllbmNlIGJyb2tlbiBkZXRhbmdsZTozXV0KKGRlZnVu IHRlc3QKICAgIChtZXNzYWdlICJicm9rZW4gZGV0YW5nbGUiKQogICAgKG1lc3NhZ2UgInRlc3Qi KQogICAgKG1lc3NhZ2UgInRlc3QiKSkKOzsgRXhwZXJpZW5jZSBicm9rZW4gZGV0YW5nbGU6MyBl bmRzIGhlcmUK --00000000000031830f056dd044bf Content-Type: text/x-emacs-lisp; charset="US-ASCII"; name="broken-detangle--working.el" Content-Disposition: attachment; filename="broken-detangle--working.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ji08wcaf2 OzsgW1tmaWxlOn4vRG9jdW1lbnRzL2dpdC9icm9rZW4tZGV0YW5nbGUub3JnOjoqRXhwZXJpZW5j ZSUyMGJyb2tlbiUyMGRldGFuZ2xlXVtFeHBlcmllbmNlIGJyb2tlbiBkZXRhbmdsZToxXV0KKGRl ZnVuIHRlc3QKICAgIChtZXNzYWdlICJicm9rZW4gZGV0YW5nbGUiKSkKOzsgRXhwZXJpZW5jZSBi cm9rZW4gZGV0YW5nbGU6MSBlbmRzIGhlcmUKCjs7IFtbZmlsZTp+L0RvY3VtZW50cy9naXQvYnJv a2VuLWRldGFuZ2xlLm9yZzo6KkV4cGVyaWVuY2UlMjBicm9rZW4lMjBkZXRhbmdsZV1bRXhwZXJp ZW5jZSBicm9rZW4gZGV0YW5nbGU6Ml1dCihkZWZ1biB0ZXN0CiAgICAobWVzc2FnZSAiYnJva2Vu IGRldGFuZ2xlIikKICAobWVzc2FnZSAidGVzdCIpKQo7OyBFeHBlcmllbmNlIGJyb2tlbiBkZXRh bmdsZToyIGVuZHMgaGVyZQoKOzsgW1tmaWxlOn4vRG9jdW1lbnRzL2dpdC9icm9rZW4tZGV0YW5n bGUub3JnOjoqRXhwZXJpZW5jZSUyMGJyb2tlbiUyMGRldGFuZ2xlXVtFeHBlcmllbmNlIGJyb2tl biBkZXRhbmdsZTozXV0KKGRlZnVuIHRlc3QKICAgIChtZXNzYWdlICJicm9rZW4gZGV0YW5nbGUi KQogICAgKG1lc3NhZ2UgInRlc3QiKQogICAgKG1lc3NhZ2UgInRlc3QiKSkKOzsgRXhwZXJpZW5j ZSBicm9rZW4gZGV0YW5nbGU6MyBlbmRzIGhlcmUK --00000000000031830f056dd044bf--