GNU bug report logs - #57993
[PATCH] gnu: emacs-volatile-highlights: Emit deprecation messages.

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Thu, 22 Sep 2022 01:24:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57993 in the body.
You can then email your comments to 57993 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#57993; Package guix-patches. (Thu, 22 Sep 2022 01:24:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hilton Chain <hako <at> ultrarare.space>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 22 Sep 2022 01:24:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: emacs-volatile-highlights: Emit deprecation messages.
Date: Thu, 22 Sep 2022 09:23:15 +0800
* gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/emacs-xyz.scm (emacs-volatile-highlights)[patches]: Add
emacs-volatile-highlights-use-cl-lib.patch
---
 gnu/local.mk                                  |   1 +
 gnu/packages/emacs-xyz.scm                    |   6 +-
 ...emacs-volatile-highlights-use-cl-lib.patch | 159 ++++++++++++++++++
 3 files changed, 165 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index ef1bae5f3c..d85c5992da 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1054,6 +1054,7 @@ dist_patch_DATA =						\
   %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-volatile-highlights-use-cl-lib.patch	\
   %D%/packages/patches/emacs-wordnut-require-adaptive-wrap.patch	\
   %D%/packages/patches/emacs-yasnippet-fix-tests.patch	\
   %D%/packages/patches/emacs-kv-fix-tests.patch	\
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 32e4c33f16..05ec770637 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -32319,7 +32319,11 @@ (define-public emacs-volatile-highlights
              (file-name (git-file-name name version))
              (sha256
               (base32
-               "1dsa6769lphyyv7yg92vkkpk395w52q4m7hdn8xy7s6lh5c6a955"))))
+               "1dsa6769lphyyv7yg92vkkpk395w52q4m7hdn8xy7s6lh5c6a955"))
+             (patches
+              (search-patches
+               ;; https://github.com/k-talo/volatile-highlights.el/pull/22
+               "emacs-volatile-highlights-use-cl-lib.patch"))))
     (build-system emacs-build-system)
     (home-page "http://github.com/k-talo/volatile-highlights.el")
     (synopsis "Emacs minor mode for visual feedback on some operations")
