nobiot / org-transclusion

Emacs package to enable transclusion with Org Mode
https://nobiot.github.io/org-transclusion/
GNU General Public License v3.0
926 stars 47 forks source link

Feature regression for :end #219

Closed shombando closed 8 months ago

shombando commented 8 months ago

Hi @nobiot! I haven't generated my config in a while and just encountered a bug where the :end "string_end" is no longer working, the ./file.ext::string_begin starting the transclusion in the correct spot but including the entire file from that point to the end.

I was able to revert back to Timestamp: 2022-08-24 00:06:09 GNU ELPA commit: 8d905f5b986c4face98503d1474738b76535243e Emacs commit: 67a15ce1564ce35ece24a19f00e03a36e0575746

and that behaves as expected but this does not: Timestamp: 2024-01-22 00:01:43 GNU ELPA commit: 42757e0612c9dcde81e69ce56712ba1571b29c2b Emacs commit: 9364c28959a5b00e8ffd5d0d283ff0c0042f1bb0

I tried a few versions in between and those didn't work either (sorry forgot to keep track) and I haven't had the time to narrow down the exact regression commit but wanted to pass the information along.

You can refer to my repo: https://github.com/shombando/.emacs.custom/blob/main/config.org?plain=1#L11

Here's the line copied for convenience (all the transclude sections are behaving the same way): #+transclude: [[./init.el::;;directory_begin]] :lines 2- :src emacs-lisp :end ";;directory_end"

Emacs version: GNU Emacs 28.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2023-12-31

Please let me know if you need any more information. Cheers, Shom

nobiot commented 8 months ago

@shombando Thank you for reporting. Will have a look next chance I have (one of the weekends with some time).

I am struggling to identify the commit in ELPA. How can I find the commit you refer to? The commit hash in the GitHub matches what I have in my Emacs... Sorry, I think I am not really good at using Git...

nobiot commented 8 months ago

cc @josephmturner I may not be able to look at this regression soon; perhaps you have some idea where to begin?

josephmturner commented 8 months ago

This bug was introduced with a typo in 2cb719e Add support for handling identations when using :thing-at-point sexp. Fixed in #220.

nobiot commented 8 months ago

@josephmturner Thank you! Super fast. This incident makes me realise I need to spend a serious amount of time on making unit tests…

shombando commented 8 months ago

Sorry for the hit and run, got distracted. Thanks for finding and fixing the issue @josephmturner, looking forward to the merge!

nobiot commented 8 months ago

@josephmturner Thank you so much for your patch. Sorry for my slowness on this -- I have less headspace to focus on managing a package -- the next big step for me is to start building unit tests (I am thinking of ERT).

@shombando Thank you for reporting. Hopefully you can spend some time testing the latest commit for the fix.

cc @devcarbon-com -- no intention of blaming; ultimately I am the one to merge commits. I believe we briefly discussed refactoring the function org-transclusion-content-range-of-lines. (I cannot find the source, so I may well be mistaken). But this is something I would like to get around to at some point (probably in parallel with the efforts for establishing unit tests).

josephmturner commented 8 months ago

@nobiot happy to help :)

shombando commented 8 months ago

@shombando Thank you for reporting. Hopefully you can spend some time testing the latest commit for the fix.

I verified that the bug is fixed 🥳 thank you all!

nobiot commented 8 months ago

Thank you!

devcarbon-com commented 7 months ago

@nobiot , I seem to remember that, too, although I'm not sure what thread it was in, either. I'm pretty swamped for the next month or two from the looks of it, unfortunately. I'll be glad to help where and when I can.

nobiot commented 7 months ago

@devcarbon-com no worries and thank you 🙏 I am also a bit tied up for the next few weeks. We all need to balance open source stuff and the other parts of life where we use the open source stuff 👍