unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Glenn Morris <rgm@gnu.org>
Cc: 26490@debbugs.gnu.org, Steve Purcell <steve@sanityinc.com>
Subject: bug#26490: 25.1; package-buffer-info is incorrectly case-insensitive
Date: Sat, 24 Aug 2019 07:57:06 +0200	[thread overview]
Message-ID: <CADwFkmkzmmO03X5kq2VePyWGy+Qbm7_rh6x_1kLanwWAP_PKjw@mail.gmail.com> (raw)
In-Reply-To: <m260i7q0sg.fsf@sanityinc.com>

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

Glenn Morris <rgm@gnu.org> writes:

> Why does it care at all?
> I thought the "filename ends here" was an ancient way of identifying
> files that might have been truncated in transit. It doesn't seem
> relevant in this day and age.

I agree; this is an ancient ritual from times long past.  I suggest
that we get rid of this requirement to consider a package valid.

I think this requirement, while not the most important thing in the
world, just looks Very Old (TM) to new developers looking to get
started in Emacs Lisp.  And since it indeed hardly plays an important
role anymore, we have little to lose by getting rid of it, AFAIU.

Steve Purcell <steve@sanityinc.com> writes:

> Nonetheless, it has been part of the format expected by package.el for years.
>
> Making package.el more permissive over time can lead to problems with packages
> in older Emacsen, a prime example being the recently-added
> backwards-incompatible support for version-less dependencies in the
> `Package-Requires` header: authors check their packages in a recent Emacs and
> then find that an older otherwise-compatible Emacs can’t even parse their
> package metadata.

Sure, that can be a problem.  I think that means that we should not
(yet) encourage package developers to not use them in their packages.
But if we don't take a first step, we can never get rid of it.

At the end of the day, it's the job of package developers to maintain
backwards compatibility.  I don't see why this change would be any
different in that respect from the many other changes that we make
between releases.

I have attached a tentative patch to remove this requirement from
package.el.  Comments are more than welcome.

Thanks,
Stefan Kangas

[-- Attachment #2: 0001-Don-t-require-ending-comment-to-consider-a-package-v.patch --]
[-- Type: application/octet-stream, Size: 1154 bytes --]

From b1ba2477be985595bf27a569087fabc3bdba158d Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Sat, 24 Aug 2019 07:44:00 +0200
Subject: [PATCH] Don't require ending comment to consider a package valid

* lisp/emacs-lisp/package.el (package-buffer-info): Don't require
the ending comment ";;; foo-package.el ends here".  (Bug#26490)
---
 lisp/emacs-lisp/package.el | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index cd127e1a8e..c6a3f30452 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1045,10 +1045,6 @@ package-buffer-info
   (let ((file-name (match-string-no-properties 1))
         (desc      (match-string-no-properties 2))
         (start     (line-beginning-position)))
-    ;; The terminating comment format could be extended to accept a
-    ;; generic string that is not in English.
-    (unless (search-forward (concat ";;; " file-name ".el ends here"))
-      (error "Package lacks a terminating comment"))
     ;; Try to include a trailing newline.
     (forward-line)
     (narrow-to-region start (point))
-- 
2.22.0


  parent reply	other threads:[~2019-08-24  5:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-14  0:44 bug#26490: 25.1; package-buffer-info is incorrectly case-insensitive Steve Purcell
2017-04-14  7:31 ` Eli Zaretskii
2017-04-14  9:12   ` Steve Purcell
2017-04-14 20:29 ` Glenn Morris
2017-04-14 23:02   ` Steve Purcell
2019-08-24  5:57 ` Stefan Kangas [this message]
2019-08-24  6:35   ` Steve Purcell
2019-09-28 10:55     ` Stefan Kangas
2019-10-01 23:54       ` Basil L. Contovounesios
2019-10-04 12:48         ` Stefan Kangas
2019-10-20 14:16       ` Stefan Kangas
2019-10-21 16:05         ` Stefan Monnier
2019-11-02  0:31           ` Stefan Kangas

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=CADwFkmkzmmO03X5kq2VePyWGy+Qbm7_rh6x_1kLanwWAP_PKjw@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=26490@debbugs.gnu.org \
    --cc=rgm@gnu.org \
    --cc=steve@sanityinc.com \
    /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).