emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#59684: closed (29.0.50; [PATCH] package.el: Insert news for installe


From: GNU bug Tracking System
Subject: bug#59684: closed (29.0.50; [PATCH] package.el: Insert news for installed packages only)
Date: Wed, 30 Nov 2022 19:55:02 +0000

Your message dated Wed, 30 Nov 2022 19:53:54 +0000
with message-id <87v8mww759.fsf@posteo.net>
and subject line Re: bug#59684: 29.0.50; [PATCH] package.el: Insert news for 
installed packages only
has caused the debbugs.gnu.org bug report #59684,
regarding 29.0.50; [PATCH] package.el: Insert news for installed packages only
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
59684: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59684
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 29.0.50; [PATCH] package.el: Insert news for installed packages only Date: Tue, 29 Nov 2022 18:54:44 +0200
Hi,

In some folder, e.g. "/tmp":
1. Create folder named "news"
2. emacs -Q
3. M-x list-packages
4. RET on any available not installed package

This will produce "Read error: Is a directory, /tmp/news" message.

In GNU Emacs 29.0.50
Repository revision: 2772ebe3667f28cefd0d6134204ce6a3c7a8c323
Repository branch: master

Adding news to package description was introuced in
dd98fedd0c7f27bfba046d761042c19181cb461d

Adding Philip to Cc as the author of the original commit.

Attached patch solves issue by checking that:
1. pkg-dir is not nil
2. pkg-dir is not 'builtin
3. "news" is a regular file

Attachment: 0001-Insert-news-for-installed-packages-only.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#59684: 29.0.50; [PATCH] package.el: Insert news for installed packages only Date: Wed, 30 Nov 2022 19:53:54 +0000
Andrii Kolomoiets <andreyk.mad@gmail.com> writes:

> Philip Kaludercic <philipk@posteo.net> writes:
>
>>>>> +                          ((file-regular-p file)))
>>>>
>>>> Shouldn't we keep `file-readable-p'?
>>>
>>> I think we should use `file-regular-p' so even if the pkg-dir will
>>> contain directory named "news" we will not try to insert it with
>>> `insert-file-contents'.
>>
>> I agree that `file-regular-p' is sensible, what I meant was using
>> `file-readable-p' in addition to that.  But I guess that all in all,
>> this is a rare circumstance...
>
> Oh, right.  Makes sense.  I've updated the patch.

Thanks, I've pushed the change.


--- End Message ---

reply via email to

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