bastibe / org-static-blog

A static site generator using org-mode
BSD 3-Clause "New" or "Revised" License
341 stars 74 forks source link

Fix a bug when used with .dir-locals.el #134

Closed alexispurslane closed 3 months ago

alexispurslane commented 3 months ago

Problem

When the publish directory itself is stored in .dir-locals.el, instead of just the preambles, postambles, etc (for which this was already accounted for in the original dir-locals PR), that makes the correct publish directory local to the buffers derived from that directory, meaning that when you create a temp buffer and switch to it with with-temp-buffer you lose the proper publish directory, causing org-static-blog to be unable to find the published files it's looking for.

Fix

Just save the relevant values before going into the temp buffer. I may not have fixed all the instances of this issue, but here's a fix for the one that was messing me up.

bastibe commented 3 months ago

Thank you for the pull request!

The change looks innocuous enough. Did you check that existing functionality has not been changed?

alexispurslane commented 3 months ago

I haven't had a chance to yet, but I don't think it should. -------- Original Message --------On 7/22/24 7:45 AM, Bastian Bechtold wrote: Thank you for the pull request! The change looks innocuous enough. Did you check that existing functionality has not been changed?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/bastibe/org-static-blog/pull/134#issuecomment-2242758353", "url": "https://github.com/bastibe/org-static-blog/pull/134#issuecomment-2242758353", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

bastibe commented 3 months ago

Thank you very much, then!