GNU bug report logs -
#38616
emacs: fix odt export
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sun, 22 Dec 2019 10:34:13 +0100
with message-id <87h81swvoq.fsf <at> guixSD.i-did-not-set--mail-host-address--so-tickle-me>
and subject line Re: [bug#38616] emacs: fix odt export
has caused the debbugs.gnu.org bug report #38616,
regarding emacs: fix odt export
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
38616: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38616
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hello Guix!
Neither on NixOS or in guix I've ever been able to export an org file to
otd. The error was
'OpenDocument export failed: Buffer is read-only: #<killed buffer>'.
I've seen some report of this error on the web, like:
- https://lists.gnu.org/archive/html/emacs-orgmode/2018-05/msg00545.html
- https://github.com/syl20bnr/spacemacs/issues/1482
but also on our IRC:
- http://logs.guix.gnu.org/guix/2019-05-07.log
- http://logs.guix.gnu.org/guix/2019-07-25.log
but I was not able to find a fix for it.
Today I checked the source and figured it out. The explanation, as
written in the patch, is the following
> Files inside the guix store are read only. "styles.xml" is copied from the
> store (/share/emacs/26.3/etc/org/OrgOdtStyles.xml), so it's read only too.
> ox-odt needs this file, so if it's not writable it will fail. This patch
> adjust the permissions.
So, this patches fixes the permissions on the file.
I've two questions:
1. Is it fine to have a .patch, or should I add a phase where I fix the
file? this seemed to be easier
2. If the same error happens for other programs, might it make sense to
"fake" rw permissions in the store (by using a virtual fs or
something) so that files are copied as rw, but files in the store are
still ro?
Thanks!
Nicolò
[0001-gnu-packages-emascs.scm-emacs-patches-Fix-odt-export.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
Closing this since my commit has been merged upstream! [1]
(I read on debbugs that to close the issue I need to add -done after the
bug #, let's try)
[1] https://code.orgmode.org/bzg/org-mode/commit/6315e1e76087a013198bfc33f0ec6a444cf5e662
Jelle Licht <jlicht <at> fsfe.org> writes:
> Hello Nicholò,
>
> anothersms <at> gmail.com (Nicolò Balzarotti) writes:
>
>> Hello Guix!
>>
>> Neither on NixOS or in guix I've ever been able to export an org file to
>> otd. The error was
>> 'OpenDocument export failed: Buffer is read-only: #<killed buffer>'.
>>
>> I've seen some report of this error on the web, like:
>> - https://lists.gnu.org/archive/html/emacs-orgmode/2018-05/msg00545.html
>> - https://github.com/syl20bnr/spacemacs/issues/1482
>>
>> but also on our IRC:
>> - http://logs.guix.gnu.org/guix/2019-05-07.log
>> - http://logs.guix.gnu.org/guix/2019-07-25.log
>> but I was not able to find a fix for it.
>>
>> Today I checked the source and figured it out. The explanation, as
>> written in the patch, is the following
>>
>>> Files inside the guix store are read only. "styles.xml" is copied from the
>>> store (/share/emacs/26.3/etc/org/OrgOdtStyles.xml), so it's read only too.
>>> ox-odt needs this file, so if it's not writable it will fail. This patch
>>> adjust the permissions.
> Thanks for figuring this out! I've been using my local (terrible)
> workarounds for years to make this work.
>
>>
>> So, this patches fixes the permissions on the file.
>>
>> I've two questions:
>> 1. Is it fine to have a .patch, or should I add a phase where I fix the
>> file? this seemed to be easier
>
> I can't really advise on the best way forward here, but if you do decide
> to go with the .patch route, you should probably also add your .patch
> file to `dist_patch_DATA' in gnu/local.mk.
>
>> 2. If the same error happens for other programs, might it make sense to
>> "fake" rw permissions in the store (by using a virtual fs or
>> something) so that files are copied as rw, but files in the store are
>> still ro?
>
> IMHO, software shouldn't assume certain permissions are set, and instead
> check or make-it-so. Perhaps you could upstream your patch instead of
> embedding it into Guix?
>
> Furthermore, the same issue as the one your fixed here is also present
> in our `emacs-org' package. Do you think your approach would work there
> as well? If so, it might make sense to fix both emacs and emacs-org.
>
> Thanks!
> - Jelle
This bug report was last modified 5 years and 155 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.