diff options
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | debian/README.source | 23 | ||||
-rw-r--r-- | debian/changelog | 52 | ||||
-rw-r--r-- | debian/control | 42 | ||||
-rw-r--r-- | debian/dirs | 1 | ||||
-rw-r--r-- | debian/emacs-snapshot.sh | 3 | ||||
-rwxr-xr-x | debian/install | 3 | ||||
-rw-r--r-- | debian/links | 1 | ||||
-rwxr-xr-x | debian/merge-snapshot | 32 | ||||
-rwxr-xr-x | debian/postinst | 7 | ||||
-rwxr-xr-x | debian/prerm | 7 | ||||
-rwxr-xr-x | debian/rules | 22 | ||||
-rw-r--r-- | debian/source/format | 1 | ||||
-rw-r--r-- | debian/source/patch-header | 8 | ||||
-rw-r--r-- | lisp/emacs-lisp/package.el | 1 | ||||
-rw-r--r-- | lisp/org/ol-notmuch.el | 154 | ||||
-rw-r--r-- | lisp/org/org-checklist.el | 141 | ||||
-rw-r--r-- | lisp/startup.el | 3 |
18 files changed, 505 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore index fcbc9cd7f46..7539e152ba4 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,11 @@ # in Git 1.8.2 (March 2013). +# Debian packaging +config.guess +config.sub +debian/emacs-snapshot/ + # Personal customization. .dir-locals-2.el diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 00000000000..1100be87578 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,23 @@ +athena/unstable branch merges only from upstream emacs.git#master, and then is +only tagged and uploaded to athena after running locally for a day or so to +confirm that nothing obvious is broken. Build with 'dgit sbuild -d CODENAME +to get something to test, and then use rebuild-for-athena to build, tag and +upload. + +athena/CODENAME-bpo: backported from athena/unstable, automatically updated by +rebuild-for-athena when preparing the version of athena/unstable to upload to +athena as described above. + +tmp/HOSTNAME: short-lived branch to test out patches/series not in upstream +master by running Emacs with those patches on my main laptop during regular +Emacs usage. Not pushed anywhere. When want to do this, create branch +starting from athena/unstable, merge/apply the series, dch, build and install +the .deb, restart Emacs. + +To test running Emacs with patches/series not in upstream master without +affecting my regular environment -- typically because I want to do some +particular testing of them which takes just a few minutes -- make a temporary +branch based on upstream master (not athena/unstable), build, and run the copy +of the just-built in-tree copy of Emacs. + + -- Sean Whitton <spwhitton@spwhitton.name>, Tue, 2 Feb 2021 16:00:14 -0700 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000000..52f5aa356f7 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,52 @@ +emacs-snapshot (28~git20210208.1) unstable; urgency=medium + + * Package git snapshot. + + -- Sean Whitton <spwhitton@spwhitton.name> Thu, 11 Feb 2021 18:51:35 -0700 + +emacs-snapshot (28~git20210131.1) unstable; urgency=medium + + * Package git snapshot. + + -- Sean Whitton <spwhitton@spwhitton.name> Mon, 01 Feb 2021 17:20:13 -0700 + +emacs-snapshot (28~git20210119.1) unstable; urgency=medium + + * Package git snapshot. + * Temporarily include org-checklist.el and ol-notmuch.el from Org-mode's + 9.4.4 release. + Debian's Org-mode package fails to bytecompile against Emacs 28 atm, + so rely on the version of Org bundled with Emacs, plus these two + contrib files. + + -- Sean Whitton <spwhitton@spwhitton.name> Thu, 21 Jan 2021 18:44:32 -0700 + +emacs-snapshot (28~git20201101.1) unstable; urgency=medium + + * Package git snapshot. + + -- Sean Whitton <spwhitton@spwhitton.name> Sat, 28 Nov 2020 19:13:41 -0700 + +emacs-snapshot (28~git20200906.1) unstable; urgency=medium + + * Package git snapshot. + + -- Sean Whitton <spwhitton@spwhitton.name> Sun, 13 Sep 2020 14:36:27 -0700 + +emacs-snapshot (28~git20200820.1) unstable; urgency=medium + + * Package git snapshot. + + -- Sean Whitton <spwhitton@spwhitton.name> Fri, 21 Aug 2020 15:37:38 -0700 + +emacs-snapshot (28~git20200806.1) unstable; urgency=medium + + * Package git snapshot. + + -- Sean Whitton <spwhitton@spwhitton.name> Thu, 06 Aug 2020 16:35:04 -0700 + +emacs-snapshot (28~git20200726.1) unstable; urgency=medium + + * Package git snapshot. + + -- Sean Whitton <spwhitton@spwhitton.name> Wed, 05 Aug 2020 16:42:49 -0700 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000000..15b47f04c45 --- /dev/null +++ b/debian/control @@ -0,0 +1,42 @@ +Source: emacs-snapshot +Section: editors +Priority: optional +Maintainer: Sean Whitton <spwhitton@spwhitton.name> +Build-Depends: + autoconf, + automake, + bsd-mailx | mailx, + dbus-x11, + debhelper-compat (= 12), + dh-exec, + gnupg-agent, + imagemagick, + libacl1-dev, + libasound2-dev, + libdbus-1-dev, + libgif-dev, + libgnutls28-dev, + libgpm-dev, + libjpeg-dev, + liblockfile-dev, + libm17n-dev, + libmagick++-6.q16-dev, + libncurses5-dev, + libotf-dev, + libpng-dev, + librsvg2-dev, + libselinux1-dev, + libsystemd-dev, + libtiff-dev, + libxaw7-dev, + libxml2-dev, + procps, + sharutils, + texinfo, + xaw3dg-dev, + zlib1g-dev, + +Package: emacs-snapshot +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Emacs git snapshot diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 00000000000..057f2009f6c --- /dev/null +++ b/debian/dirs @@ -0,0 +1 @@ +/usr/share/emacs-snapshot/site-lisp/elpa diff --git a/debian/emacs-snapshot.sh b/debian/emacs-snapshot.sh new file mode 100644 index 00000000000..12c67a4a44a --- /dev/null +++ b/debian/emacs-snapshot.sh @@ -0,0 +1,3 @@ +if [ "`id -u`" -ne 0 ]; then + PATH=/opt/emacs-snapshot/bin:$PATH +fi diff --git a/debian/install b/debian/install new file mode 100755 index 00000000000..f54a4f644b4 --- /dev/null +++ b/debian/install @@ -0,0 +1,3 @@ +#!/usr/bin/dh-exec +debian/emacs-snapshot.sh => /etc/profile.d/emacs-snapshot.sh +debian/emacs-snapshot.sh => /etc/X11/Xsession.d/01emacs-snapshot diff --git a/debian/links b/debian/links new file mode 100644 index 00000000000..12be0815e45 --- /dev/null +++ b/debian/links @@ -0,0 +1 @@ +/opt/emacs-snapshot/bin/emacs /usr/bin/emacs-snapshot diff --git a/debian/merge-snapshot b/debian/merge-snapshot new file mode 100755 index 00000000000..94242babedf --- /dev/null +++ b/debian/merge-snapshot @@ -0,0 +1,32 @@ +#!/usr/bin/perl + +# after running this script and installing and testing the package, +# can use rebuild-for-athena script + +use 5.028; +use strict; +use warnings; + +use Cwd; +use Git::Wrapper; + +my $to_merge = "origin/master"; + +my $git = Git::Wrapper->new(getcwd); + +chomp(my $prev_version = `dpkg-parsechangelog -SVersion`); +chomp(my $prev_distn = `dpkg-parsechangelog -SDistribution`); + +my ($prev_date, $prev_rev) = ($prev_version =~ /git([0-9]+).([0-9]+)/); +my ($new_date) = $git->show("-s", { format => "%ci" }, $to_merge); +$new_date =~ /\A([0-9]{4})-([0-9]{2})-([0-9]{2})/ + or die "couldn't parse new commit committer date"; +$new_date = $1 . $2 . $3; +my $new_rev = $prev_date eq $new_date ? $prev_rev + 1 : 1; + +$git->merge($to_merge); + +system "dch", "-v28~git${new_date}.${new_rev}", + $prev_distn eq "UNRELEASED" ? "" : "Package git snapshot."; +$git->add("debian/changelog"); +$git->commit({ message => "changelog" }); diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 00000000000..6e1fde4934b --- /dev/null +++ b/debian/postinst @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +/usr/lib/emacsen-common/emacs-install emacs-snapshot + +#DEBHELPER# diff --git a/debian/prerm b/debian/prerm new file mode 100755 index 00000000000..e72305bba57 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +/usr/lib/emacsen-common/emacs-remove emacs-snapshot + +#DEBHELPER# diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000000..ecfccf56312 --- /dev/null +++ b/debian/rules @@ -0,0 +1,22 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_update_autotools_config: + cp -a /usr/share/misc/config.guess /usr/share/misc/config.sub . + +override_dh_autoreconf: + ./autogen.sh + +override_dh_auto_configure: + ./configure --prefix=/opt/emacs-snapshot --with-x-toolkit=lucid + +override_dh_shlibdeps: + dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info + +# ensure .elc files are newer than their counterparts to prevent +# recursive load errors with jka-compr.el (see #803462) +override_dh_strip_nondeterminism: + +override_dh_auto_test: diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000000..89ae9db8f88 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/debian/source/patch-header b/debian/source/patch-header new file mode 100644 index 00000000000..69436f69f1c --- /dev/null +++ b/debian/source/patch-header @@ -0,0 +1,8 @@ +The Debian packaging of emacs-snapshot is maintained in git, using the +merging workflow described in dgit-maint-merge(7). There isn't a +patch queue that can be represented as a quilt series. + +A detailed breakdown of the changes is available from their canonical +representation - git commits in the packaging repository. + +A single combined diff, containing all the changes, follows. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 617e941dba5..9ed23862e92 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -311,6 +311,7 @@ packages in `package-directory-list'." (and (stringp f) (equal (file-name-nondirectory f) "site-lisp") (push (expand-file-name "elpa" f) result))) + (push "/usr/share/emacs-snapshot/site-lisp/elpa" result) (nreverse result)) "List of additional directories containing Emacs Lisp packages. Each directory name should be absolute. diff --git a/lisp/org/ol-notmuch.el b/lisp/org/ol-notmuch.el new file mode 100644 index 00000000000..0fa0c5a2cbc --- /dev/null +++ b/lisp/org/ol-notmuch.el @@ -0,0 +1,154 @@ +;;; ol-notmuch.el --- Links to notmuch messages + +;; Copyright (C) 2010-2014 Matthieu Lemerre + +;; Author: Matthieu Lemerre <racin@free.fr> +;; Keywords: outlines, hypermedia, calendar, wp +;; Homepage: https://orgmode.org + +;; This file is not part of GNU Emacs. + +;; This file 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 2, or (at your option) +;; any later version. + +;; This file 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This file implements links to notmuch messages and "searches". A +;; search is a query to be performed by notmuch; it is the equivalent +;; to folders in other mail clients. Similarly, mails are referred to +;; by a query, so both a link can refer to several mails. + +;; Links have one the following form +;; notmuch:<search terms> +;; notmuch-search:<search terms>. + +;; The first form open the queries in notmuch-show mode, whereas the +;; second link open it in notmuch-search mode. Note that queries are +;; performed at the time the link is opened, and the result may be +;; different from when the link was stored. + +;;; Code: + +(require 'ol) + +;; customisable notmuch open functions +(defcustom org-notmuch-open-function + 'org-notmuch-follow-link + "Function used to follow notmuch links. + +Should accept a notmuch search string as the sole argument." + :group 'org-notmuch + :version "24.4" + :package-version '(Org . "8.0") + :type 'function) + +(defcustom org-notmuch-search-open-function + 'org-notmuch-search-follow-link + "Function used to follow notmuch-search links. +Should accept a notmuch search string as the sole argument." + :group 'org-notmuch + :version "24.4" + :package-version '(Org . "8.0") + :type 'function) + +(make-obsolete-variable 'org-notmuch-search-open-function nil "9.3") + + + +;; Install the link type +(org-link-set-parameters "notmuch" + :follow #'org-notmuch-open + :store #'org-notmuch-store-link) + +(defun org-notmuch-store-link () + "Store a link to a notmuch search or message." + (when (memq major-mode '(notmuch-show-mode notmuch-tree-mode)) + (let* ((message-id (notmuch-show-get-message-id t)) + (subject (notmuch-show-get-subject)) + (to (notmuch-show-get-to)) + (from (notmuch-show-get-from)) + (date (org-trim (notmuch-show-get-date))) + desc link) + (org-link-store-props :type "notmuch" :from from :to to :date date + :subject subject :message-id message-id) + (setq desc (org-link-email-description)) + (setq link (concat "notmuch:id:" message-id)) + (org-link-add-props :link link :description desc) + link))) + +(defun org-notmuch-open (path _) + "Follow a notmuch message link specified by PATH." + (funcall org-notmuch-open-function path)) + +(defun org-notmuch-follow-link (search) + "Follow a notmuch link to SEARCH. + +Can link to more than one message, if so all matching messages are shown." + (require 'notmuch) + (notmuch-show search)) + + + +(org-link-set-parameters "notmuch-search" + :follow #'org-notmuch-search-open + :store #'org-notmuch-search-store-link) + +(defun org-notmuch-search-store-link () + "Store a link to a notmuch search or message." + (when (eq major-mode 'notmuch-search-mode) + (let ((link (concat "notmuch-search:" notmuch-search-query-string)) + (desc (concat "Notmuch search: " notmuch-search-query-string))) + (org-link-store-props :type "notmuch-search" + :link link + :description desc) + link))) + +(defun org-notmuch-search-open (path _) + "Follow a notmuch message link specified by PATH." + (message "%s" path) + (org-notmuch-search-follow-link path)) + +(defun org-notmuch-search-follow-link (search) + "Follow a notmuch link by displaying SEARCH in notmuch-search mode." + (require 'notmuch) + (notmuch-search search)) + + + +(org-link-set-parameters "notmuch-tree" + :follow #'org-notmuch-tree-open + :store #'org-notmuch-tree-store-link) + +(defun org-notmuch-tree-store-link () + "Store a link to a notmuch search or message." + (when (eq major-mode 'notmuch-tree-mode) + (let ((link (concat "notmuch-tree:" (notmuch-tree-get-query))) + (desc (concat "Notmuch tree: " (notmuch-tree-get-query)))) + (org-link-store-props :type "notmuch-tree" + :link link + :description desc) + link))) + +(defun org-notmuch-tree-open (path _) + "Follow a notmuch message link specified by PATH." + (message "%s" path) + (org-notmuch-tree-follow-link path)) + +(defun org-notmuch-tree-follow-link (search) + "Follow a notmuch link by displaying SEARCH in notmuch-tree mode." + (require 'notmuch) + (notmuch-tree search)) + +(provide 'ol-notmuch) + +;;; ol-notmuch.el ends here diff --git a/lisp/org/org-checklist.el b/lisp/org/org-checklist.el new file mode 100644 index 00000000000..2bc00c0b9d1 --- /dev/null +++ b/lisp/org/org-checklist.el @@ -0,0 +1,141 @@ +;;; org-checklist.el --- org functions for checklist handling + +;; Copyright (C) 2008-2014 James TD Smith + +;; Author: James TD Smith (@ ahktenzero (. mohorovi cc)) +;; Version: 1.0 +;; Keywords: org, checklists +;; +;; 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, 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; This file provides some functions for handing repeated tasks which involve +;; checking off a list of items. By setting the RESET_CHECK_BOXES property in an +;; item, when the TODO state is set to done all checkboxes under that item are +;; cleared. If the LIST_EXPORT_BASENAME property is set, a file will be created +;; using the value of that property plus a timestamp, containing all the items +;; in the list which are not checked. Additionally the user will be prompted to +;; print the list. +;; +;; I use this for to keep track of stores of various things (food stores, +;; components etc) which I check periodically and use the exported list of items +;; which are not present as a shopping list. +;; +;;; Usage: +;; (require 'org-checklist) +;; +;; Set the RESET_CHECK_BOXES and LIST_EXPORT_BASENAME properties in items as +;; needed. +;; +;;; Code: +(require 'org) +(load "a2ps-print" 'no-error) + +(setq org-default-properties (cons "RESET_CHECK_BOXES" (cons "LIST_EXPORT_BASENAME" org-default-properties))) + +(defgroup org-checklist nil + "Extended checklist handling for org" + :tag "Org-checklist" + :group 'org) + +(defcustom org-checklist-export-time-format "%Y%m%d%H%M" + "The format of timestamp appended to LIST_EXPORT_BASENAME to + make the name of the export file." + :link '(function-link format-time-string) + :group 'org-checklist + :type 'string) + +(defcustom org-checklist-export-function 'org-export-as-ascii + "function used to prepare the export file for printing" + :group 'org-checklist + :type '(radio (function-item :tag "ascii text" org-export-as-ascii) + (function-item :tag "HTML" org-export-as-html) + (function-item :tag "LaTeX" :value org-export-as-latex) + (function-item :tag "XOXO" :value org-export-as-xoxo))) + +(defcustom org-checklist-export-params nil + "options for the export function file for printing" + :group 'org-checklist + :type '(repeat string)) + +(defcustom org-checklist-a2ps-params nil + "options for a2ps for printing" + :group 'org-checklist + :type '(repeat string)) + +(defun org-reset-checkbox-state-maybe () + "Reset all checkboxes in an entry if the `RESET_CHECK_BOXES' property is set" + (interactive "*") + (if (org-entry-get (point) "RESET_CHECK_BOXES") + (org-reset-checkbox-state-subtree))) + + +(defun org-make-checklist-export () + "Produce a checklist containing all unchecked items from a list +of checkbox items" + (interactive "*") + (if (org-entry-get (point) "LIST_EXPORT_BASENAME") + (let* ((export-file (concat (org-entry-get (point) "LIST_EXPORT_BASENAME" nil) + "-" (format-time-string + org-checklist-export-time-format) + ".org")) + (print (case (org-entry-get (point) "PRINT_EXPORT" nil) + (("" "nil" nil) nil) + (t t) + (nil (y-or-n-p "Print list? ")))) + exported-lines + (title "Checklist export")) + (save-restriction + (save-excursion + (org-narrow-to-subtree) + (org-update-checkbox-count-maybe) + (org-show-subtree) + (goto-char (point-min)) + (when (looking-at org-complex-heading-regexp) + (setq title (match-string 4))) + (goto-char (point-min)) + (let ((end (point-max))) + (while (< (point) end) + (when (and (org-at-item-checkbox-p) + (or (string= (match-string 0) "[ ]") + (string= (match-string 0) "[-]"))) + (add-to-list 'exported-lines (thing-at-point 'line) t)) + (beginning-of-line 2))) + (set-buffer (get-buffer-create export-file)) + (org-insert-heading) + (insert (or title export-file) "\n") + (dolist (entry exported-lines) (insert entry)) + (org-update-checkbox-count-maybe) + (write-file export-file) + (if (print) + (progn (funcall org-checklist-export-function + org-checklist-export-params) + (let* ((current-a2ps-switches a2ps-switches) + (a2ps-switches (append current-a2ps-switches + org-checklist-a2ps-params))) + (a2ps-buffer))))))))) + +(defun org-checklist () + (when (member org-state org-done-keywords) ;; org-state dynamically bound in org.el/org-todo + (org-make-checklist-export) + (org-reset-checkbox-state-maybe))) + +(add-hook 'org-after-todo-state-change-hook 'org-checklist) + +(provide 'org-checklist) + +;;; org-checklist.el ends here diff --git a/lisp/startup.el b/lisp/startup.el index 58030ca06af..f20c61bdfed 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1360,7 +1360,8 @@ please check its value") ;; be loaded from site-run-file and wants to test if -q was given ;; should check init-file-user instead, since that is already set. ;; See cus-edit.el for an example. - (if site-run-file + (when site-run-file + (load "/etc/emacs/site-start.d/00debian.el") ;; Sites should not disable the startup screen. ;; Only individuals should disable the startup screen. (let ((inhibit-startup-screen inhibit-startup-screen)) |