I'm playing around with developing and publishing an Emacs package, very simple stuff, just trying things out before I commit to a bigger project. The problem that I'm having is that after I've made a MELPA package (as per this tutorial) and try the
package-install-file command I'm greeted with the "Package lacks a file header" error message, even though as far as I can see my package contains all of the required header information (as you can see here). My source file looks like this:
;;; header-tracker.el --- Easy switching between header and source files. ;; Copyright (C) 2019 Nathan Campos ;; Author: Nathan Campos <firstname.lastname@example.org> ;; Homepage: http://github.com/nathanpc/header-tracker.el ;; Version: 1.0.0 ;; Keywords: convenience, usability ;; Package-Requires: ((emacs "24.1")) ;; This file is NOT part of GNU Emacs. ;;; License: ;; 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: ;; Quickly and easily keep track and switch between header and source files ;; using this handy package. ;; This package exports a interactive function `header-tracker-toggle-header` ;; which can be binded to a key to seamlessly switch between source and header ;; files. This can be accomplished by adding the following lines to your ;; configuration file: ;; (add-hook 'c-mode-common-hook ;; (lambda () ;; (local-set-key (kbd "C-c h") 'header-tracker-toggle-header))) ;; For more information about this package please consult the README file. ;;; Code: ;; Some code here... (provide 'header-tracker) ;;; header-tracker.el ends here
Also, when I run
(package-buffer-info) in the source buffer this is what I get in return, so apparently the header is valid:
(package-desc header-tracker (1 0 0) "Easy switching between header and source files." ((emacs (24 1))) single nil nil ((:authors ("Nathan Campos" . "email@example.com")) (:maintainer "Nathan Campos" . "firstname.lastname@example.org") (:url . "http://github.com/nathanpc/header-tracker.el")) nil)
Buffer comments and tags: Ok Documentation style: Ok Message/Query text style: Ok Unwanted Spaces: Ok
Another interesting thing that is happening is that if I run
package-install-from-buffer in my package (not in the MELPA fork) it installs without any issues.
How can I debug this error since apparently it doesn't give any indication of what made it happen in the first place.