Closed pank closed 7 years ago
Hi Rasmus, the Emacs 25 Dependency is largely due to the use of setf. But I can work around that, what do you think would be a viable minimum Emacs version to support?
Cheers, Mark
To be more precise, the Emacs 25 dependency is on setf using generalized place names, which are used to access the alist that forms the headline cache. I would proceed swapping the alist out for a hashtable. This should make this part compatible with Emacs 24.
The seq usage could propably be eliminated the way you suggested.
I think Emacs 24 compatibility would be fine. 24 would be a nice target, because of the per-file lexical binding feature.
Hi,
To be more precise, the Emacs 25 dependency is on setf using generalized place names, which are used to access the alist that forms the headline cache. I would proceed swapping the alist out for a hashtable. This should make this part compatible with Emacs 24.
So why do you need the current filename in the template step anyway? And org-publish functions for that matter? It shouldn’t be necessary, see e.g. ox-odt.
Also, for the λ with (plist (car (cdr headline))) near the setf, it should be possible to use org-element. E.g. (org-element-property :raw-value headline). Or am I misunderstanding something here? (I obviously haven’t read the code carefully).
I think Emacs 24 compatibility would be fine. 24 would be a nice target, because of the per-file lexical binding feature.
AFAIR the next Org version is targeting Emacs 24.4.
-- Enough with the blah blah!
Hi, the filenames and headlines are saved during the template phase, because basically we need to be able to write a table of contents in org-epub-publish-finish. In particular we need the raw headline info, the level and the value org-export-get-reference to link to the constituent html file from the toc.
The toc here is a machine readable file, that is used to present a seperate table of contents to the user. This is device/reader dependent but most readers do have an option to present the toc in a kind of outliner and to navigate to certain elements.
So the structure is machine readable toc (out of band), global toc for the EPUB (in band, not implemented yet) and than the constituent tocs for each part (html file) that is already generated.
I'll be opening two seperate bugs for this tomorrow morning: one for the global toc and one for the ordering of the pages. The finished ebook will be presented in a linear fashin (although you can use hyperlinks), to do this constituent parts can be stitched together using a spine (org-epub-template-content-opf). This order should be configurable. Configuration options should account for toc generation, preface sections and cover, as well as order of the main content parts.
Cheers, Mark
I'll be on vacation the last week of march, which means I'll be able to hack on this and get some reasonable amount done during the day. I hope to be moving the dependency to Emacs 24, I'll ping you. I'd really enjoy some more feedback.
@pank could your friend try running this on emacs 24? I just pushed replacements for the alist-get and seq dependencies. I'm however not sure about org-string-nw-p, I think it has been marked as deprecated.
The change are now on master, and I verified that these build in emacs 25.
Can we close this bug? I think I can live pretty well with Emacs 24.3 as a target, this seems to concur with the next org mode target.
Please do.
Closed.
Hi,
Why do you require
emacs-25
for this package? Is it because you loadseq.el
? If so, isn't it available in GNU ELPA? Then you could just require that. A friend wanted to test your package, but couldn't because it requiredemacs-25
.Further, do you really need
seq.el
? A quick search suggests it is only used hereI'm not sure what this is supposed to test. Are you testing for a valid file names or a non-empty string? In the former case,
file-exists-p
might be better and in the latter,org-string-nw-p
might be suitable.Thanks, Rasmus