From: Philip Kaludercic <philipk@posteo.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "Michael Albinus" <michael.albinus@gmx.de>,
"Kjartan Óli Ágústsson" <kjartanoli@outlook.com>,
"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: Manuals for GNU ELPA packages
Date: Mon, 26 Feb 2024 14:05:53 +0000 [thread overview]
Message-ID: <87o7c3b9ry.fsf@posteo.net> (raw)
In-Reply-To: <jwvedczgz08.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 26 Feb 2024 08:04:04 -0500")
[-- Attachment #1: Type: text/plain, Size: 611 bytes --]
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> - (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))))
>
> That looks about right, except we want relative names, so we should use
> `concat` or `file-name-concat`.
Of course, I forgot that fine-name-concat was available, and yes, the
absolute file names wouldn't really improve the website experience ^^
This is my suggestion:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Link-to-HTML-manuals-in-their-respective-subdirector.patch --]
[-- Type: text/x-patch, Size: 1972 bytes --]
From e999dbdc195b27ebd5699e5e756131e9b8de5fe5 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Mon, 26 Feb 2024 15:03:43 +0100
Subject: [PATCH] Link to HTML manuals in their respective subdirectories
* elpa-admin.el (elpaa--html-insert-docs): To avoid manuals with the
same names overwriting each other, link directly to the files under
doc/[package name].
(elpaa--html-build-doc): Do not generate symlinks to the actual manual
files.
---
elpa-admin.el | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/elpa-admin.el b/elpa-admin.el
index cde0e3437a..4eb47d6856 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -1856,7 +1856,10 @@ 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 (file-name-concat
+ html-dir
+ (symbol-name (car pkg-spec))
+ (cdr doc))))
(insert "<a href=\"" html-file "\">"
(car doc)
"</a>\n")
@@ -2539,14 +2542,7 @@ directory; one of archive, archive-devel."
:internal--html-docs
(cons (cons (file-name-base html-file)
(file-name-nondirectory html-file))
- (plist-get (cdr pkg-spec) :internal--html-docs)))
-
- ;; Create a symlink from elpa/archive[-devel]/doc/* to
- ;; the actual file, so html references work.
- (with-demoted-errors "%S" ;; 'make-symbolic-link' doesn't work on Windows
- (make-symbolic-link
- (concat (file-name-nondirectory html-dir) "/" destname)
- html-xref-file t))))
+ (plist-get (cdr pkg-spec) :internal--html-docs)))))
(defun elpaa--build-Info-1 (pkg-spec docfile dir html-dir)
"Build an info file from DOCFILE (a texinfo source file).
--
2.43.2
[-- Attachment #3: Type: text/plain, Size: 38 bytes --]
--
Philip Kaludercic on peregrine
next prev parent reply other threads:[~2024-02-26 14:05 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
2024-02-26 13:04 ` Stefan Monnier
2024-02-26 14:05 ` Philip Kaludercic [this message]
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=87o7c3b9ry.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).