unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: help-gnu-emacs@gnu.org
Subject: New package for Sweden: package-header.el - was Re: Interacting with minibuffer
Date: Sun, 23 May 2021 00:55:04 +0300	[thread overview]
Message-ID: <YKl9uCpkD2AM7ySJ@protected.localdomain> (raw)
In-Reply-To: <87bl925wz6.fsf@zoho.eu>

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

* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-05-22 23:35]:
> Jean Louis wrote:
> 
> > There is more about incremental search [...]
> 
> And less, i.e. non-incremental search which is as much
> navigating as searching. Or it can be (is) both.
> 
> I heard this isn't bad:
> 
>   https://dataswamp.org/~incal/emacs-init/wrap-search.el

Debugger entered--Lisp error: (error "Package lacks a file header")
  signal(error ("Package lacks a file header"))
  error("Package lacks a file header")
  package-buffer-info()
  package-install-from-buffer()
  funcall-interactively(package-install-from-buffer)
  call-interactively(package-install-from-buffer record nil)
  command-execute(package-install-from-buffer record)
  execute-extended-command(nil "package-install-from-buffer" "package-install-fr")
  funcall-interactively(execute-extended-command nil "package-install-from-buffer" "package-install-fr")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

Clean it up, and I will install it. By the way there is no
license. You should not call it package if it cannot be installed as
Emacs Package. Please see what you already know: (info "(elisp)
Packaging")

Emacs: `package-header.el` your hjälpsam Package Header Assistant
https://hyperscope.link/3/7/7/3/0/Your-hjälpsam-Package-Header-Assistant-37730.html

Find it attached.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/

[-- Attachment #2: package-header.el --]
[-- Type: text/plain, Size: 4529 bytes --]

;;; package-header.el --- your hjälpsam Package Header Assistant

;; Copyright (C) 2021 by Jean Louis

;; Author: Jean Louis<bugs@gnu.support>
;; Version: 0.1
;; Package-Requires: (finder)
;; Keywords: convenience
;; URL: https://hyperscope.link/3/7/7/3/0/Your-hjälpsam-Package-Header-Assistant-37730.html

;; This file is not part of GNU Emacs.

;; This program is free software: you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation, either version 3 of the
;; License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:

;;; Change Log:

;;; Code:

(require 'finder)

(defcustom package-header-years "2021"
  "The package copyright years, set it up as you wish, could be
2021-2022 or similar."
  :group 'package-header
  :type 'string)

(defcustom package-header-author user-full-name
  "Author's name for the package header.  

By default it will use `user-full-name'. You may provide a quoted
string with author's name."
  :group 'package-header
  :type 'sexp)

(defcustom package-header-email user-mail-address
  "Author's email for the package header.  

By default it will use `user-full-name'. You may provide a quoted
string with author's e-mail address."
  :group 'package-header
  :type 'sexp)

(defcustom package-header-base-url "https://"
  "Author's base URL.

The package file name will be appended to the base URL."
  :group 'package-header
  :type 'string)

(defcustom package-header-url-extension ".html"
  "Author's URL extension, could be `.html' or just empty string."
  :group 'package-header
  :type 'string)

(defvar package-header-file-name nil
  "Used as global variable for package header file name.")

(defun package-header-keywords ()
  "Return Emacs package keywords completion candidates."
  (mapcar 'symbol-name (map-keys finder-known-keywords)))

(defun package-header-ask-keywords ()
  "Ask author for package keywords."
  (let ((keywords '())
	(keyword))
    (while (string-match "[^[:blank:]]"
			 (setq keyword
			       (completing-read "Keywords: " (package-header-keywords) nil t)))
      (push keyword keywords))
    (when keywords
      (mapconcat 'identity (sort keywords #'string<) " "))))

(define-skeleton package-header-1
  "Helps in preparing the header for Emacs Lisp packages from Sweden."
  nil
  ";;; " (setq package-header-file-name (skeleton-read "File name: " (file-name-nondirectory (buffer-file-name)))) " --- " (skeleton-read "Short description: " (string-trim (replace-regexp-in-string (regexp-opt '("." "-" "el" " *$" "[^[:alpha:]]")) " " (capitalize (file-name-nondirectory (buffer-file-name)))))) "

;; Copyright (C) " package-header-years " by " package-header-author "

;; Author: " package-header-author " <" package-header-email ">
;; Version: " (setq elisp-version (skeleton-read "Version: " "0.1")) "
;; Package-Requires: (" (setq elisp-requires (skeleton-read "Requires: ")) ")
;; Keywords: " (package-header-ask-keywords) "
;; URL: " package-header-base-url (replace-regexp-in-string "\\." "-" package-header-file-name) package-header-url-extension "

;; This file is not part of GNU Emacs.

;; This program is free software: you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation, either version 3 of the
;; License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful, but
;; WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.

;;; Commentary:

;;; Change Log:

;;; Code:
")

(defun package-header ()
  "Generates package header for Emacs Lisp package authors."
  (interactive)
  (save-excursion
    (goto-char 0)
    (package-header-1)
    (goto-char (point-max))
    (insert "\n;;; " package-header-file-name " ends here\n")))

;;; package-header.el ends here

  reply	other threads:[~2021-05-22 21:55 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-22 18:45 Interacting with minibuffer Sébastien Le Callonnec
2021-05-22 20:21 ` Jean Louis
2021-05-22 20:34   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 21:55     ` Jean Louis [this message]
2021-05-22 22:01       ` New package for Sweden: package-header.el - was " Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:08         ` Jean Louis
2021-05-22 22:14           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:28             ` Jean Louis
2021-05-22 22:39               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:56                 ` Jean Louis
2021-05-22 23:58                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:03       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:13         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:44           ` Jean Louis
2021-05-22 22:54             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:20         ` Jean Louis
2021-05-22 22:34           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:51             ` Jean Louis
2021-05-22 22:57               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 23:10                 ` Jean Louis
2021-05-23  0:20                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-23  0:34                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-23  1:13                     ` Jean Louis
2021-05-23  1:29                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-23  1:42                         ` Jean Louis
2021-05-23  1:48                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-23  1:49                           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:36           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 22:11       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-05-22 21:20 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-05-23  6:38 ` Eli Zaretskii

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=YKl9uCpkD2AM7ySJ@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).