GNU bug report logs - #56260
29.0.50; Provide a way to define shortdoc groups without loading shortdoc.el

Previous Next

Package: emacs;

Reported by: daanturo <daanturo <at> gmail.com>

Date: Mon, 27 Jun 2022 15:07:01 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56260 in the body.
You can then email your comments to 56260 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#56260; Package emacs. (Mon, 27 Jun 2022 15:07:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to daanturo <daanturo <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 27 Jun 2022 15:07:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: daanturo <daanturo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Provide a way to define shortdoc groups without loading
 shortdoc.el
Date: Mon, 27 Jun 2022 22:06:29 +0700
Currently to use `define-short-documentation-group`, we must first load
`shortdoc.el`, but loading it isn't exactly a cheap task: my startup is
slowed down by ~0.0186s.

We can achieve this with an autoloaded progn:

```elisp

;; Allow registering shortdoc groups without loading this file

;;;###autoload
(progn
  (defvar shortdoc--groups nil)

  (defmacro define-short-documentation-group (group &rest functions)
    ;; docstring
    (declare (indent defun))
    `(progn
       (setq shortdoc--groups (delq (assq ',group shortdoc--groups)
                                    shortdoc--groups))
       (push (cons ',group ',functions) shortdoc--groups))))

```

-- 
Daanturo.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56260; Package emacs. (Tue, 28 Jun 2022 12:44:02 GMT) Full text and rfc822 format available.

Message #8 received at 56260 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: daanturo <daanturo <at> gmail.com>
Cc: 56260 <at> debbugs.gnu.org
Subject: Re: bug#56260: 29.0.50; Provide a way to define shortdoc groups
 without loading shortdoc.el
Date: Tue, 28 Jun 2022 14:42:31 +0200
daanturo <daanturo <at> gmail.com> writes:

> Currently to use `define-short-documentation-group`, we must first load
> `shortdoc.el`, but loading it isn't exactly a cheap task: my startup is
> slowed down by ~0.0186s.
>
> We can achieve this with an autoloaded progn:
>
> ```elisp
>
> ;; Allow registering shortdoc groups without loading this file

I've now done this in Emacs 29.  An alternative approach would be to
move all the definitions of groups out of shortdoc.el into a different
file so that loading shortdoc.el would be fast.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 56260 <at> debbugs.gnu.org and daanturo <daanturo <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 28 Jun 2022 12:44:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56260; Package emacs. (Tue, 28 Jun 2022 13:21:01 GMT) Full text and rfc822 format available.

Message #13 received at 56260 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 56260 <at> debbugs.gnu.org, daanturo <daanturo <at> gmail.com>
Subject: Re: bug#56260: 29.0.50; Provide a way to define shortdoc groups
 without loading shortdoc.el
Date: Tue, 28 Jun 2022 16:20:33 +0300
Lars Ingebrigtsen [2022-06-28 14:42 +0200] wrote:

> daanturo <daanturo <at> gmail.com> writes:
>
>> Currently to use `define-short-documentation-group`, we must first load
>> `shortdoc.el`, but loading it isn't exactly a cheap task: my startup is
>> slowed down by ~0.0186s.
>>
>> We can achieve this with an autoloaded progn:
>
> I've now done this in Emacs 29.  An alternative approach would be to
> move all the definitions of groups out of shortdoc.el into a different
> file so that loading shortdoc.el would be fast.

See also this thread that hypothesised about some alternative
approaches: https://lists.gnu.org/r/emacs-devel/2021-09/msg01719.html

Thanks,

-- 
Basil




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 27 Jul 2022 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 334 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.