diff --git a/gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch b/gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch
new file mode 100644
index 0000000000..daf1eb6faa
--- /dev/null
+++ b/gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch
@@ -0,0 +1,159 @@
+From f5801779ba3e8f52020a34313fdfaa55f6c0c967 Mon Sep 17 00:00:00 2001
+From: Joerg Bornemann <emacs <at> jbornemann.de>
+Date: Fri, 14 Jan 2022 22:31:39 +0100
+Subject: [PATCH 1/3] Use cl-lib instead of the deprecated cl package
+
+---
+ volatile-highlights.el | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/volatile-highlights.el b/volatile-highlights.el
+index e946afd..c1d7f2e 100644
+--- a/volatile-highlights.el
++++ b/volatile-highlights.el
+@@ -195,7 +195,7 @@
+ (defconst vhl/version "1.8")
+ 
+ (eval-when-compile
+-  (require 'cl)
++  (require 'cl-lib)
+   (require 'easy-mmode)
+   (require 'advice))
+ 
+@@ -409,7 +409,7 @@ Optional args are the same as `vhl/add-range'."
+   (let ((fn-on  (intern (format "vhl/ext/%s/on" sym)))
+         (fn-off (intern (format "vhl/ext/%s/off" sym)))
+         (cust-name (intern (format "vhl/use-%s-extension-p" sym))))
+-    (pushnew sym vhl/.installed-extensions)
++    (cl-pushnew sym vhl/.installed-extensions)
+     (eval `(defcustom ,cust-name t
+              ,(format "A flag if highlighting support for `%s' is on or not." sym)
+              :type 'boolean
+@@ -532,34 +532,34 @@ would be listed in english.
+ This is included as a private support function for generating
+ lists of symbols to be included docstrings of auto-generated
+ extensions."
+-  (assert (listp items))
++  (cl-assert (listp items))
+   (cond ((null items)
+          ;; Zero items
+          "")
+         ((null (cdr items))
+          ;; One item
+-         (assert (stringp (first items)))
+-         (format "%s" (first items)))
++         (cl-assert (stringp (cl-first items)))
++         (format "%s" (cl-first items)))
+         ((null (cddr items))
+          ;; Two items
+-         (assert (stringp (first items)))
+-         (assert (stringp (second items)))
++         (cl-assert (stringp (cl-first items)))
++         (cl-assert (stringp (cl-second items)))
+          (apply 'format "%s and %s" items))
+         ((null (cdddr items))
+          ;; Three items
+-         (assert (stringp (first items)))
+-         (assert (stringp (second items)))
+-         (assert (stringp (third items)))
++         (cl-assert (stringp (cl-first items)))
++         (cl-assert (stringp (cl-second items)))
++         (cl-assert (stringp (third items)))
+          (apply 'format "%s, %s, and %s" items))
+         (t
+          ;; 4 or more items
+-         (format "%s, %s" (first items) (vhl/.make-list-string (rest items)))))))
++         (format "%s, %s" (cl-first items) (vhl/.make-list-string (rest items)))))))
+ 
+ ;; The following makes it trivial to define simple vhl extensions
+ (defmacro vhl/define-extension (name &rest functions)
+   "Define a VHL extension called NAME that applies standard VHL
+   advice to each of FUNCTIONS."
+-  (assert (first functions))
++  (cl-assert (cl-first functions))
+   (let* ((name-string (symbol-name (eval name)))
+          (function-list-string (vhl/.make-list-string
+                                 (mapcar (lambda (f) (format "`%s'" (symbol-name (eval f))))
+
+From 1480383952ac46b7d76df749a8ff7565303bc184 Mon Sep 17 00:00:00 2001
+From: Joerg Bornemann <emacs <at> jbornemann.de>
+Date: Fri, 14 Jan 2022 22:31:32 +0100
+Subject: [PATCH 2/3] Use lexical-binding to get rid of lexical-let
+
+This should be safe as the byte compiler does not warn about free
+variables.
+---
+ volatile-highlights.el | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/volatile-highlights.el b/volatile-highlights.el
+index d12b336..e946afd 100644
+--- a/volatile-highlights.el
++++ b/volatile-highlights.el
+@@ -1,4 +1,4 @@
+-;;; volatile-highlights.el --- Minor mode for visual feedback on some operations.
++;;; volatile-highlights.el --- Minor mode for visual feedback on some operations. -*- lexical-binding: t; -*-
+ 
+ ;; Copyright (C) 2001, 2010-2016 K-talo Miyazaki, all rights reserved.
+ 
+@@ -671,7 +671,7 @@ extensions."
+   "Turn on volatile highlighting for `occur'."
+   (interactive)
+ 
+-  (lexical-let ((*occur-str* nil)) ;; Text in current line.
++  (let ((*occur-str* nil)) ;; Text in current line.
+     (defun vhl/ext/occur/.pre-hook-fn ()
+       (save-excursion
+         (let* ((bol (progn (beginning-of-line) (point)))
+
+From 5e017d2e4a88acc562d90775cf9c746be2d7f277 Mon Sep 17 00:00:00 2001
+From: Joerg Bornemann <emacs <at> jbornemann.de>
+Date: Fri, 14 Jan 2022 22:31:19 +0100
+Subject: [PATCH 3/3] Fix trailing whitespace
+
+---
+ volatile-highlights.el | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/volatile-highlights.el b/volatile-highlights.el
+index cb46897..d12b336 100644
+--- a/volatile-highlights.el
++++ b/volatile-highlights.el
+@@ -106,7 +106,7 @@
+ ;;
+ ;;   (vhl/define-extension 'vip 'vip-yank)
+ ;;   (vhl/install-extension 'vip)
+-;;   
++;;
+ ;; - evil-mode
+ ;;
+ ;;   (vhl/define-extension 'evil 'evil-paste-after 'evil-paste-before
+@@ -826,16 +826,16 @@ extensions."
+   (defadvice hs-show-block (around vhl/ext/hideshow/vhl/around-hook (&optional end))
+     (let* ((bol (save-excursion (progn (beginning-of-line) (point))))
+            (eol (save-excursion (progn (end-of-line) (point))))
+-           (ov-folded (car (delq nil 
++           (ov-folded (car (delq nil
+                                  (mapcar #'(lambda (ov)
+                                              (and (overlay-get ov 'hs)
+                                                   ov))
+                                          (overlays-in bol (1+ eol))))))
+            (boov (and ov-folded (overlay-start ov-folded)))
+            (eoov (and ov-folded (overlay-end ov-folded))))
+-    
++
+       ad-do-it
+-    
++
+       (when (and boov eoov)
+         (vhl/add-range boov eoov))))
+   (ad-activate 'hs-show-block))
+@@ -843,7 +843,7 @@ extensions."
+ (defun vhl/ext/hideshow/on ()
+   "Turn on volatile highlighting for `hideshow'."
+   (interactive)
+-  
++
+   (cond
+    ((featurep 'hideshow)
+     (vhl/ext/hideshow/.activate))

base-commit: 1a1ff7ed8fdaae58aff0e8625399cd7354038ca3
-- 
2.37.3





Information forwarded to guix-patches <at> gnu.org:
bug#57993; Package guix-patches. (Fri, 23 Sep 2022 16:30:04 GMT) Full text and rfc822 format available.

Message #8 received at 57993 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Hilton Chain <hako <at> ultrarare.space>
Cc: 57993 <at> debbugs.gnu.org, 57992 <at> debbugs.gnu.org, 57997 <at> debbugs.gnu.org
Subject: Emit != omit
Date: Fri, 23 Sep 2022 18:29:16 +0200
Emit: to throw or give out; "emit a warning" means "print a warning"
Omit: to leave out; "omit a warning" means "not printing a warning even
though you should".

In these cases, you are proactively working against the warnings, i.e.
preventing them.

Cheers




Information forwarded to guix-patches <at> gnu.org:
bug#57993; Package guix-patches. (Sat, 24 Sep 2022 23:43:02 GMT) Full text and rfc822 format available.

Message #11 received at 57993 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 57993 <at> debbugs.gnu.org, 57992 <at> debbugs.gnu.org, 57997 <at> debbugs.gnu.org
Subject: Re: Emit != omit
Date: Sun, 25 Sep 2022 07:41:57 +0800
On Sat, 24 Sep 2022 00:29:16 +0800,
Liliana Marie Prikler wrote:
> 
> Emit: to throw or give out; "emit a warning" means "print a warning"
> Omit: to leave out; "omit a warning" means "not printing a warning even
> though you should".
> 
> In these cases, you are proactively working against the warnings, i.e.
> preventing them.
> 
> Cheers

Oops :P
I'll take care in the future, thank you!




Information forwarded to guix-patches <at> gnu.org:
bug#57993; Package guix-patches. (Sun, 25 Sep 2022 12:57:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Hilton Chain via Guix-patches via <guix-patches <at> gnu.org>
Cc: Hilton Chain <hako <at> ultrarare.space>, 57993-close <at> debbugs.gnu.org
Subject: Re: [bug#57993] [PATCH] gnu: emacs-volatile-highlights: Emit
 deprecation messages.
Date: Sun, 25 Sep 2022 14:56:47 +0200
Hello,

Hilton Chain via Guix-patches via <guix-patches <at> gnu.org> writes:

> * gnu/packages/patches/emacs-volatile-highlights-use-cl-lib.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/emacs-xyz.scm (emacs-volatile-highlights)[patches]: Add
> emacs-volatile-highlights-use-cl-lib.patch

Closing. See bug #57992.

Regards,
-- 
Nicolas Goaziou




Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Sun, 25 Sep 2022 12:57:02 GMT) Full text and rfc822 format available.

Notification sent to Hilton Chain <hako <at> ultrarare.space>:
bug acknowledged by developer. (Sun, 25 Sep 2022 12:57:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 24 Oct 2022 11:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 183 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.