unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: "Kjartan Óli Ágústsson" <kjartanoli@outlook.com>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>,
	"Stefan Monnier" <monnier@iro.umontreal.ca>
Subject: Re: Manuals for GNU ELPA packages
Date: Mon, 26 Feb 2024 10:49:43 +0000	[thread overview]
Message-ID: <871q8zcxfc.fsf@posteo.net> (raw)
In-Reply-To: <878r5gjav5.fsf@gmx.de> (Michael Albinus's message of "Wed, 27 Dec 2023 09:41:34 +0100")

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

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:


[-- Attachment #2: Type: text/plain, Size: 654 bytes --]

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")

[-- Attachment #3: Type: text/plain, Size: 111 bytes --]


and perhaps even stop generating the symlinks.

> Best regards, Michael.

-- 
	Philip Kaludercic on peregrine

  parent reply	other threads:[~2024-02-26 10:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-26 13:44 Manuals for GNU ELPA packages Kjartan Óli Ágústsson
2023-12-26 17:17 ` Philip Kaludercic
2023-12-27  8:41   ` Michael Albinus
2023-12-27 13:47     ` Philip Kaludercic
2024-02-26 10:49     ` Philip Kaludercic [this message]
2024-02-26 13:04       ` Stefan Monnier
2024-02-26 14:05         ` Philip Kaludercic
2024-02-26 15:03       ` Stefan Monnier
2024-02-26 15:27         ` Philip Kaludercic
2024-02-26 16:15           ` Stefan Monnier

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://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871q8zcxfc.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=emacs-devel@gnu.org \
    --cc=kjartanoli@outlook.com \
    --cc=michael.albinus@gmx.de \
    --cc=monnier@iro.umontreal.ca \
    /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/emacs.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).