From a016453a950c53c9b7f5bcdafb8209292601b1cd Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Fri, 9 Jun 2023 10:40:32 +0200 Subject: gnu: Make emacs-next-tree-sitter the new emacs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/emacs-source-date-epoch.patch: Delete file * gnu/local.mk (dist_patch_DATA): Remove it from here. * gnu/packages/emacs.scm (emacs): Update to 29.0.91. [source]: Remove “emacs-source-date-epoch.patch”. Add “emacs-pgtk-super-key-fix.patch”. [arguments]: Use “--with-native-compilation=aot” instead of #:make-flags. [inputs]: Add sqlite and tree-sitter. (emacs-next-pgtk): Rename to… (emacs-pgtk): … this. (emacs-next-pgtk-xwidgets): Rename to… (emacs-pgtk-xwidgets): … this. (emacs-minimal)[native-inputs]: Add texinfo. (emacs-xwidgets): Inherit build system, configure-flags and phases normally. (emacs-next, emacs-next-tree-sitter): Remove variables. --- gnu/local.mk | 1 - gnu/packages/emacs.scm | 101 ++++++--------------- gnu/packages/patches/emacs-source-date-epoch.patch | 20 ---- 3 files changed, 27 insertions(+), 95 deletions(-) delete mode 100644 gnu/packages/patches/emacs-source-date-epoch.patch (limited to 'gnu') diff --git a/gnu/local.mk b/gnu/local.mk index ce16d37e2b..057903d10f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1090,7 +1090,6 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-native-comp-driver-options.patch \ %D%/packages/patches/emacs-pasp-mode-quote-file-names.patch \ %D%/packages/patches/emacs-polymode-fix-lexical-variable-error.patch \ - %D%/packages/patches/emacs-source-date-epoch.patch \ %D%/packages/patches/emacs-telega-path-placeholder.patch \ %D%/packages/patches/emacs-telega-test-env.patch \ %D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \ diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 7831a24922..a6b883aaa2 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -97,17 +97,23 @@ (define (%emacs-modules build-system) (define-public emacs (package (name "emacs") - (version "28.2") + (version "29.0.91") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/emacs/emacs-" - version ".tar.xz")) + ;; TODO: Restore url-fetch when serving 29.1 + ;; (method url-fetch) + ;; (uri (string-append "mirror://gnu/emacs/emacs-" + ;; version ".tar.xz")) + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/emacs.git/") + (commit (string-append "emacs-" version)))) (sha256 (base32 - "12144dcaihv2ymfm7g2vnvdl4h71hqnsz1mljzf34cpg6ci1h8gf")) + "09jm1q5pvd1dc0xq5rhn66v1j235zlr72kwv5i27xigvi9nfqkv1")) (patches (search-patches "emacs-exec-path.patch" "emacs-fix-scheme-indent-function.patch" - "emacs-source-date-epoch.patch")) + "emacs-native-comp-driver-options.patch" + "emacs-pgtk-super-key-fix.patch")) (modules '((guix build utils))) (snippet '(with-directory-excursion "lisp" @@ -145,9 +151,8 @@ (define-public emacs #:modules (%emacs-modules build-system) #:configure-flags #~(list "--with-modules" "--with-cairo" - "--with-native-compilation" + "--with-native-compilation=aot" "--disable-build-details") - #:make-flags #~(list "NATIVE_FULL_AOT=1") #:phases #~(modify-phases %standard-phases (add-after 'set-paths 'set-libgccjit-path @@ -340,6 +345,8 @@ (define* (emacs-byte-compile-directory dir) ghostscript poppler elogind + sqlite + tree-sitter ;; When looking for libpng `configure' links with `-lpng -lz', so we ;; must also provide zlib as an input. @@ -368,11 +375,6 @@ (define* (emacs-byte-compile-directory dir) (search-path-specification (variable "INFOPATH") (files '("share/info"))) - ;; tree-sitter support is not yet available in emacs 28, but this - ;; search path won't harm and also will be beneficial for - ;; emacs-next and other emacs-* packages, which have tree-sitter - ;; support enabled. Please, remove this comment, when emacs - ;; package is updated to 29. (search-path-specification (variable "TREE_SITTER_GRAMMAR_PATH") (files '("lib/tree-sitter"))))) @@ -390,72 +392,29 @@ (define* (emacs-byte-compile-directory dir) languages.") (license license:gpl3+))) -(define-public emacs-next +(define-public emacs-pgtk (package (inherit emacs) - (name "emacs-next") - (version "29.0.91") - (source - (origin - (inherit (package-source emacs)) - (method git-fetch) - (uri (git-reference - (url "https://git.savannah.gnu.org/git/emacs.git/") - (commit (string-append "emacs-" version)))) - (file-name (git-file-name name version)) - ;; emacs-source-date-epoch.patch is no longer necessary - (patches (search-patches "emacs-exec-path.patch" - "emacs-fix-scheme-indent-function.patch" - "emacs-native-comp-driver-options.patch")) - (sha256 - (base32 - "09jm1q5pvd1dc0xq5rhn66v1j235zlr72kwv5i27xigvi9nfqkv1")))) - (inputs - (modify-inputs (package-inputs emacs) - (prepend sqlite))) - (native-inputs - (modify-inputs (package-native-inputs emacs) - (prepend autoconf))))) - -(define-public emacs-next-tree-sitter - (package - (inherit emacs-next) - (name "emacs-next-tree-sitter") - (inputs - (modify-inputs (package-inputs emacs-next) - (prepend sqlite tree-sitter))) - (synopsis "Emacs text editor with @code{tree-sitter} support") - (description "This Emacs build supports tree-sitter."))) - -(define-public emacs-next-pgtk - (package - (inherit emacs-next-tree-sitter) - (name "emacs-next-pgtk") - (source - (origin - (inherit (package-source emacs-next-tree-sitter)) - (patches - (append (search-patches "emacs-pgtk-super-key-fix.patch") - (origin-patches (package-source emacs-next-tree-sitter)))))) + (name "emacs-pgtk") (arguments - (substitute-keyword-arguments (package-arguments emacs-next-tree-sitter) + (substitute-keyword-arguments (package-arguments emacs) ((#:configure-flags flags #~'()) #~(cons* "--with-pgtk" #$flags)))) - (synopsis "Emacs text editor with @code{pgtk} and @code{tree-sitter} support") + (synopsis "Emacs text editor with @code{pgtk} frames") (description "This Emacs build implements graphical UI purely in terms -of GTK and supports tree-sitter."))) +of GTK."))) -(define-public emacs-next-pgtk-xwidgets +(define-public emacs-pgtk-xwidgets (package - (inherit emacs-next-pgtk) - (name "emacs-next-pgtk-xwidgets") + (inherit emacs-pgtk) + (name "emacs-pgtk-xwidgets") (synopsis "Emacs text editor with @code{xwidgets} and @code{pgtk} support") (arguments - (substitute-keyword-arguments (package-arguments emacs-next-pgtk) + (substitute-keyword-arguments (package-arguments emacs-pgtk) ((#:configure-flags flags #~'()) #~(cons "--with-xwidgets" #$flags)))) (inputs - (modify-inputs (package-inputs emacs-next-pgtk) + (modify-inputs (package-inputs emacs-pgtk) (prepend gsettings-desktop-schemas webkitgtk-with-libsoup2))))) (define-public emacs-minimal @@ -477,23 +436,17 @@ (define-public emacs-minimal (delete 'restore-emacs-pdmp) (delete 'strip-double-wrap))))) (inputs (list ncurses coreutils gzip)) - (native-inputs (list autoconf pkg-config)))) + (native-inputs (list autoconf pkg-config texinfo)))) (define-public emacs-xwidgets (package/inherit emacs (name "emacs-xwidgets") (synopsis "The extensible, customizable, self-documenting text editor (with xwidgets support)") - (build-system gnu-build-system) (arguments (substitute-keyword-arguments (package-arguments emacs) ((#:configure-flags flags #~'()) - #~(cons "--with-xwidgets" #$flags)) - ((#:modules _) (%emacs-modules build-system)) - ((#:phases phases) - #~(modify-phases #$phases - (delete 'restore-emacs-pdmp) - (delete 'strip-double-wrap))))) + #~(cons "--with-xwidgets" #$flags)))) (inputs (modify-inputs (package-inputs emacs) (prepend webkitgtk-with-libsoup2 libxcomposite))))) diff --git a/gnu/packages/patches/emacs-source-date-epoch.patch b/gnu/packages/patches/emacs-source-date-epoch.patch deleted file mode 100644 index 77ea7ac15c..0000000000 --- a/gnu/packages/patches/emacs-source-date-epoch.patch +++ /dev/null @@ -1,20 +0,0 @@ -Honor SOURCE_DATE_EPOCH variable to avoid non-determinism in generated -"autoloads" files. - ---- a/lisp/emacs-lisp/autoload.el -+++ b/lisp/emacs-lisp/autoload.el -@@ -419,8 +419,12 @@ - ;; nil t)) - ;; (match-end 2)))) - (insert generate-autoload-section-header) -- (prin1 `(autoloads ,autoloads ,load-name ,file ,time) -- outbuf) -+ (let* ((env (getenv "SOURCE_DATE_EPOCH")) -+ (time (if env -+ (seconds-to-time (string-to-number env)) -+ time))) -+ (prin1 `(autoloads ,autoloads ,load-name ,file ,time) -+ outbuf)) - (terpri outbuf) - ;; Break that line at spaces, to avoid very long lines. - ;; Make each sub-line into a comment. -- cgit v1.2.3 From a3ac317ab4a90f66ac65055fa26dee58ed2367b8 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Fri, 9 Jun 2023 13:28:44 +0200 Subject: gnu: Construct Emacs packages from bottom up. This makes relationships within the Emacs variants slightly easier to reason about. In particular, it makes it so that inputs get added on top of the previous stack rather than removed (which brings the risk of not adjusting changes downwards). * gnu/packages/emacs.scm (emacs-minimal): Expand package definition. [inputs]: Reorder and add bash-minimal. (emacs-no-x): Inherit from emacs-minimal. (emacs): Inherit from emacs-no-x. (emacs-motif, emacs-no-x-toolkit): Inherit from emacs-no-x. Only inherit inputs from emacs. --- gnu/packages/emacs.scm | 395 ++++++++++++++++++++++--------------------------- 1 file changed, 178 insertions(+), 217 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index a6b883aaa2..046b11588d 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -54,6 +54,7 @@ (define-module (gnu packages emacs) #:use-module (gnu packages acl) #:use-module (gnu packages autotools) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) @@ -94,9 +95,9 @@ (define (%emacs-modules build-system) (srfi srfi-1) (ice-9 ftw)))) -(define-public emacs +(define-public emacs-minimal (package - (name "emacs") + (name "emacs-minimal") (version "29.0.91") (source (origin ;; TODO: Restore url-fetch when serving 29.1 @@ -144,36 +145,14 @@ (define-public emacs "\"~/.guix-profile/include\"" "\"/var/guix/profiles/system/profile/include\"") " "))))))) - (build-system glib-or-gtk-build-system) + (build-system gnu-build-system) (arguments (list - #:tests? #f ; no check target + #:tests? #f ; no check target #:modules (%emacs-modules build-system) - #:configure-flags #~(list "--with-modules" - "--with-cairo" - "--with-native-compilation=aot" - "--disable-build-details") + #:configure-flags #~(list "--with-gnutls=no" "--disable-build-details") #:phases #~(modify-phases %standard-phases - (add-after 'set-paths 'set-libgccjit-path - (lambda* (#:key inputs #:allow-other-keys) - (define (first-subdirectory/absolute directory) - (let ((files (scandir - directory - (lambda (file) - (and (not (member file '("." ".."))) - (file-is-directory? (string-append - directory "/" - file))))))) - (and (not (null? files)) - (string-append directory "/" (car files))))) - (let* ((libgccjit-libdir - (first-subdirectory/absolute ;; version - (first-subdirectory/absolute ;; host type - (search-input-directory inputs "lib/gcc"))))) - (setenv "LIBRARY_PATH" - (string-append (getenv "LIBRARY_PATH") - ":" libgccjit-libdir))))) (add-after 'unpack 'enable-elogind (lambda _ (substitute* "configure.ac" @@ -204,20 +183,6 @@ (define (first-subdirectory/absolute directory) (("\\(tramp-compat-process-running-p \"(.*)\"\\)" all process) (format #f "(or ~a (tramp-compat-process-running-p ~s))" all (string-append "." process "-real")))))) - (add-after 'unpack 'patch-compilation-driver - (lambda _ - (substitute* "lisp/emacs-lisp/comp.el" - (("\\(defcustom native-comp-driver-options nil") - (format - #f "(defcustom native-comp-driver-options '(~@{~s~^ ~})" - (string-append - "-B" #$(this-package-input "binutils") "/bin/") - (string-append - "-B" #$(this-package-input "glibc") "/lib/") - (string-append - "-B" #$(this-package-input "libgccjit") "/lib/") - (string-append - "-B" #$(this-package-input "libgccjit") "/lib/gcc/")))))) (add-before 'configure 'fix-/bin/pwd (lambda _ ;; Use `pwd', not `/bin/pwd'. @@ -259,29 +224,7 @@ (define* (emacs-byte-compile-directory dir) (delete-file (string-append lisp-dir "/subdirs.el")) ;; Byte compile the site-start files. (emacs-byte-compile-directory lisp-dir)))) - (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp - ;; restore the dump file that Emacs installs somewhere in - ;; libexec/ to its original state - (lambda* (#:key outputs target #:allow-other-keys) - (let* ((libexec (string-append (assoc-ref outputs "out") - "/libexec")) - ;; each of these ought to only match a single file, - ;; but even if not (find-files) sorts by string<, - ;; so the Nth element in one maps to the Nth element of - ;; the other - (pdmp (find-files libexec "\\.pdmp$")) - (pdmp-real (find-files libexec "\\.pdmp-real$"))) - (for-each rename-file pdmp-real pdmp)))) - (add-after 'glib-or-gtk-wrap 'strip-double-wrap - (lambda* (#:key outputs #:allow-other-keys) - ;; Directly copy emacs-X.Y to emacs, so that it is not wrapped - ;; twice. This also fixes a minor issue, where WMs would not be - ;; able to track emacs back to emacs.desktop. - (with-directory-excursion (assoc-ref outputs "out") - (copy-file - (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$")) - "bin/emacs")))) - (add-after 'strip-double-wrap 'wrap-emacs-paths + (add-after 'install 'wrap-emacs-paths (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (lisp-dirs (find-files (string-append out "/share/emacs") @@ -290,9 +233,9 @@ (define* (emacs-byte-compile-directory dir) (for-each (lambda (prog) (wrap-program prog - ;; emacs-next and variants rely on uname being in PATH for - ;; Tramp. Tramp paths can't be hardcoded, because they - ;; need to be portable. + ;; Some variants rely on uname being in PATH for Tramp. + ;; Tramp paths can't be hardcoded, because they need to + ;; be portable. `("PATH" suffix ,(map dirname (list (search-input-file inputs "/bin/gzip") @@ -305,66 +248,30 @@ (define* (emacs-byte-compile-directory dir) ;; environment variables from emacs. ;; Likewise, we don't need to patch helper binaries ;; like etags, ctags or ebrowse. - "^emacs(-[0-9]+(\\.[0-9]+)*)?$")))))))) - (inputs - (list gnutls - ncurses - - ;; To "unshadow" ld-wrapper in native builds - (make-ld-wrapper "ld-wrapper" #:binutils binutils) - - ;; For native compilation - binutils - glibc - libgccjit - - ;; Required for "core" functionality, such as dired and compression. - coreutils - gzip - - ;; Avoid Emacs's limited movemail substitute that retrieves POP3 - ;; email only via insecure channels. - ;; This is not needed for (modern) IMAP. - mailutils - - gpm - libx11 - gtk+ - cairo - pango - harfbuzz - libxft - libtiff - giflib - lcms - libjpeg-turbo - libselinux - acl - jansson - gmp - ghostscript - poppler - elogind - sqlite - tree-sitter - - ;; When looking for libpng `configure' links with `-lpng -lz', so we - ;; must also provide zlib as an input. - libpng - zlib - (librsvg-for-system) - libxpm - libxml2 - libice - libsm - alsa-lib - dbus - - ;; multilingualization support - libotf - m17n-lib)) - (native-inputs - (list autoconf pkg-config texinfo)) + "^emacs(-[0-9]+(\\.[0-9]+)*)?$"))))) + (add-after 'wrap-emacs-paths 'undo-double-wrap + (lambda* (#:key outputs #:allow-other-keys) + ;; Directly copy emacs-X.Y to emacs, so that it is not wrapped + ;; twice. This also fixes a minor issue, where WMs would not be + ;; able to track emacs back to emacs.desktop. + (with-directory-excursion (assoc-ref outputs "out") + (copy-file + (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$")) + "bin/emacs"))))))) + (inputs (list bash-minimal coreutils gzip ncurses)) + (native-inputs (list autoconf pkg-config texinfo)) + (home-page "https://www.gnu.org/software/emacs/") + (synopsis "The extensible text editor (minimal build for byte-compilation)") + (description + "GNU Emacs is an extensible and highly customizable text editor. It is +based on an Emacs Lisp interpreter with extensions for text editing. Emacs +has been extended in essentially all areas of computing, giving rise to a +vast array of packages supporting, e.g., email, IRC and XMPP messaging, +spreadsheets, remote server editing, and much more. Emacs includes extensive +documentation on all aspects of the system, from basic editing to writing +large Lisp programs. It has full Unicode support for nearly all human +languages.") + (license license:gpl3+) (native-search-paths (list (search-path-specification (variable "EMACSLOADPATH") @@ -375,26 +282,135 @@ (define* (emacs-byte-compile-directory dir) (search-path-specification (variable "INFOPATH") (files '("share/info"))) + ;; Most variants support tree-sitter, so let's include it here. (search-path-specification (variable "TREE_SITTER_GRAMMAR_PATH") - (files '("lib/tree-sitter"))))) + (files '("lib/tree-sitter"))))))) - (home-page "https://www.gnu.org/software/emacs/") +(define-public emacs-no-x + (package/inherit emacs-minimal + (name "emacs-no-x") + (synopsis "The extensible, customizable, self-documenting text +editor (console only)") + (arguments + (substitute-keyword-arguments (package-arguments emacs-minimal) + ((#:configure-flags flags #~'()) + #~(cons* "--with-modules" "--with-native-compilation=aot" + (delete "--with-gnutls=no" #$flags))) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'set-paths 'set-libgccjit-path + (lambda* (#:key inputs #:allow-other-keys) + (define (first-subdirectory/absolute directory) + (let ((files (scandir + directory + (lambda (file) + (and (not (member file '("." ".."))) + (file-is-directory? (string-append + directory "/" + file))))))) + (and (not (null? files)) + (string-append directory "/" (car files))))) + (let* ((libgccjit-libdir + (first-subdirectory/absolute ;; version + (first-subdirectory/absolute ;; host type + (search-input-directory inputs "lib/gcc"))))) + (setenv "LIBRARY_PATH" + (string-append (getenv "LIBRARY_PATH") + ":" libgccjit-libdir))))) + (add-after 'unpack 'patch-compilation-driver + (lambda _ + (substitute* "lisp/emacs-lisp/comp.el" + (("\\(defcustom native-comp-driver-options nil") + (format + #f "(defcustom native-comp-driver-options '(~@{~s~^ ~})" + (string-append + "-B" #$(this-package-input "binutils") "/bin/") + (string-append + "-B" #$(this-package-input "glibc") "/lib/") + (string-append + "-B" #$(this-package-input "libgccjit") "/lib/") + (string-append + "-B" #$(this-package-input "libgccjit") "/lib/gcc/")))))))))) + (inputs + (modify-inputs (package-inputs emacs-minimal) + (prepend gnutls + ;; To "unshadow" ld-wrapper in native builds + (make-ld-wrapper "ld-wrapper" #:binutils binutils) + ;; For native compilation + binutils + glibc + libgccjit + + ;; Avoid Emacs's limited movemail substitute that retrieves POP3 + ;; email only via insecure channels. + ;; This is not needed for (modern) IMAP. + mailutils + + acl + alsa-lib + elogind + ghostscript + gpm + jansson + lcms + libice + libselinux + libsm + libxml2 + m17n-lib + sqlite + tree-sitter + zlib))))) + +(define-public emacs + (package/inherit emacs-no-x + (name "emacs") (synopsis "The extensible, customizable, self-documenting text editor") - (description - "GNU Emacs is an extensible and highly customizable text editor. It is -based on an Emacs Lisp interpreter with extensions for text editing. Emacs -has been extended in essentially all areas of computing, giving rise to a -vast array of packages supporting, e.g., email, IRC and XMPP messaging, -spreadsheets, remote server editing, and much more. Emacs includes extensive -documentation on all aspects of the system, from basic editing to writing -large Lisp programs. It has full Unicode support for nearly all human -languages.") - (license license:gpl3+))) + (build-system glib-or-gtk-build-system) + (arguments + (substitute-keyword-arguments (package-arguments emacs-no-x) + ((#:modules _) (%emacs-modules build-system)) + ((#:configure-flags flags #~'()) + #~(cons* "--with-cairo" #$flags)) + ((#:phases phases) + #~(modify-phases #$phases + ;; Note: due to the changed #:modules, %standard-phases in #$phases + ;; refers to glib-or-gtk:%standard-phases, so we don't need to add + ;; them ourselves. + (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp + ;; Restore the dump file that Emacs installs somewhere in + ;; libexec/ to its original state. + (lambda* (#:key outputs target #:allow-other-keys) + (let* ((libexec (string-append (assoc-ref outputs "out") + "/libexec")) + ;; each of these ought to only match a single file, + ;; but even if not (find-files) sorts by string<, + ;; so the Nth element in one maps to the Nth element of + ;; the other + (pdmp (find-files libexec "\\.pdmp$")) + (pdmp-real (find-files libexec "\\.pdmp-real$"))) + (for-each rename-file pdmp-real pdmp)))))))) + (inputs (modify-inputs (package-inputs emacs-no-x) + (prepend + cairo + dbus + gtk+ + giflib + harfbuzz + libjpeg-turbo + libotf + libpng + (librsvg-for-system) + libtiff + libx11 + libxft + libxpm + pango + poppler))))) (define-public emacs-pgtk - (package - (inherit emacs) + (package/inherit emacs (name "emacs-pgtk") (arguments (substitute-keyword-arguments (package-arguments emacs) @@ -404,40 +420,6 @@ (define-public emacs-pgtk (description "This Emacs build implements graphical UI purely in terms of GTK."))) -(define-public emacs-pgtk-xwidgets - (package - (inherit emacs-pgtk) - (name "emacs-pgtk-xwidgets") - (synopsis "Emacs text editor with @code{xwidgets} and @code{pgtk} support") - (arguments - (substitute-keyword-arguments (package-arguments emacs-pgtk) - ((#:configure-flags flags #~'()) - #~(cons "--with-xwidgets" #$flags)))) - (inputs - (modify-inputs (package-inputs emacs-pgtk) - (prepend gsettings-desktop-schemas webkitgtk-with-libsoup2))))) - -(define-public emacs-minimal - ;; This is the version that you should use as an input to packages that just - ;; need to byte-compile .el files. - (package/inherit emacs - (name "emacs-minimal") - (synopsis "The extensible text editor (used only for byte-compilation)") - (build-system gnu-build-system) - (arguments - (substitute-keyword-arguments (package-arguments emacs) - ((#:configure-flags flags #~'()) - #~(list "--with-gnutls=no" "--disable-build-details")) - ((#:modules _) (%emacs-modules build-system)) - ((#:phases phases) - #~(modify-phases #$phases - (delete 'set-libgccjit-path) - (delete 'patch-compilation-driver) - (delete 'restore-emacs-pdmp) - (delete 'strip-double-wrap))))) - (inputs (list ncurses coreutils gzip)) - (native-inputs (list autoconf pkg-config texinfo)))) - (define-public emacs-xwidgets (package/inherit emacs (name "emacs-xwidgets") @@ -451,70 +433,49 @@ (define-public emacs-xwidgets (modify-inputs (package-inputs emacs) (prepend webkitgtk-with-libsoup2 libxcomposite))))) +(define-public emacs-pgtk-xwidgets + (package + (inherit emacs-pgtk) + (name "emacs-pgtk-xwidgets") + (synopsis "Emacs text editor with @code{xwidgets} and @code{pgtk} support") + (arguments + (substitute-keyword-arguments (package-arguments emacs-pgtk) + ((#:configure-flags flags #~'()) + #~(cons "--with-xwidgets" #$flags)))) + (inputs + (modify-inputs (package-inputs emacs-pgtk) + (prepend gsettings-desktop-schemas webkitgtk-with-libsoup2))))) + (define-public emacs-motif - (package/inherit emacs + (package/inherit emacs-no-x (name "emacs-motif") (synopsis "The extensible, customizable, self-documenting text editor (with Motif toolkit)") - (build-system gnu-build-system) + ;; Using emacs' inputs as base, since it has all the graphical stuff (inputs (modify-inputs (package-inputs emacs) (delete "gtk+") (prepend inotify-tools motif))) (arguments (substitute-keyword-arguments - (package-arguments - emacs) + (package-arguments emacs-no-x) ((#:configure-flags flags #~'()) #~(cons "--with-x-toolkit=motif" - #$flags)) - ((#:modules _) - (%emacs-modules build-system)) - ((#:phases phases) - #~(modify-phases #$phases - (delete 'restore-emacs-pdmp) - (delete 'strip-double-wrap))))))) - -(define-public emacs-no-x - (package/inherit emacs - (name "emacs-no-x") - (synopsis "The extensible, customizable, self-documenting text -editor (console only)") - (build-system gnu-build-system) - (inputs (modify-inputs (package-inputs emacs) - (delete "libx11" "gtk+" "libxft" "libtiff" "giflib" "libjpeg" - "imagemagick" "libpng" "librsvg" "libxpm" "libice" - "libsm" "cairo" "pango" "harfbuzz" - ;; These depend on libx11, so remove them as well. - "libotf" "m17n-lib" "dbus"))) - (arguments - (substitute-keyword-arguments (package-arguments emacs) - ((#:configure-flags flags #~'()) - #~(delete "--with-cairo" #$flags)) - ((#:modules _) (%emacs-modules build-system)) - ((#:phases phases) - #~(modify-phases #$phases - (delete 'restore-emacs-pdmp) - (delete 'strip-double-wrap))))))) + #$flags)))))) (define-public emacs-no-x-toolkit - (package/inherit emacs + (package/inherit emacs-no-x (name "emacs-no-x-toolkit") (synopsis "The extensible, customizable, self-documenting text editor (without an X toolkit)" ) - (build-system gnu-build-system) + ;; Using emacs' inputs as base, since it has all the graphical stuff (inputs (modify-inputs (package-inputs emacs) (delete "gtk+") (prepend inotify-tools))) (arguments - (substitute-keyword-arguments (package-arguments emacs) + (substitute-keyword-arguments (package-arguments emacs-no-x) ((#:configure-flags flags #~'()) - #~(cons "--with-x-toolkit=no" #$flags)) - ((#:modules _) (%emacs-modules build-system)) - ((#:phases phases) - #~(modify-phases #$phases - (delete 'restore-emacs-pdmp) - (delete 'strip-double-wrap))))))) + #~(cons "--with-x-toolkit=no" #$flags)))))) (define-public emacs-wide-int (package/inherit emacs -- cgit v1.2.3 From 9f23addae2d6a8a571181d640d6791f6d6f1e630 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Tue, 1 Aug 2023 22:29:05 +0200 Subject: gnu: emacs-jsdoc: Use regular emacs. * gnu/packages/emacs-xyz.scm (emacs-jsdoc)[arguments]: Remove. --- gnu/packages/emacs-xyz.scm | 1 - 1 file changed, 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index ed3d89d51f..58a53bfee3 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -30332,7 +30332,6 @@ (define-public emacs-jsdoc (base32 "0cbchri4117wjcnlk3npi4x1sfx248vck1q61cis8drrrz4c8jyp")) (file-name (git-file-name name version)))) (build-system emacs-build-system) - (arguments (list #:emacs emacs-next)) (propagated-inputs (list emacs-dash emacs-s -- cgit v1.2.3 From 3349a50d700a2112a31ac4ce6cc6639d3b4cf1e2 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Wed, 2 Aug 2023 20:30:11 +0200 Subject: gnu: emacs: Update to 29.1. * gnu/packages/emacs.scm (emacs-minimal): Update to 29.1. [source]: Use url-fetch again. --- gnu/packages/emacs.scm | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index d90f7ccb84..cbdc0598b1 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -98,19 +98,14 @@ (define (%emacs-modules build-system) (define-public emacs-minimal (package (name "emacs-minimal") - (version "29.0.92") + (version "29.1") (source (origin - ;; TODO: Restore url-fetch when serving 29.1 - ;; (method url-fetch) - ;; (uri (string-append "mirror://gnu/emacs/emacs-" - ;; version ".tar.xz")) - (method git-fetch) - (uri (git-reference - (url "https://git.savannah.gnu.org/git/emacs.git/") - (commit (string-append "emacs-" version)))) + (method url-fetch) + (uri (string-append "mirror://gnu/emacs/emacs-" + version ".tar.xz")) (sha256 (base32 - "1h3p325859svcy43iv7wr27dp68049j9d44jq5akcynqdkxz4jjn")) + "009f7q08vg919b90k2jrsznq73s3n224avz80dd2y7i3rjjq3y6j")) (patches (search-patches "emacs-exec-path.patch" "emacs-fix-scheme-indent-function.patch" "emacs-native-comp-driver-options.patch" -- cgit v1.2.3 From 7da6173eed37281540de286d7872827f5cfb0d6b Mon Sep 17 00:00:00 2001 From: Arjan Adriaanse Date: Mon, 14 Aug 2023 16:56:46 +0200 Subject: gnu: emacs-emacsql: Update to 3.1.1-1.29194a6. This commit fixes the check phase when building with Emacs 29. * gnu/packages/emacs-xyz.scm (emacs-emacsql): Update to 3.1.1-1.29194a6. [arguments]<#:phases>{remove-sqlite-builtin}: Remove phase. Signed-off-by: Liliana Marie Prikler --- gnu/packages/emacs-xyz.scm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 1a44926729..6dc98183f8 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -21900,8 +21900,8 @@ (define-public emacs-finalize (license license:unlicense))) (define-public emacs-emacsql - (let ((commit "e1baaf2f874df7f9259a8ecca978e03d3ddae5b5") - (revision "0")) + (let ((commit "29194a63ede3ee24c7457c2fde03b0f1320ca4b1") + (revision "1")) (package (name "emacs-emacsql") (version (git-version "3.1.1" revision commit)) @@ -21913,7 +21913,7 @@ (define-public emacs-emacsql (commit commit))) (file-name (git-file-name name version)) (sha256 - (base32 "0dvqs1jg5zqn0i3r67sn1a40h5rm961q9vxvmqxbgvdhkjvip8fn")))) + (base32 "14yj53xxqi3009bdj39k2fqwyc896yp2m7gdkgyv47wlkh1xwzxh")))) (build-system emacs-build-system) (arguments (list @@ -21929,12 +21929,6 @@ (define-public emacs-emacsql (srfi srfi-26)) #:phases #~(modify-phases %standard-phases - (add-before 'install 'remove-sqlite-builtin - ;; Current emacs 28.2 doesn't have sqlite feature and compilation - ;; of this file fails. This phase should be removed, when emacs - ;; package is updated to 29. - (lambda _ - (delete-file "emacsql-sqlite-builtin.el"))) (add-before 'install 'patch-elisp-shell-shebangs (lambda _ (substitute* (find-files "." "\\.el") -- cgit v1.2.3 From 44fd56096e1e8e8d78e0af2c7fda011460b4766f Mon Sep 17 00:00:00 2001 From: Arjan Adriaanse Date: Mon, 14 Aug 2023 16:56:47 +0200 Subject: gnu: Remove emacs-emacsql-sqlite3. This package is obsolete since Emacs 29. * gnu/packages/emacs-xyz.scm (emacs-emacsql-sqlite3): Delete variable. (emacs-org-roam)[propagated-inputs]: Replace with emacs-emacsql. Signed-off-by: Liliana Marie Prikler --- gnu/packages/emacs-xyz.scm | 43 +------------------------------------------ 1 file changed, 1 insertion(+), 42 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 6dc98183f8..412ace373e 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -21966,47 +21966,6 @@ (define-public emacs-emacsql object @code{nil} corresponds 1:1 with @code{NULL} in the database.") (license license:gpl3+)))) -(define-public emacs-emacsql-sqlite3 - ;; This commit contains changes necessary for Sqlite 3.38+. - (let ((commit "2113618732665f2112cb932a66c0e89c404d8777") - (revision "1")) - (package - (name "emacs-emacsql-sqlite3") - (version (git-version "1.0.2" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/cireu/emacsql-sqlite3") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0r8svrd0d4cflx8a8gkynnhafcpv3ksn9rds8dhyx5yibximbzsw")))) - (build-system emacs-build-system) - (arguments - `(#:tests? #t - #:test-command '("emacs" "-Q" "--batch" "-L" "." - "--load" "emacsql-sqlite3-test.el" - "-f" "ert-run-tests-batch-and-exit") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'embed-path-to-sqlite3 - (lambda _ - (substitute* "emacsql-sqlite3.el" - (("\\(executable-find \"sqlite3\"\\)") - (string-append "\"" (which "sqlite3") "\"")))))))) - (native-inputs - (list emacs-ert-runner)) - (inputs - (list sqlite)) - (propagated-inputs - (list emacs-emacsql)) - (home-page "https://github.com/cireu/emacsql-sqlite3") - (synopsis "EmacSQL backend for SQLite") - (description "This is yet another EmacSQL backend for SQLite which uses -official @command{sqlite3} executable to access SQL database.") - (license license:gpl3+)))) - (define-public emacs-closql (package (name "emacs-closql") @@ -35269,7 +35228,7 @@ (define-public emacs-org-roam (list texinfo)) (propagated-inputs (list emacs-dash - emacs-emacsql-sqlite3 + emacs-emacsql emacs-f emacs-magit emacs-org -- cgit v1.2.3 From d58c6e25ff3d1e70fd9b0e07bdad1b335de8a979 Mon Sep 17 00:00:00 2001 From: Arjan Adriaanse Date: Tue, 15 Aug 2023 00:38:25 +0200 Subject: gnu: notmuch: Fix tests with Emacs 29. * gnu/packages/patches/notmuch-emacs-test-output.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/mail.scm (notmuch)[patches]: Add here. Signed-off-by: Liliana Marie Prikler --- gnu/local.mk | 1 + gnu/packages/mail.scm | 6 +- .../patches/notmuch-emacs-test-output.patch | 89 ++++++++++++++++++++++ 3 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/notmuch-emacs-test-output.patch (limited to 'gnu') diff --git a/gnu/local.mk b/gnu/local.mk index ded02c5742..7af2755a2b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1646,6 +1646,7 @@ dist_patch_DATA = \ %D%/packages/patches/network-manager-meson.patch \ %D%/packages/patches/nginx-socket-cloexec.patch \ %D%/packages/patches/nnpack-system-libraries.patch \ + %D%/packages/patches/notmuch-emacs-test-output.patch \ %D%/packages/patches/nsis-env-passthru.patch \ %D%/packages/patches/nss-getcwd-nonnull.patch \ %D%/packages/patches/nss-increase-test-timeout.patch \ diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index a6f571e723..fb1ba35d21 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -52,6 +52,7 @@ ;;; Copyright © 2022 jgart ;;; Copyright © 2022 ( ;;; Copyright © 2023 Timo Wilken +;;; Copyright © 2023 Arjan Adriaanse ;;; ;;; This file is part of GNU Guix. ;;; @@ -1383,7 +1384,10 @@ (define-public notmuch (uri (string-append "https://notmuchmail.org/releases/notmuch-" version ".tar.xz")) (sha256 - (base32 "1xl64xh0ijfkx265lcj9cqv1wkzha8gsn9jn4fw4xgvqigr6sxhf")))) + (base32 "1xl64xh0ijfkx265lcj9cqv1wkzha8gsn9jn4fw4xgvqigr6sxhf")) + (patches + ;; Output for some tests varies slightly in Emacs 29. + (search-patches "notmuch-emacs-test-output.patch")))) (build-system gnu-build-system) (arguments (list diff --git a/gnu/packages/patches/notmuch-emacs-test-output.patch b/gnu/packages/patches/notmuch-emacs-test-output.patch new file mode 100644 index 0000000000..3c6d472d6b --- /dev/null +++ b/gnu/packages/patches/notmuch-emacs-test-output.patch @@ -0,0 +1,89 @@ +From e9e779ead4d703ad423e46c23abd0c9afd7d5ed2 Mon Sep 17 00:00:00 2001 +From: Arjan Adriaanse +Date: Tue, 15 Aug 2023 00:00:05 +0200 +Subject: [PATCH] test: fix expected output for Emacs 29 + +--- + test/T453-emacs-reply.sh | 1 - + test/T454-emacs-dont-reply-names.sh | 9 +++------ + .../notmuch-reply-duplicate-4 | 1 - + 3 files changed, 3 insertions(+), 8 deletions(-) + +diff --git a/test/T453-emacs-reply.sh b/test/T453-emacs-reply.sh +index 0a27d066..de400b85 100755 +--- a/test/T453-emacs-reply.sh ++++ b/test/T453-emacs-reply.sh +@@ -17,7 +17,6 @@ cat < EXPECTED + From: Notmuch Test Suite + To: Antoine Beaupré + Subject: Re: bug: "no top level messages" crash on Zen email loops +-In-Reply-To: <874llc2bkp.fsf@curie.anarc.at> + Fcc: MAIL_DIR/sent + --text follows this line-- + Antoine Beaupré writes: +diff --git a/test/T454-emacs-dont-reply-names.sh b/test/T454-emacs-dont-reply-names.sh +index 3a770177..9ed4f18b 100755 +--- a/test/T454-emacs-dont-reply-names.sh ++++ b/test/T454-emacs-dont-reply-names.sh +@@ -17,13 +17,12 @@ test_emacs '(let ((message-dont-reply-to-names "notmuchmail\\|noreply\\|harvard" + (test-visible-output "OUTPUT-FULL.raw"))' + + notmuch_dir_sanitize < OUTPUT-FULL.raw > OUTPUT-FULL +-head -6 OUTPUT-FULL > OUTPUT ++head -5 OUTPUT-FULL > OUTPUT + + cat < EXPECTED + From: Notmuch Test Suite + To: Mikhail Gusarov + Subject: Re: [notmuch] Working with Maildir storage? +-In-Reply-To: <20091117203301.GV3165@dottiness.seas.harvard.edu> + Fcc: MAIL_DIR/sent + --text follows this line-- + EOF +@@ -38,14 +37,13 @@ test_emacs '(let ((message-dont-reply-to-names + (test-visible-output "OUTPUT-FULL-PRED.raw"))' + + notmuch_dir_sanitize < OUTPUT-FULL-PRED.raw > OUTPUT-FULL-PRED +-head -7 OUTPUT-FULL-PRED > OUTPUT-PRED ++head -6 OUTPUT-FULL-PRED > OUTPUT-PRED + + cat < EXPECTED-PRED + From: Notmuch Test Suite + To: Lars Kellogg-Stedman + Cc: notmuch@notmuchmail.org + Subject: Re: [notmuch] Working with Maildir storage? +-In-Reply-To: <20091117203301.GV3165@dottiness.seas.harvard.edu> + Fcc: MAIL_DIR/sent + --text follows this line-- + EOF +@@ -59,14 +57,13 @@ test_emacs '(let ((message-dont-reply-to-names nil)) + (test-visible-output "OUTPUT-FULL-NIL.raw"))' + + notmuch_dir_sanitize < OUTPUT-FULL-NIL.raw > OUTPUT-FULL-NIL +-head -7 OUTPUT-FULL-NIL > OUTPUT-NIL ++head -6 OUTPUT-FULL-NIL > OUTPUT-NIL + + cat < EXPECTED-NIL + From: Notmuch Test Suite + To: Lars Kellogg-Stedman , Mikhail Gusarov + Cc: notmuch@notmuchmail.org + Subject: Re: [notmuch] Working with Maildir storage? +-In-Reply-To: <20091117203301.GV3165@dottiness.seas.harvard.edu> + Fcc: MAIL_DIR/sent + --text follows this line-- + EOF +diff --git a/test/emacs-reply.expected-output/notmuch-reply-duplicate-4 b/test/emacs-reply.expected-output/notmuch-reply-duplicate-4 +index 836f77b1..44b8c7a6 100644 +--- a/test/emacs-reply.expected-output/notmuch-reply-duplicate-4 ++++ b/test/emacs-reply.expected-output/notmuch-reply-duplicate-4 +@@ -1,7 +1,6 @@ + From: Notmuch Test Suite + To: Sean Whitton , 916811@bugs.debian.org, 916805@bugs.debian.org, 916807@bugs.debian.org, 916808@bugs.debian.org, 916809@bugs.debian.org, 916811@bugs.debian.org, 916867@bugs.debian.org, 916869@bugs.debian.org, 916872@bugs.debian.org, 916875@bugs.debian.org, 916876@bugs.debian.org + Subject: Re: [Pkg-emacsen-addons] Bug#916811: Increase severity to 'serious' +-In-Reply-To: <87r2ecrr6x.fsf@zephyr.silentflame.com> + Fcc: MAIL_DIR/sent + --text follows this line-- + Sean Whitton writes: +-- +2.41.0 + -- cgit v1.2.3 From 282de197e85c2fc5606ad485b5d3b4070429860c Mon Sep 17 00:00:00 2001 From: Arjan Adriaanse Date: Mon, 14 Aug 2023 22:02:37 +0200 Subject: gnu: emacs-php-mode: Update to 1.25.0. * gnu/packages/emacs-xyz.scm (emacs-php-mode): Update to 1.25.0. Signed-off-by: Liliana Marie Prikler --- gnu/packages/emacs-xyz.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 412ace373e..9c23c69f79 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -18090,7 +18090,7 @@ (define-public emacs-vala-mode (define-public emacs-php-mode (package (name "emacs-php-mode") - (version "1.24.3") + (version "1.25.0") (source (origin (method git-fetch) @@ -18099,7 +18099,7 @@ (define-public emacs-php-mode (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "01yw10z1kf38nz4z3gmpx56wmc7a7caf4nk6rccg0w4kklqw1h94")))) + (base32 "1vwbxaxjvz2hhb6pli1bh1qlrc2r991zl4i18wiwk78ffanqx6q0")))) (build-system emacs-build-system) (arguments (list -- cgit v1.2.3 From ef077b83f9de49c6f162eddb6ccd61f3d78e591f Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sat, 19 Aug 2023 00:22:25 +0200 Subject: gnu: emacs-all-the-icons: Honour #:tests? * gnu/packages/emacs-xyz.scm (emacs-all-the-icons)[#:phases]: Honour tests. --- gnu/packages/emacs-xyz.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 9c23c69f79..30f924a3fb 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -27793,10 +27793,12 @@ (define-public emacs-all-the-icons (install-file "octicons.ttf" fonts) (install-file "weathericons.ttf" fonts))))) (replace 'check - (lambda* (#:key outputs #:allow-other-keys) - (apply invoke "ert-runner" "-l" - (append (find-files "data" "\\.el") - '("all-the-icons-faces.el")))))))) + (lambda* (#:key tests? outputs #:allow-other-keys) + (if tests? + (apply invoke "ert-runner" "-l" + (append (find-files "data" "\\.el") + '("all-the-icons-faces.el"))) + (format #t "test suite not run~%"))))))) (native-inputs (list emacs-f emacs-ert-runner)) (propagated-inputs -- cgit v1.2.3 From 5a989fc417de48b64cb2ee6a5228c3af391acc25 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sat, 19 Aug 2023 00:52:53 +0200 Subject: gnu: emacs-haskell-mode: Update to 17.4. * gnu/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/emacs-xyz.scm (emacs-haskell-mode): Update to 17.4. [source]: Use it here. --- gnu/local.mk | 1 + gnu/packages/emacs-xyz.scm | 182 ++++++++++----------- .../emacs-haskell-mode-no-redefine-builtin.patch | 75 +++++++++ 3 files changed, 167 insertions(+), 91 deletions(-) create mode 100644 gnu/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch (limited to 'gnu') diff --git a/gnu/local.mk b/gnu/local.mk index 7af2755a2b..e14a9adc33 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1096,6 +1096,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-git-email-missing-parens.patch \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ %D%/packages/patches/emacs-json-reformat-fix-tests.patch \ + %D%/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ %D%/packages/patches/emacs-lispy-fix-thread-last-test.patch \ %D%/packages/patches/emacs-native-comp-driver-options.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 30f924a3fb..1e03625f62 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -2249,99 +2249,99 @@ (define-public emacs-unpackaged-el (license license:gpl3+)))) (define-public emacs-haskell-mode - (let ((revision "0") - (commit "5a9f8072c7b9168f0a8409adf9d62a3e4ad4ea3d")) - (package - (name "emacs-haskell-mode") - (version (git-version "17.2" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/haskell/haskell-mode") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0np1wrwdq7b9hpqpl9liampacnkx6diphyk8h2sbz2mfn9qr7pxs")))) - (propagated-inputs - (list emacs-dash)) - (native-inputs - (list emacs-minimal emacs-el-search emacs-stream texinfo)) - (build-system gnu-build-system) - (arguments - (list - #:make-flags #~(list - (string-append "EMACS=" #$emacs-minimal "/bin/emacs")) - #:modules `((ice-9 match) - (srfi srfi-26) - ((guix build emacs-build-system) #:prefix emacs:) - ,@%gnu-build-system-modules) - #:imported-modules `(,@%gnu-build-system-modules - (guix build emacs-build-system) - (guix build emacs-utils)) - #:phases - #~(modify-phases %standard-phases - (delete 'configure) - (add-before 'build 'pre-build - (lambda* (#:key inputs #:allow-other-keys) - (define (el-dir store-dir) - (match (find-files store-dir "\\.el$") - ((f1 f2 ...) (dirname f1)) - (_ ""))) + (package + (name "emacs-haskell-mode") + (version "17.4") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/haskell/haskell-mode") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "03j94fgw1bljbjqmikbn9mnrfifxf7g9zrb727zmnnrjwyi0wd4n")) + (patches + (search-patches "emacs-haskell-mode-no-redefine-builtin.patch")))) + (propagated-inputs + (list emacs-dash)) + (native-inputs + (list emacs-minimal emacs-el-search emacs-stream texinfo)) + (build-system gnu-build-system) + (arguments + (list + #:make-flags #~(list + (string-append "EMACS=" #$emacs-minimal "/bin/emacs")) + #:modules `((ice-9 match) + (srfi srfi-26) + ((guix build emacs-build-system) #:prefix emacs:) + ,@%gnu-build-system-modules) + #:imported-modules `(,@%gnu-build-system-modules + (guix build emacs-build-system) + (guix build emacs-utils)) + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'pre-build + (lambda* (#:key inputs #:allow-other-keys) + (define (el-dir store-dir) + (match (find-files store-dir "\\.el$") + ((f1 f2 ...) (dirname f1)) + (_ ""))) - (let ((sh (search-input-file inputs "/bin/sh"))) - (define emacs-prefix? (cut string-prefix? "emacs-" <>)) - - (setenv "SHELL" "sh") - (setenv "EMACSLOADPATH" - (string-concatenate - (map (match-lambda - (((? emacs-prefix? name) . dir) - (string-append (el-dir dir) ":")) - (_ "")) - inputs))) - (substitute* (find-files "." "\\.el") (("/bin/sh") sh))))) - (add-before 'check 'delete-failing-tests - ;; XXX: these tests require GHC executable, which would be a big - ;; native input. - (lambda _ - (with-directory-excursion "tests" - ;; File `haskell-indent-tests.el' fails with - ;; `haskell-indent-put-region-in-literate-2' - ;; on Emacs 27.1+ - ;; XXX: https://github.com/haskell/haskell-mode/issues/1714 - (for-each delete-file - '("haskell-indent-tests.el" - "haskell-customize-tests.el" - "inferior-haskell-tests.el")) - - ;; requires many external tools (e.g. git, hasktags) - (substitute* "haskell-mode-tests.el" - (("\\(ert-deftest haskell-generate-tags.*" all) - (string-append all " (skip-unless nil)")))))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (el-dir (emacs:elpa-directory out)) - (doc (string-append - out "/share/doc/haskell-mode-" #$version)) - (info (string-append out "/share/info"))) - (define (copy-to-dir dir files) - (for-each (lambda (f) - (install-file f dir)) - files)) - - (with-directory-excursion "doc" - (invoke "makeinfo" "haskell-mode.texi") - (install-file "haskell-mode.info" info)) - (copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md")) - (copy-to-dir el-dir (find-files "." "\\.elc?")))))))) - (home-page "https://github.com/haskell/haskell-mode") - (synopsis "Haskell mode for Emacs") - (description - "This is an Emacs mode for editing, debugging and developing Haskell + (let ((sh (search-input-file inputs "/bin/sh"))) + (define emacs-prefix? (cut string-prefix? "emacs-" <>)) + + (setenv "SHELL" "sh") + (setenv "EMACSLOADPATH" + (string-concatenate + (map (match-lambda + (((? emacs-prefix? name) . dir) + (string-append (el-dir dir) ":")) + (_ "")) + inputs))) + (substitute* (find-files "." "\\.el") (("/bin/sh") sh))))) + (add-before 'check 'delete-failing-tests + ;; XXX: these tests require GHC executable, which would be a big + ;; native input. + (lambda _ + (with-directory-excursion "tests" + ;; File `haskell-indent-tests.el' fails with + ;; `haskell-indent-put-region-in-literate-2' + ;; on Emacs 27.1+ + ;; XXX: https://github.com/haskell/haskell-mode/issues/1714 + (for-each delete-file + '("haskell-indent-tests.el" + "haskell-customize-tests.el" + "inferior-haskell-tests.el")) + + ;; requires many external tools (e.g. git, hasktags) + (substitute* "haskell-mode-tests.el" + (("\\(ert-deftest haskell-generate-tags.*" all) + (string-append all " (skip-unless nil)")))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (el-dir (emacs:elpa-directory out)) + (doc (string-append + out "/share/doc/haskell-mode-" #$version)) + (info (string-append out "/share/info"))) + (define (copy-to-dir dir files) + (for-each (lambda (f) + (install-file f dir)) + files)) + + (with-directory-excursion "doc" + (invoke "makeinfo" "haskell-mode.texi") + (install-file "haskell-mode.info" info)) + (copy-to-dir doc '("CONTRIBUTING.md" "NEWS" "README.md")) + (copy-to-dir el-dir (find-files "." "\\.elc?")))))))) + (home-page "https://github.com/haskell/haskell-mode") + (synopsis "Haskell mode for Emacs") + (description + "This is an Emacs mode for editing, debugging and developing Haskell programs.") - (license license:gpl3+)))) + (license license:gpl3+))) (define-public emacs-dante (package diff --git a/gnu/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch b/gnu/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch new file mode 100644 index 0000000000..65ace2ee5e --- /dev/null +++ b/gnu/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch @@ -0,0 +1,75 @@ +From faa95a784d2c74c72e70367a5d531df6dd61aeab Mon Sep 17 00:00:00 2001 +From: Steve Purcell +Date: Sun, 6 Aug 2023 16:41:48 +0200 +Subject: [PATCH] Don't redefine built-in function + +Fixes #1817 +--- + tests/haskell-indent-tests.el | 14 ++++++++------ + tests/haskell-indentation-tests.el | 14 ++++++++------ + 2 files changed, 16 insertions(+), 12 deletions(-) + +diff --git a/tests/haskell-indent-tests.el b/tests/haskell-indent-tests.el +index 7196405b8..9a3de4ad3 100644 +--- a/tests/haskell-indent-tests.el ++++ b/tests/haskell-indent-tests.el +@@ -40,11 +40,13 @@ + ;; (haskell-indent-put-region-in-literate (point-min) (point-max) -1) + ;; (buffer-substring-no-properties (point-min) (point-max)))))) + +-(defsubst string-trim-left (string) +- "Remove leading whitespace from STRING." +- (if (string-match "\\`[ \t\n\r]+" string) +- (replace-match "" t t string) +- string)) ++(if (fboundp 'string-trim-left) ++ (defalias 'haskell--string-trim-left 'string-trim-left) ++ (defun haskell--string-trim-left (string &optional regexp) ++ "Remove leading whitespace from STRING." ++ (if (string-match (concat "\\`\\(?:" (or regexp "[ \t\n\r]+") "\\)") string) ++ (substring string (match-end 0)) ++ string))) + + (defun haskell-indent-format-info (info) + (if (cdr info) +@@ -128,7 +130,7 @@ macro quotes them for you." + :expected-result + ,(if allow-failure :failed :passed) + (haskell-indent-check +- ,(string-trim-left source) ++ ,(haskell--string-trim-left source) + ,@(mapcar (lambda (x) + (list 'quote x)) + test-cases)))))) +diff --git a/tests/haskell-indentation-tests.el b/tests/haskell-indentation-tests.el +index 4889b76a7..cd783a4f4 100644 +--- a/tests/haskell-indentation-tests.el ++++ b/tests/haskell-indentation-tests.el +@@ -33,11 +33,13 @@ + + ;;; Code: + +-(defsubst string-trim-left (string) +- "Remove leading whitespace from STRING." +- (if (string-match "\\`[ \t\n\r]+" string) +- (replace-match "" t t string) +- string)) ++(if (fboundp 'string-trim-left) ++ (defalias 'haskell--string-trim-left 'string-trim-left) ++ (defun haskell--string-trim-left (string &optional regexp) ++ "Remove leading whitespace from STRING." ++ (if (string-match (concat "\\`\\(?:" (or regexp "[ \t\n\r]+") "\\)") string) ++ (substring string (match-end 0)) ++ string))) + + (defun haskell-indentation-check (source &rest test-cases) + "Check if `haskell-indentation-find-indentations' returns expected results. +@@ -115,7 +117,7 @@ macro quotes them for you." + :expected-result + ,(if allow-failure :failed :passed) + (haskell-indentation-check +- ,(string-trim-left source) ++ ,(haskell--string-trim-left source) + ,@(mapcar (lambda (x) + (list 'quote x)) + test-cases)))))) -- cgit v1.2.3 From 1fcf9c0d7de956e7029090bdcc5b921932e95082 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sat, 19 Aug 2023 01:05:22 +0200 Subject: gnu: emacs-helpful: Update to 0.21. * gnu/packages/patches/emacs-helpful-fix-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/emacs-xyz.scm (emacs-helpful): Update to 0.21. [source]: Use it here. --- gnu/local.mk | 1 + gnu/packages/emacs-xyz.scm | 51 +++++++++++----------- gnu/packages/patches/emacs-helpful-fix-tests.patch | 28 ++++++++++++ 3 files changed, 54 insertions(+), 26 deletions(-) create mode 100644 gnu/packages/patches/emacs-helpful-fix-tests.patch (limited to 'gnu') diff --git a/gnu/local.mk b/gnu/local.mk index e14a9adc33..3b087a6d5e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1097,6 +1097,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ %D%/packages/patches/emacs-json-reformat-fix-tests.patch \ %D%/packages/patches/emacs-haskell-mode-no-redefine-builtin.patch \ + %D%/packages/patches/emacs-helpful-fix-tests.patch \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ %D%/packages/patches/emacs-lispy-fix-thread-last-test.patch \ %D%/packages/patches/emacs-native-comp-driver-options.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 1e03625f62..dbc176e379 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -24363,31 +24363,30 @@ (define-public emacs-download-region (license license:gpl3+)))) (define-public emacs-helpful - (let ((commit "1c98f6f06a85def5d34c735f8cd407f20cebddf9") - (revision "1")) - (package - (name "emacs-helpful") - (version (git-version "0.19" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/Wilfred/helpful") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "18b5hjfji51zxjrxhkklxx3j9svk295awmxv8n95mp8ilas2kd3l")))) - (build-system emacs-build-system) - (propagated-inputs - (list emacs-dash emacs-elisp-refs emacs-f emacs-s)) - (native-inputs - (list emacs-ert-runner emacs-undercover)) - (arguments - `(#:tests? #t - #:test-command '("ert-runner"))) - (home-page "https://github.com/Wilfred/helpful") - (synopsis "More contextual information in Emacs help") - (description "@code{helpful} is an alternative to the built-in Emacs help + (package + (name "emacs-helpful") + (version "0.21") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Wilfred/helpful") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "03afgdbs5nmhw833svrqky7fmfs1zlvqzcj7j5g29sakivs60xqc")) + (patches (search-patches "emacs-helpful-fix-tests.patch")))) + (build-system emacs-build-system) + (propagated-inputs + (list emacs-dash emacs-elisp-refs emacs-f emacs-s)) + (native-inputs + (list emacs-ert-runner emacs-undercover)) + (arguments + `(#:tests? #t + #:test-command '("ert-runner"))) + (home-page "https://github.com/Wilfred/helpful") + (synopsis "More contextual information in Emacs help") + (description "@code{helpful} is an alternative to the built-in Emacs help that provides much more contextual information. @itemize @@ -24406,7 +24405,7 @@ (define-public emacs-helpful @item Trace, disassemble functions from inside Helpful. This is discoverable and doesn't require memorisation of commands. @end itemize\n") - (license license:gpl3+)))) + (license license:gpl3+))) (define-public emacs-logview (package diff --git a/gnu/packages/patches/emacs-helpful-fix-tests.patch b/gnu/packages/patches/emacs-helpful-fix-tests.patch new file mode 100644 index 0000000000..61ed0671a4 --- /dev/null +++ b/gnu/packages/patches/emacs-helpful-fix-tests.patch @@ -0,0 +1,28 @@ +From 233e254bbe44f70ca899a506b3706af489228fda Mon Sep 17 00:00:00 2001 +From: aagon +Date: Thu, 10 Aug 2023 20:03:52 +0200 +Subject: [PATCH] Repair helpful--display-implementations test for emacs 29.1 + +--- + test/helpful-unit-test.el | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/test/helpful-unit-test.el b/test/helpful-unit-test.el +index 0f5177b..0716b0d 100644 +--- a/test/helpful-unit-test.el ++++ b/test/helpful-unit-test.el +@@ -1089,8 +1089,12 @@ find the source code." + (require 'xref) + (helpful-function 'xref-location-marker) + (should (s-contains-p "Implementations" (buffer-string))) +- (should (s-contains-p "((l xref-file-location))" (buffer-string))) +- (should (s-contains-p "((l xref-buffer-location))" (buffer-string)))) ++ (should (if (version< emacs-version "29.1") ++ (s-contains-p "((l xref-file-location))" (buffer-string)) ++ (s-contains-p "(xref-location-marker (L xref-file-location))" (buffer-string)))) ++ (should (if (version< emacs-version "29.1") ++ (s-contains-p "((l xref-buffer-location))" (buffer-string)) ++ (s-contains-p "(xref-location-marker (L xref-buffer-location))" (buffer-string))))) + + (defun helpful--boring-advice (orig-fn &rest args) + (apply orig-fn args)) -- cgit v1.2.3 From 51bbc440f432523b68a0ef40176d3ab8c27de81c Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sat, 19 Aug 2023 01:37:53 +0200 Subject: gnu: emacs-libgit: Fix build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/emacs-xyz.scm (emacs-libgit)[#:phases]: Add ‘ert-number-tests’. --- gnu/packages/emacs-xyz.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index dbc176e379..9aaac5142f 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -1407,6 +1407,10 @@ (define-public emacs-libgit (substitute* "test/submodule-test.el" (("\\(ert-deftest (status|ids) .*" all) (string-append all " (skip-unless nil)"))))) + (add-after 'unpack 'ert-number-tests + (lambda _ + (ert-number-tests "test/repository-test.el" + "repository-head-for-worktree"))) (add-before 'install 'prepare-for-install (lambda _ (let ((s "../source")) -- cgit v1.2.3 From f9b3bcac9ad64bdf43b2cdd8fd9ed74dec137590 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sat, 19 Aug 2023 01:55:30 +0200 Subject: gnu: emacs-all-the-icons: Fix build. * gnu/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/emacs-xyz.scm (emacs-all-the-icons)[source]: Use it here. --- gnu/local.mk | 1 + gnu/packages/emacs-xyz.scm | 2 ++ .../emacs-all-the-icons-remove-duplicate-rs.patch | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 gnu/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch (limited to 'gnu') diff --git a/gnu/local.mk b/gnu/local.mk index 3b087a6d5e..fb58b4eac8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1090,6 +1090,7 @@ dist_patch_DATA = \ %D%/packages/patches/elm-offline-package-registry.patch \ %D%/packages/patches/elm-reactor-static-files.patch \ %D%/packages/patches/elogind-revert-polkit-detection.patch \ + %D%/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch \ %D%/packages/patches/emacs-deferred-fix-number-of-arguments.patch \ %D%/packages/patches/emacs-exec-path.patch \ %D%/packages/patches/emacs-ess-fix-obsolete-function-alias.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 9aaac5142f..89ce0fa900 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -27776,6 +27776,8 @@ (define-public emacs-all-the-icons (url "https://github.com/domtronn/all-the-icons.el") (commit version))) (file-name (git-file-name name version)) + (patches + (search-patches "emacs-all-the-icons-remove-duplicate-rs.patch")) (sha256 (base32 "0lwgvgnqf7vihglm0c5bwsxbl4x7f641289cji5s7jwy2dbsqk7g")))) (build-system emacs-build-system) diff --git a/gnu/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch b/gnu/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch new file mode 100644 index 0000000000..2c6b14e0aa --- /dev/null +++ b/gnu/packages/patches/emacs-all-the-icons-remove-duplicate-rs.patch @@ -0,0 +1,21 @@ +From 24b8d5b63e347bd4cdcf79bf897fc0097fa20fc7 Mon Sep 17 00:00:00 2001 +From: Michael Wernthaler +Date: Thu, 22 Jul 2021 11:27:31 +0200 +Subject: [PATCH] Fixed icon for .rs-files + +--- + all-the-icons.el | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/all-the-icons.el b/all-the-icons.el +index e1f4cb7695..3399906cfb 100644 +--- a/all-the-icons.el ++++ b/all-the-icons.el +@@ -194,7 +194,6 @@ + ("r" all-the-icons-fileicon "R" :face all-the-icons-lblue) + ("rd" all-the-icons-fileicon "R" :face all-the-icons-lblue) + ("rdx" all-the-icons-fileicon "R" :face all-the-icons-lblue) +- ("rs" all-the-icons-fileicon "R" :face all-the-icons-lblue) + ("rsx" all-the-icons-fileicon "R" :face all-the-icons-lblue) + ;; There seems to be a a bug with this font icon which does not + ;; let you propertise it without it reverting to being a lower -- cgit v1.2.3 From ca7e310f7ac32354b2e693e9a0f783320952a8fc Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sat, 19 Aug 2023 08:40:03 +0200 Subject: gnu: emacs-yasnippet: Fix build. * gnu/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/emacs-xyz.scm (emacs-yasnippet)[source]: Use it here. * gnu/packages/patches/emacs-yasnippet-fix-tests.patch: Also fix delete-numberless-inner-snippet-issue-562. --- gnu/local.mk | 1 + gnu/packages/emacs-xyz.scm | 3 +- .../emacs-yasnippet-fix-empty-snippet-next.patch | 59 ++++++++++++++++++++++ .../patches/emacs-yasnippet-fix-tests.patch | 14 +++++ 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch (limited to 'gnu') diff --git a/gnu/local.mk b/gnu/local.mk index fb58b4eac8..bdaa9935b1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1107,6 +1107,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-telega-path-placeholder.patch \ %D%/packages/patches/emacs-telega-test-env.patch \ %D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch \ + %D%/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch \ %D%/packages/patches/emacs-yasnippet-fix-tests.patch \ %D%/packages/patches/emacs-kv-fix-tests.patch \ %D%/packages/patches/emacs-pgtk-super-key-fix.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 89ce0fa900..811728d170 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -17117,7 +17117,8 @@ (define-public emacs-yasnippet (sha256 (base32 "0via9dzw8m5lzymg1h78xkwjssh39zr3g6ccyamlf1rjzjsyxknv")) (patches - (search-patches "emacs-yasnippet-fix-tests.patch")))) + (search-patches "emacs-yasnippet-fix-empty-snippet-next.patch" + "emacs-yasnippet-fix-tests.patch")))) (build-system emacs-build-system) (arguments `(#:tests? #t diff --git a/gnu/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch b/gnu/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch new file mode 100644 index 0000000000..1faea2b456 --- /dev/null +++ b/gnu/packages/patches/emacs-yasnippet-fix-empty-snippet-next.patch @@ -0,0 +1,59 @@ +From 925292484162bc35c4258e72c36462bb13a5c69a Mon Sep 17 00:00:00 2001 +From: Liliana Marie Prikler +Date: Sat, 19 Aug 2023 08:38:17 +0200 +Subject: [PATCH] Guard against empty snippet in yas-next-field. + +--- + yasnippet.el | 29 +++++++++++++++-------------- + 1 file changed, 15 insertions(+), 14 deletions(-) + +diff --git a/yasnippet.el b/yasnippet.el +index e0b5537..41d86dd 100644 +--- a/yasnippet.el ++++ b/yasnippet.el +@@ -136,6 +136,7 @@ + (declare-function cl-progv-after "cl-extra") ; Needed for 23.4. + (require 'easymenu) + (require 'help-mode) ++(require 'subr-x) + + (defvar yas--editing-template) + (defvar yas--guessed-modes) +@@ -3386,20 +3387,20 @@ Otherwise delegate to `yas-next-field'." + If there's none, exit the snippet." + (interactive) + (unless arg (setq arg 1)) +- (let* ((active-field (overlay-get yas--active-field-overlay 'yas--field)) +- (snippet (car (yas-active-snippets (yas--field-start active-field) +- (yas--field-end active-field)))) +- (target-field (yas--find-next-field arg snippet active-field))) +- (yas--letenv (yas--snippet-expand-env snippet) +- ;; Apply transform to active field. +- (when active-field +- (let ((yas-moving-away-p t)) +- (when (yas--field-update-display active-field) +- (yas--update-mirrors snippet)))) +- ;; Now actually move... +- (if target-field +- (yas--move-to-field snippet target-field) +- (yas-exit-snippet snippet))))) ++ (and-let* ((active-field (overlay-get yas--active-field-overlay 'yas--field)) ++ (snippet (car (yas-active-snippets (yas--field-start active-field) ++ (yas--field-end active-field))))) ++ (let ((target-field (yas--find-next-field arg snippet active-field))) ++ (yas--letenv (yas--snippet-expand-env snippet) ++ ;; Apply transform to active field. ++ (when active-field ++ (let ((yas-moving-away-p t)) ++ (when (yas--field-update-display active-field) ++ (yas--update-mirrors snippet)))) ++ ;; Now actually move... ++ (if target-field ++ (yas--move-to-field snippet target-field) ++ (yas-exit-snippet snippet)))))) + + (defun yas--place-overlays (snippet field) + "Correctly place overlays for SNIPPET's FIELD." +-- +2.41.0 + diff --git a/gnu/packages/patches/emacs-yasnippet-fix-tests.patch b/gnu/packages/patches/emacs-yasnippet-fix-tests.patch index c70cc75d92..5995b0afa4 100644 --- a/gnu/packages/patches/emacs-yasnippet-fix-tests.patch +++ b/gnu/packages/patches/emacs-yasnippet-fix-tests.patch @@ -10,6 +10,11 @@ Content-Transfer-Encoding: 8bit - A test that was temporarily broken passes again. - The default for ‘org-adapt-indentation’ has changed. - buffer-list may be called with arguments when native-comp is enabled. + +2023-08-19 Liliana Marie Prikler + + * delete-numberless-inner-snippet-issue-562: Correct value in + looking-at. --- yasnippet-tests.el | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) @@ -26,6 +31,15 @@ index f7ca2bb..7618ab7 100644 ;; Author: João Távora ;; Keywords: emulations, convenience +@@ -289,7 +289,7 @@ attention to case differences." + (should (looking-at "testblable")) + (ert-simulate-command '(yas-next-field-or-maybe-expand)) + (ert-simulate-command '(yas-skip-and-clear-field)) +- (should (looking-at "ble")) ++ (should (looking-at "blable")) + (should (null (yas-active-snippets))))) + + (ert-deftest delete-nested-simple-field-issue-824 () @@ -556,16 +556,19 @@ XXXXX ------------------------")))) (yas-mock-insert "foo bar") (ert-simulate-command '(yas-next-field)) -- cgit v1.2.3 From 506d6ce080bf4c7928d44891315afd1046f10db1 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Tue, 29 Aug 2023 11:23:30 +0800 Subject: gnu: emacs-rainbow-delimiters: Fix tests. * gnu/packages/emacs-xyz.scm (emacs-rainbow-delimiters): Adjust tests for Emacs 29. Signed-off-by: Andrew Tropin --- gnu/packages/emacs-xyz.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 3514ae5fbe..1318ac57ae 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -14171,6 +14171,12 @@ (define-public emacs-rainbow-delimiters (url "https://github.com/Fanael/rainbow-delimiters") (commit version))) (file-name (git-file-name name version)) + ;; Fix tests for Emacs 29 + ;; https://github.com/Fanael/rainbow-delimiters/pull/78 + (modules '((guix build utils))) + (snippet '(substitute* "rainbow-delimiters-test.el" + (("category c-type " all) + (string-append all "c-<>-c-types-set ")))) (sha256 (base32 "179mzsd8nvlr0ym9zf9fgdngsgxj3kdgbjblynliirsyk05ssrwc")))) -- cgit v1.2.3 From 16cc7b96783666afdf02754744b4e256a735c603 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 1 Sep 2023 00:53:18 -0400 Subject: gnu: emacs: Use lexical binding for guix-emacs.el startup library. * gnu/packages/aux-files/emacs/guix-emacs.el: Declare LEXCICAL-BINDING file variable to true. Signed-off-by: Liliana Marie Prikler --- gnu/packages/aux-files/emacs/guix-emacs.el | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu') diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el b/gnu/packages/aux-files/emacs/guix-emacs.el index 708093267d..c98e7fe369 100644 --- a/gnu/packages/aux-files/emacs/guix-emacs.el +++ b/gnu/packages/aux-files/emacs/guix-emacs.el @@ -1,3 +1,4 @@ +;;; -*- lexical-binding: t; -*- ;;; guix-emacs.el --- Emacs packages installed with Guix ;; Copyright © 2014, 2015, 2016, 2017 Alex Kost -- cgit v1.2.3 From d3bf08872be0af1d0de3e4302ab646b3a22bf5ca Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 1 Sep 2023 00:53:19 -0400 Subject: gnu: emacs: Factorize a ‘guix-emacs--subdirs-files’ procedure. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs--subdirs-files): New procedure. (guix-emacs-load-package-descriptors): Use it. Signed-off-by: Liliana Marie Prikler --- gnu/packages/aux-files/emacs/guix-emacs.el | 34 ++++++++++++++++++------------ 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el b/gnu/packages/aux-files/emacs/guix-emacs.el index c98e7fe369..4db7ec28c9 100644 --- a/gnu/packages/aux-files/emacs/guix-emacs.el +++ b/gnu/packages/aux-files/emacs/guix-emacs.el @@ -3,7 +3,7 @@ ;; Copyright © 2014, 2015, 2016, 2017 Alex Kost ;; Copyright © 2017 Kyle Meyer -;; Copyright © 2019 Maxim Cournoyer +;; Copyright © 2019, 2023 Maxim Cournoyer ;; This file is part of GNU Guix. @@ -47,6 +47,13 @@ The files in the list do not have extensions (.el, .elc)." (string-match-p "/share/emacs/site-lisp" dir)) load-path)) +(defun guix-emacs--subdirs-files () + "Return the Guix subdirs.el files found on the (non-core) load path." + (seq-filter #'file-exists-p + (mapcar (lambda (dir) + (expand-file-name "subdirs.el" dir)) + (guix-emacs--non-core-load-path)))) + ;;;###autoload (defun guix-emacs-autoload-packages () "Autoload Emacs packages found in EMACSLOADPATH. @@ -63,19 +70,18 @@ The files in the list do not have extensions (.el, .elc)." ;;;###autoload (defun guix-emacs-load-package-descriptors () "Load descriptors for packages found in EMACSLOADPATH via subdirs.el." - (dolist (dir (guix-emacs--non-core-load-path)) - (let ((subdirs-file (expand-file-name "subdirs.el" dir))) - (when (file-exists-p subdirs-file) - (with-temp-buffer - (insert-file-contents subdirs-file) - (goto-char (point-min)) - (let ((subdirs (read (current-buffer)))) - (and (equal (car-safe subdirs) 'normal-top-level-add-to-load-path) - (equal (car-safe (cadr subdirs)) 'list) - (dolist (subdir (cdadr subdirs)) - (let ((pkg-dir (expand-file-name subdir dir))) - (when (file-directory-p pkg-dir) - (package-load-descriptor pkg-dir))))))))))) + (dolist (subdirs-file (guix-emacs--subdirs-files)) + (with-temp-buffer + (insert-file-contents subdirs-file) + (goto-char (point-min)) + (let ((subdirs (read (current-buffer)))) + (and (equal (car-safe subdirs) 'normal-top-level-add-to-load-path) + (equal (car-safe (cadr subdirs)) 'list) + (dolist (subdir (cdadr subdirs)) + (let ((pkg-dir (expand-file-name + subdir (file-name-directory subdirs-file)))) + (when (file-directory-p pkg-dir) + (package-load-descriptor pkg-dir))))))))) ;; If emacs built with tree-sitter, read the value of the environment variable ;; to make tree-sitter grammars available in emacs out-of-the-box. -- cgit v1.2.3 From 05e4b3cba8f0d3eb0f39a34d1b8681a7e1b886a3 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 1 Sep 2023 00:53:20 -0400 Subject: gnu: emacs: Allow producing verbose messages when loading autoloads. * gnu/packages/aux-files/emacs/guix-emacs.el: Expound commentary. (guix-emacs-verbose): New variable. (guix-emacs--load-file-no-error): New procedure. (guix-emacs-autoload-packages): Use it. Signed-off-by: Liliana Marie Prikler --- gnu/packages/aux-files/emacs/guix-emacs.el | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el b/gnu/packages/aux-files/emacs/guix-emacs.el index 4db7ec28c9..84284dde39 100644 --- a/gnu/packages/aux-files/emacs/guix-emacs.el +++ b/gnu/packages/aux-files/emacs/guix-emacs.el @@ -22,8 +22,9 @@ ;;; Commentary: -;; This file provides auxiliary code to autoload Emacs packages -;; installed with Guix. +;; This file provides auxiliary code to autoload Emacs packages installed with +;; Guix. To produce verbose messages useful while debugging, set the +;; GUIX-EMACS-VERBOSE variable to true. ;;; Code: (require 'seq) @@ -41,6 +42,15 @@ The files in the list do not have extensions (.el, .elc)." (directory-files directory 'full-name guix-emacs-autoloads-regexp)))) +(defcustom guix-emacs-verbose nil + "Set to true to provide verbose messages, such as when loading packages." + :type 'boolean + :group 'guix-emacs) + +(defun guix-emacs--load-file-no-error (file) + "Load FILE, ignoring any errors" + (load file 'noerror (not guix-emacs-verbose))) + (defun guix-emacs--non-core-load-path () ;; Filter out core Elisp directories, which are already handled by Emacs. (seq-filter (lambda (dir) @@ -63,9 +73,7 @@ The files in the list do not have extensions (.el, .elc)." (interactive) (let ((autoloads (mapcan #'guix-emacs-find-autoloads (guix-emacs--non-core-load-path)))) - (mapc (lambda (f) - (load f 'noerror t)) - autoloads))) + (mapc #'guix-emacs--load-file-no-error autoloads))) ;;;###autoload (defun guix-emacs-load-package-descriptors () -- cgit v1.2.3 From b02ad19305b8b35444e517318e85fefc4c8a31c9 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 1 Sep 2023 00:53:21 -0400 Subject: gnu: emacs: Reload subdirs.el files in ‘guix-emacs-autoload-packages’. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a regression introduced with 79cfe30f3 ("build-system: emacs: Use subdirectories again.") which caused the 'guix-emacs-autoload-packages' to no longer be able to autoload all packages. * gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-autoload-packages): Reload subdirs.el files unless NO-RELOAD is provided. Update docstring. * doc/guix.texi (Application Setup): Document that ‘guix-emacs-autoload-packages’ can be invoked interactively to auto-reload newly installed Emacs packages. * gnu/packages/emacs.scm (emacs)[arguments]<#:phases>: Call guix-emacs-autoload-packages with an argument in the site-start.el file. Signed-off-by: Liliana Marie Prikler --- doc/guix.texi | 11 +++++++---- gnu/packages/aux-files/emacs/guix-emacs.el | 15 ++++++++++++--- gnu/packages/emacs.scm | 2 +- 3 files changed, 20 insertions(+), 8 deletions(-) (limited to 'gnu') diff --git a/doc/guix.texi b/doc/guix.texi index 6105195bd9..89306c0b45 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2167,12 +2167,15 @@ which they are installed. The Elisp libraries are made available to Emacs through the @env{EMACSLOADPATH} environment variable, which is set when installing Emacs itself. +@cindex guix-emacs-autoload-packages, refreshing Emacs packages Additionally, autoload definitions are automatically evaluated at the initialization of Emacs, by the Guix-specific -@code{guix-emacs-autoload-packages} procedure. If, for some reason, you -want to avoid auto-loading the Emacs packages installed with Guix, you -can do so by running Emacs with the @option{--no-site-file} option -(@pxref{Init File,,, emacs, The GNU Emacs Manual}). +@code{guix-emacs-autoload-packages} procedure. This procedure can be +interactively invoked to have newly installed Emacs packages discovered, +without having to restart Emacs. If, for some reason, you want to avoid +auto-loading the Emacs packages installed with Guix, you can do so by +running Emacs with the @option{--no-site-file} option (@pxref{Init +File,,, emacs, The GNU Emacs Manual}). @quotation Note Emacs can now compile packages natively. Under the default diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el b/gnu/packages/aux-files/emacs/guix-emacs.el index 84284dde39..c253e64df8 100644 --- a/gnu/packages/aux-files/emacs/guix-emacs.el +++ b/gnu/packages/aux-files/emacs/guix-emacs.el @@ -65,12 +65,21 @@ The files in the list do not have extensions (.el, .elc)." (guix-emacs--non-core-load-path)))) ;;;###autoload -(defun guix-emacs-autoload-packages () +(defun guix-emacs-autoload-packages (&optional no-reload) "Autoload Emacs packages found in EMACSLOADPATH. 'Autoload' means to load the 'autoloads' files matching -`guix-emacs-autoloads-regexp'." - (interactive) +`guix-emacs-autoloads-regexp'. By default, the subdirs.el files +found on the load path are reloaded to discover newly installed +packages, unless NO-RELOAD is provided." + (interactive "P") + ;; Reload the subdirs.el files such as the one generated by the Guix profile + ;; hook, so that newly installed Emacs packages located under + ;; sub-directories are put on the load-path without having to restart Emacs. + (unless no-reload + (mapc #'guix-emacs--load-file-no-error (guix-emacs--subdirs-files)) + (setq load-path (delete-dups load-path))) + (let ((autoloads (mapcan #'guix-emacs-find-autoloads (guix-emacs--non-core-load-path)))) (mapc #'guix-emacs--load-file-no-error autoloads))) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index cbdc0598b1..25bfe40774 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -209,7 +209,7 @@ (define* (emacs-byte-compile-directory dir) (display (string-append "(when (require 'guix-emacs nil t)\n" - " (guix-emacs-autoload-packages)\n" + " (guix-emacs-autoload-packages 'no-reload)\n" " (advice-add 'package-load-all-descriptors" " :after #'guix-emacs-load-package-descriptors))")))) ;; Remove the extraneous subdirs.el file, as it causes Emacs to -- cgit v1.2.3 From 6750c114e3e988249f4069d0180316c6d0192350 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sat, 2 Sep 2023 00:09:37 +0200 Subject: gnu: guix-emacs: Reword docstrings. The current documentation strings cause compilation warnings; thus improve them. * gnu/packages/aux-files/emacs/guix-emacs.el (guix-emacs-autoload-regexp) (guix-emacs-find-autoloads, guix-emacs-autoload-packages): Make do without quoting 'autoload'. Reserve quotation to variables and functions. --- gnu/packages/aux-files/emacs/guix-emacs.el | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/aux-files/emacs/guix-emacs.el b/gnu/packages/aux-files/emacs/guix-emacs.el index c253e64df8..265c8bde16 100644 --- a/gnu/packages/aux-files/emacs/guix-emacs.el +++ b/gnu/packages/aux-files/emacs/guix-emacs.el @@ -32,10 +32,14 @@ (defvar guix-emacs-autoloads-regexp (rx (* any) "-autoloads.el" (zero-or-one "c") string-end) - "Regexp to match Emacs 'autoloads' file.") + "Regexp to match files containing autoload definitions. + +Historically, this used to be the package name followed by \"-autoloads.el\". +As of Emacs 29, the term \"loaddefs\" is preferred over \"autoloads\", +but they function much in the same manner.") (defun guix-emacs-find-autoloads (directory) - "Return a list of Emacs 'autoloads' files in DIRECTORY. + "Return a list of files containing autoload definitions in DIRECTORY. The files in the list do not have extensions (.el, .elc)." ;; `directory-files' doesn't honor group in regexp. (delete-dups (mapcar #'file-name-sans-extension @@ -66,12 +70,12 @@ The files in the list do not have extensions (.el, .elc)." ;;;###autoload (defun guix-emacs-autoload-packages (&optional no-reload) - "Autoload Emacs packages found in EMACSLOADPATH. + "Load autoload definitions for packages in `load-path'. -'Autoload' means to load the 'autoloads' files matching -`guix-emacs-autoloads-regexp'. By default, the subdirs.el files -found on the load path are reloaded to discover newly installed -packages, unless NO-RELOAD is provided." +Autoload definitions are contained within files matching +`guix-emacs-autoload-regexp'; load each file matching that regexp. +When NO-RELOAD is nil (the default), also evaluate any subdirs.el files +found in `load-path' to discover newly installed packages." (interactive "P") ;; Reload the subdirs.el files such as the one generated by the Guix profile ;; hook, so that newly installed Emacs packages located under -- cgit v1.2.3 From 1aa5537dfe8bb1ce614fd3577f0f93dc63fc00b4 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sat, 9 Sep 2023 12:40:18 +0200 Subject: gnu: Add emacs-next-minimal. * gnu/packages/emacs.scm (emacs-next-minimal): New variable. --- gnu/packages/emacs.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gnu') diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 25bfe40774..469c5e36f2 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -482,6 +482,23 @@ (define-public emacs-wide-int ((#:configure-flags flags) #~(cons "--with-wide-int" #$flags)))))) +(define-public emacs-next-minimal + (let ((commit "9d27b95b263473fb41a30e3f6ea5607c99e93a61") + (revision "1")) + (package + (inherit emacs-minimal) + (name "emacs-next-minimal") + (version (git-version "30.0.50" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/emacs.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "00mwpq1msr3jij281w5piqmbwq968xr8dn9hqbf4r947ck754kn9"))))))) + (define-public guile-emacs (let ((commit "41120e0f595b16387eebfbf731fff70481de1b4b") (revision "0")) -- cgit v1.2.3 From f65a727cb3f67970a9403f91a15c9b47da0796d8 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sat, 9 Sep 2023 16:29:07 +0200 Subject: gnu: Add emacs-next. * gnu/packages/emacs.scm (emacs->emacs-next, emacs-next): New variable. --- gnu/packages/emacs.scm | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 469c5e36f2..1be58bd5c1 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -86,7 +86,8 @@ (define-module (gnu packages emacs) #:use-module (gnu packages xorg) #:use-module (guix utils) #:use-module (ice-9 match) - #:use-module (srfi srfi-1)) + #:use-module (srfi srfi-1) + #:export (emacs->emacs-next)) (define (%emacs-modules build-system) (let ((which (build-system-name build-system))) @@ -499,6 +500,21 @@ (define-public emacs-next-minimal (sha256 (base32 "00mwpq1msr3jij281w5piqmbwq968xr8dn9hqbf4r947ck754kn9"))))))) +(define* (emacs->emacs-next emacs #:optional name + #:key (version (package-version emacs-next-minimal)) + (source (package-source emacs-next-minimal))) + (package + (inherit emacs) + (name (or name + (and (string-prefix? "emacs" (package-name emacs)) + (string-append "emacs-next" + (string-drop (package-name emacs) + (string-length "emacs")))))) + (version version) + (source source))) + +(define-public emacs-next (emacs->emacs-next emacs)) + (define-public guile-emacs (let ((commit "41120e0f595b16387eebfbf731fff70481de1b4b") (revision "0")) -- cgit v1.2.3 From cef9f37999f321905b9e135fef104e65de1e5a0b Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sat, 9 Sep 2023 16:30:06 +0200 Subject: gnu: Add emacs-next-pgtk. * gnu/packages/emacs.scm (emacs-next-pgtk): New variable. --- gnu/packages/emacs.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu') diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 1be58bd5c1..6edb69a51d 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -514,6 +514,7 @@ (define* (emacs->emacs-next emacs #:optional name (source source))) (define-public emacs-next (emacs->emacs-next emacs)) +(define-public emacs-next-pgtk (emacs->emacs-next emacs-pgtk)) (define-public guile-emacs (let ((commit "41120e0f595b16387eebfbf731fff70481de1b4b") -- cgit v1.2.3 From e12610bededc7e106440e4763030f3d3044ec6f0 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sat, 9 Sep 2023 16:32:31 +0200 Subject: gnu: Add emacs-next-pgtk-xwidgets. * gnu/packages/emacs.scm (emacs-next-pgtk-xwidgets): New variable. --- gnu/packages/emacs.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu') diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 6edb69a51d..d16da64cb5 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -515,6 +515,7 @@ (define* (emacs->emacs-next emacs #:optional name (define-public emacs-next (emacs->emacs-next emacs)) (define-public emacs-next-pgtk (emacs->emacs-next emacs-pgtk)) +(define-public emacs-next-pgtk-xwidgets (emacs->emacs-next emacs-pgtk-xwidgets)) (define-public guile-emacs (let ((commit "41120e0f595b16387eebfbf731fff70481de1b4b") -- cgit v1.2.3 From 95ddf01d11bc0085d810e19c6d44c6d06b4fffee Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sat, 9 Sep 2023 16:33:04 +0200 Subject: gnu: Add emacs-next-tree-sitter. This package currently exists on master, where both emacs and emacs-next are built without tree-sitter. Since most of our Emacsen now build with tree-sitter, it is no longer needed, but let's issue a warning rather than a hard error to those who rely on it. * gnu/packages/emacs.scm (emacs-next-tree-sitter): New variable. --- gnu/packages/emacs.scm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gnu') diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index d16da64cb5..72b2c7795e 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -516,6 +516,8 @@ (define* (emacs->emacs-next emacs #:optional name (define-public emacs-next (emacs->emacs-next emacs)) (define-public emacs-next-pgtk (emacs->emacs-next emacs-pgtk)) (define-public emacs-next-pgtk-xwidgets (emacs->emacs-next emacs-pgtk-xwidgets)) +(define-public emacs-next-tree-sitter + (deprecated-package "emacs-next-tree-sitter" emacs-next)) (define-public guile-emacs (let ((commit "41120e0f595b16387eebfbf731fff70481de1b4b") -- cgit v1.2.3 From 74873c5746607813a41b1606a24b4b090a532e8b Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Fri, 15 Sep 2023 19:18:14 +0200 Subject: gnu: emacs-go-mode: Fix build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/emacs-xyz.scm (emacs-go-mode)[fix-tests]: Also fix duplicate “go--fill-paragraph-block-region” test. --- gnu/packages/emacs-xyz.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index c4a2fe3ba1..c20909b843 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -4873,7 +4873,9 @@ (define-public emacs-go-mode (make-file-writable test-file) (substitute* test-file (("testdata/indentation_tests/" all) - (string-append "test/" all))))))))) + (string-append "test/" all))) + (ert-number-tests "test/go-fill-paragraph-test.el" + "go--fill-paragraph-block-region"))))))) (build-system emacs-build-system) (native-inputs (list emacs-ert-runner)) (home-page "https://github.com/dominikh/go-mode.el") -- cgit v1.2.3 From 187f64299887a6e2dc09b74dc1cce9f161c2c7f6 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Fri, 15 Sep 2023 20:17:07 +0200 Subject: gnu: emacs-lispy: Fix build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/emacs-xyz.scm (emacs-lispy)[#:phases]: Rename ‘remove-failing-test’ to ‘fix-tests’. Adjust to new failures with Emacs 29. --- gnu/packages/emacs-xyz.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index c20909b843..b15b769103 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -12753,11 +12753,16 @@ (define-public emacs-lispy (add-before 'check 'make-test-writable (lambda _ (make-file-writable "lispy-test.el"))) - (add-before 'check 'remove-failing-test + (add-before 'check 'fix-tests (lambda _ + (ert-number-tests "lispy-test.el" "lispy-outline-add") + (ert-number-tests "lispy-test.el" "lispy-ace-subword") (emacs-batch-edit-file "lispy-test.el" `(progn - (dolist (test '("lispy-eval-python-str" "lispy--clojure-dot-object")) + (dolist (test '("lispy-eval-python-str" + "lispy-outline-add-0" + "lispy--clojure-dot-object" + "lispy--pretty-args")) (goto-char (point-min)) (re-search-forward (concat "ert-deftest " test)) -- cgit v1.2.3 From 66abcaacde92ea2aa92546a1cb6d11311dab161f Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Fri, 15 Sep 2023 20:35:59 +0200 Subject: gnu: emacs-elfeed-org: Fix build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/emacs-xyz.scm (emacs-elfeed-org)[#:phases]: Add ‘xt-number-tests’. --- gnu/packages/emacs-xyz.scm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index b15b769103..95217aea1a 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -13840,7 +13840,22 @@ (define-public emacs-elfeed-org (modify-phases %standard-phases (add-before 'check 'chmod (lambda _ - (chmod "test/fixture-mark-feed-ignore.org" #o644)))))) + (chmod "test/fixture-mark-feed-ignore.org" #o644))) + (add-before 'check 'xt-number-tests + (lambda _ + ((lambda (file test-name) ; variant of ert-number-tests + (emacs-batch-edit-file file + `(let ((i 0)) + (while (re-search-forward ,(string-append "xt-deftest " + test-name) + nil t) + (goto-char (match-beginning 0)) + (kill-region (match-beginning 0) (match-end 0)) + (insert (format "xt-deftest %s-%d" ,test-name i)) + (setq i (+ i 1))) + (basic-save-buffer)))) + "test/elfeed-org-test.el" + "rmh-elfeed-org-convert-headline-to-tagger-params")))))) (propagated-inputs (list emacs-elfeed emacs-org emacs-dash emacs-s)) (native-inputs -- cgit v1.2.3 From 30a339b364b779049a81715cea21583943d84d2b Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Fri, 15 Sep 2023 20:43:47 +0200 Subject: gnu: emacs-matcha: Update to 0.0.1-2.dc4a940. * gnu/packages/emacs-xyz.scm (emacs-matcha): Update to 0.0.1-2.dc4a940. --- gnu/packages/emacs-xyz.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 95217aea1a..4ca6b62026 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -30321,10 +30321,10 @@ (define-public emacs-forge (license license:gpl3+))) (define-public emacs-matcha - (let ((commit "c7df5cf5cdac9ae369e241342389ccda0205eab9")) + (let ((commit "dc4a940b3360aadeb2d9eaab7bd0c85e1e85ab76")) (package (name "emacs-matcha") - (version (git-version "0.0.1" "1" commit)) ;no upstream release + (version (git-version "0.0.1" "2" commit)) ;no upstream release (source (origin (method git-fetch) (uri (git-reference @@ -30333,7 +30333,7 @@ (define-public emacs-matcha (file-name (git-file-name name version)) (sha256 (base32 - "1lfnh1glg6al677m7ci0x8g5wjdhjxlfl3nv1f1ppsw4dpnwsj9b")))) + "1bljnv5z289hxn73y7krbd0wya6acnwphabxwfajilpc118qz3lp")))) (propagated-inputs (list emacs-hydra)) (build-system emacs-build-system) (home-page "https://github.com/jojojames/matcha/") -- cgit v1.2.3 From 73388a1a19787f8be011a25fd497e48fef9b3aba Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Fri, 15 Sep 2023 20:48:12 +0200 Subject: gnu: emacs-ob-go: Fix build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/emacs-xyz.scm (emacs-ob-go)[#:phases]: Add ‘ert-number-tests’. --- gnu/packages/emacs-xyz.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 4ca6b62026..01c9273ac4 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -7437,7 +7437,14 @@ (define-public emacs-ob-go #:test-command #~(list "emacs" "--batch" "-L" "." "--eval=(require 'ob-go)" "-l" "test-ob-go.el" - "-f" "ert-run-tests-batch-and-exit"))) + "-f" "ert-run-tests-batch-and-exit") + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'ert-number-tests + (lambda _ + (ert-number-tests "test-ob-go.el" + "ob-go/string-variables") + (ert-number-tests "test-ob-go.el" + "ob-go/imports")))))) (home-page "https://github.com/pope/ob-go") (synopsis "Org Babel support for evaluating Go code") (description "@code{ob-go} enables Org Babel support for evaluating Go -- cgit v1.2.3 From 3c7cbaf461919c8c11185b2a040cb152797c28d7 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Fri, 15 Sep 2023 21:03:21 +0200 Subject: gnu: emacs-pyvenv: Fix build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/emacs-xyz.scm (emacs-pyvenv)[#:phases]: Add ‘ert-number-tests’. --- gnu/packages/emacs-xyz.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 01c9273ac4..6b4c23290c 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -14124,7 +14124,11 @@ (define-public emacs-pyvenv (modify-phases %standard-phases ;; This phase incorrectly attempts to substitute "activate" and fails ;; doing so. - (delete 'patch-el-files)) + (delete 'patch-el-files) + (add-after 'unpack 'ert-number-tests + (lambda _ + (ert-number-tests "test/pyvenv-hook-dir-test.el" + "pyvenv-hook-dir")))) #:tests? #t #:test-command '("ert-runner"))) (native-inputs -- cgit v1.2.3 From 10664c0f1c351eae24629127d97fe23f5e18a93c Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Fri, 15 Sep 2023 21:11:56 +0200 Subject: gnu: emacs-rjsx-mode: Fix build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/emacs-xyz.scm (emacs-rjsx-mode)[#:phases]: Add ‘js2-number-tests’. --- gnu/packages/emacs-xyz.scm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 6b4c23290c..6ca833b484 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -31014,7 +31014,25 @@ (define-public emacs-rjsx-mode (list emacs-js2-mode)) (arguments `(#:tests? #t - #:test-command '("make" "test"))) + #:test-command '("make" "test") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'js2-number-tests + (lambda _ + ((lambda (file test-name) ; variant of ert-number-tests + (emacs-batch-edit-file file + `(let ((i 0)) + (while (re-search-forward + ,(string-append "js2-deftest-parse " + test-name) + nil t) + (goto-char (match-beginning 0)) + (kill-region (match-beginning 0) (match-end 0)) + (insert (format "xt-deftest %s-%d" ,test-name i)) + (setq i (+ i 1))) + (basic-save-buffer)))) + "rjsx-tests.el.el" + "no-attr-no-children-self-closing")))))) (home-page "https://github.com/felipeochoa/rjsx-mode") (synopsis "Major mode for JSX files") (description "This package extends the parser of @code{js2-mode} to -- cgit v1.2.3