emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Manuals for GNU ELPA packages


From: Philip Kaludercic
Subject: Re: Manuals for GNU ELPA packages
Date: Mon, 26 Feb 2024 10:49:43 +0000

Michael Albinus <michael.albinus@gmx.de> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
> Hi Philip,
>
>> ... then the documentation should be packaged in
>> the tarball and also appear online under
>> https://elpa.gnu.org/packages/doc/calibre.html.
>
> On https://elpa.gnu.org/packages/doc/, there is a directory of all
> manuals, plus the README of plz.el. The latter is wrong here, I guess.

It turns out that this is actually a more general issue, since
elpa-admin.el keeps the basename of the file being rendered, even if
multiple packages use the same name (e.g. as is the case with packages
that use "README.org").  As we want to be able to render multiple manual
files, we cannot just trivially rename the name of the symlink.

I think the simplest solution is to point to files in the respective
doc/ sub-directory of each package:

diff --git a/elpa-admin.el b/elpa-admin.el
index cde0e3437a..3e79bef078 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -1856,7 +1856,11 @@ arbitrary code."
                (file-readable-p html-dir)) ;; html doc files were built
       (insert "<dt>Manual</dt> <dd>\n")
       (dolist (doc docfiles)
-       (let ((html-file (concat html-dir (cdr doc))))
+       (let ((html-file (expand-file-name
+                          (cdr doc)
+                          (expand-file-name
+                           (symbol-name (car pkg-spec))
+                           html-dir))))
          (insert "<a href=\"" html-file "\">"
                  (car doc)
                  "</a>\n")
and perhaps even stop generating the symlinks.

> Best regards, Michael.

-- 
        Philip Kaludercic on peregrine

reply via email to

[Prev in Thread] Current Thread [Next in Thread]