From: "Nicolò Balzarotti" <anothersms@gmail.com>
To: Jelle Licht <jlicht@fsfe.org>, 38616@debbugs.gnu.org
Subject: [bug#38616] emacs: fix odt export
Date: Sun, 15 Dec 2019 15:56:50 +0100 [thread overview]
Message-ID: <87fthleix9.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <87a77thdl7.fsf@jlicht.xyz>
Jelle Licht <jlicht@fsfe.org> writes:
> Hello Nicholò,
Nicolò :P
>
> anothersms@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.
I tried org -> pandoc (docx), org -> pandoc (odt), org -> html -> pandoc
(docx) ... and so on but nothing was good enough, so my last resort was
to try to fix it :D
>
>>
>> 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.
Ops thanks, I missed that bit.
>
>> 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?
I'll write a mail to emacs-orgmode@gnu.org right now. I've never
submitted bug reports to emacs or org (tried writing them on the IRC
channel but I've never received answers).
>
> 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.
>
With a quick look, I see no differences between the two files, (and I
assume no differences between file permissions, too). But if we can get
this patched upstream it would be better (I believe it will helps nixos
users too)
> Thanks!
> - Jelle
Thanks!
next prev parent reply other threads:[~2019-12-15 14:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-14 23:45 [bug#38616] emacs: fix odt export Nicolò Balzarotti
2019-12-15 14:23 ` Jelle Licht
2019-12-15 14:56 ` Nicolò Balzarotti [this message]
2019-12-22 9:34 ` bug#38616: " Nicolò Balzarotti
2019-12-15 15:07 ` [bug#38616] [Nicolò Balzarotti] [bug#38616] " Nicolò Balzarotti
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fthleix9.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me \
--to=anothersms@gmail.com \
--cc=38616@debbugs.gnu.org \
--cc=jlicht@fsfe.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).