unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [ELPA] Add 'cursory' and 'tmr' packages?
@ 2022-04-21  7:31 Protesilaos Stavrou
  2022-04-21 10:30 ` Philip Kaludercic
  0 siblings, 1 reply; 4+ messages in thread
From: Protesilaos Stavrou @ 2022-04-21  7:31 UTC (permalink / raw)
  To: emacs-devel

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

Hello everyone,

I have two small packages that I would like to offer to GNU ELPA.  See
attached patches.  What they do, in brief:

* cursory :: Lets the user specify presets of cursor configuration, such
  as 'cursor-type' and 'blink-cursor-delay', and switch between them on
  demand.  An example use-case is when one likes to use a block cursor
  with a relatively fast blink rate for day-to-day editing and a bar
  cursor with a slower blink rate while reading.

  <https://git.sr.ht/~protesilaos/cursory>

* tmr :: A set of utilities to set a timer which plays an alarm and
  sends a desktop notification once it elapses.  Timers are set with the
  'tmr' command, which prompts for a unit of time: something like "5" or
  "5m" is read as "5 minutes", while other valid formats include "5s"
  (seconds) and "5h" (hours).  A timer can have an arbitrary description
  associated with it such as "Bake bread".  This is requested when 'tmr'
  is invoked with a prefix argument.  Timers can be cancelled with
  another command: it prompts for completion if there are multiple
  timers else operates on the current one.

  <https://git.sr.ht/~protesilaos/tmr>

Any suggestions or objections?  If not, I will push the changes to
elpa.git.  Thank you!

All the best,
Protesilaos (or simply "Prot")

-- 
Protesilaos Stavrou
https://protesilaos.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-elpa-packages-cursory-New-package.patch --]
[-- Type: text/x-patch, Size: 829 bytes --]

From 3ea6089c24163b5ccd24fcbc7a41b59d9fb100dd Mon Sep 17 00:00:00 2001
Message-Id: <3ea6089c24163b5ccd24fcbc7a41b59d9fb100dd.1650525093.git.info@protesilaos.com>
From: Protesilaos Stavrou <info@protesilaos.com>
Date: Thu, 21 Apr 2022 10:10:49 +0300
Subject: [PATCH] * elpa-packages (cursory): New package

---
 elpa-packages | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/elpa-packages b/elpa-packages
index 93afdab13c..06003bc5fb 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -155,6 +155,10 @@
   :readme "README.org"
   :auto-sync t)
  ("csv-mode"		:url nil)
+ ("cursory"
+  :url "https://git.sr.ht/~protesilaos/cursory"
+  :auto-sync t
+  :ignored-files ("COPYING" "doclicense.texi"))
  ("cycle-quotes"	:url nil)
  ("darkroom"            :url "https://github.com/capitaomorte/darkroom.git")
  ("dash"
-- 
2.36.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0001-elpa-packages-tmr-New-package.patch --]
[-- Type: text/x-patch, Size: 933 bytes --]

From 398dfb48bcd121c3d96e8a0bb07c68e8f649a443 Mon Sep 17 00:00:00 2001
Message-Id: <398dfb48bcd121c3d96e8a0bb07c68e8f649a443.1650524987.git.info@protesilaos.com>
From: Protesilaos Stavrou <info@protesilaos.com>
Date: Thu, 21 Apr 2022 10:09:01 +0300
Subject: [PATCH] * elpa-packages (tmr): New package

---
 elpa-packages | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/elpa-packages b/elpa-packages
index 2a120fd76d..93afdab13c 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -589,6 +589,10 @@
  ("test-simple"         :url "https://github.com/rocky/emacs-test-simple")
  ("timerfunctions"	:url nil)
  ("tiny"		:url "https://github.com/abo-abo/tiny")
+ ("tmr"
+  :url "https://git.sr.ht/~protesilaos/tmr"
+  :auto-sync t
+  :ignored-files ("COPYING" "doclicense.texi"))
  ("tNFA"		:url "http://www.dr-qubit.org/git/predictive.git")
  ("tramp"		:url "git://git.sv.gnu.org/tramp.git"
   :branch "externals/tramp"
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [ELPA] Add 'cursory' and 'tmr' packages?
  2022-04-21  7:31 [ELPA] Add 'cursory' and 'tmr' packages? Protesilaos Stavrou
@ 2022-04-21 10:30 ` Philip Kaludercic
  2022-04-21 12:15   ` Stefan Monnier
  2022-04-21 18:39   ` Protesilaos Stavrou
  0 siblings, 2 replies; 4+ messages in thread
From: Philip Kaludercic @ 2022-04-21 10:30 UTC (permalink / raw)
  To: Protesilaos Stavrou; +Cc: emacs-devel

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

Protesilaos Stavrou <info@protesilaos.com> writes:

> Hello everyone,
>
> I have two small packages that I would like to offer to GNU ELPA.  See
> attached patches.  What they do, in brief:
>
> * cursory :: Lets the user specify presets of cursor configuration, such
>   as 'cursor-type' and 'blink-cursor-delay', and switch between them on
>   demand.  An example use-case is when one likes to use a block cursor
>   with a relatively fast blink rate for day-to-day editing and a bar
>   cursor with a slower blink rate while reading.
>
>   <https://git.sr.ht/~protesilaos/cursory>

I have two little patch suggestions for cursory:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Simplify-the-default-value-of-cursory-presets.patch --]
[-- Type: text/x-patch, Size: 1730 bytes --]

From 2dba452823713bb474f68275bd9883f1f58d594e Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Thu, 21 Apr 2022 12:22:45 +0200
Subject: [PATCH 1/2] Simplify the default value of cursory-presets

---
 cursory.el | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/cursory.el b/cursory.el
index a12ca87..f794e4f 100644
--- a/cursory.el
+++ b/cursory.el
@@ -47,23 +47,24 @@
   :group 'cursor)
 
 (defcustom cursory-presets
-  '((bar . ( :cursor-type (bar . 2)
-	     :cursor-in-non-selected-windows hollow
-	     :blink-cursor-blinks 10
-	     :blink-cursor-interval 0.5
-	     :blink-cursor-delay 0.2))
-
-    (box  . ( :cursor-type box
-	      :cursor-in-non-selected-windows hollow
-	      :blink-cursor-blinks 10
-	      :blink-cursor-interval 0.5
-	      :blink-cursor-delay 0.2))
-
-    (underscore . ( :cursor-type (hbar . 3)
-		    :cursor-in-non-selected-windows hollow
-		    :blink-cursor-blinks 50
-		    :blink-cursor-interval 0.2
-		    :blink-cursor-delay 0.2)))
+  '((bar
+     :cursor-type (bar . 2)
+     :cursor-in-non-selected-windows hollow
+     :blink-cursor-blinks 10
+     :blink-cursor-interval 0.5
+     :blink-cursor-delay 0.2)
+    (box
+     :cursor-type box
+     :cursor-in-non-selected-windows hollow
+     :blink-cursor-blinks 10
+     :blink-cursor-interval 0.5
+     :blink-cursor-delay 0.2)
+    (underscore
+     :cursor-type (hbar . 3)
+     :cursor-in-non-selected-windows hollow
+     :blink-cursor-blinks 50
+     :blink-cursor-interval 0.2
+     :blink-cursor-delay 0.2))
   "Alist of preset configurations for `blink-cursor-mode'.
 
 The car of each cons cell is an arbitrary, user-specified key
-- 
2.34.0


[-- Attachment #3: Type: text/plain, Size: 6 bytes --]


and


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0002-Avoid-overlong-line-when-defining-cursory-latest-sta.patch --]
[-- Type: text/x-patch, Size: 855 bytes --]

From 062ee5c787b43c91744d80a04d31b9e25bc4268a Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Thu, 21 Apr 2022 12:23:11 +0200
Subject: [PATCH 2/2] Avoid overlong line when defining
 cursory-latest-state-file

---
 cursory.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cursory.el b/cursory.el
index f794e4f..dca159c 100644
--- a/cursory.el
+++ b/cursory.el
@@ -105,7 +105,8 @@ as the corresponding variable."
 		   ,(get 'blink-cursor-delay 'custom-type))))
 	  :key-type symbol))
 
-(defcustom cursory-latest-state-file (locate-user-emacs-file "cursory-latest-state")
+(defcustom cursory-latest-state-file
+  (locate-user-emacs-file "cursory-latest-state")
   "File to save the value of `cursory-set-preset'.
 Saving is done by the `cursory-store-latest-preset' function."
   :type 'file
-- 
2.34.0


[-- Attachment #5: Type: text/plain, Size: 185 bytes --]


Also, in `cursory-store-latest-preset' you use lisp-data-mode, but that
was added with Emacs 28.  It shouldn't really be an issue, but "fixing"
it doesn't seem that difficult either:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0001-Use-lisp-data-mode-only-if-avaliable.patch --]
[-- Type: text/x-patch, Size: 964 bytes --]

From 166be273c46bd0c8718307a68cc8890818a98265 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Thu, 21 Apr 2022 12:29:48 +0200
Subject: [PATCH] Use lisp-data-mode only if avaliable

---
 cursory.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/cursory.el b/cursory.el
index dca159c..de1bf4e 100644
--- a/cursory.el
+++ b/cursory.el
@@ -166,8 +166,11 @@ With optional LOCAL as a prefix argument, set the
 Can be assigned to `kill-emacs-hook'."
   (when cursory--style-hist
     (with-temp-file cursory-latest-state-file
-      (insert (concat ";; Auto-generated file;"
-                      " don't edit -*- mode: lisp-data -*-\n"))
+      (insert ";; Auto-generated file; don't edit -*- mode: "
+	      (if (<= 28 emacs-major-version)
+		  "lisp-data"
+		"emacs-lisp")
+	      " -*-\n"))
       (pp (intern (car cursory--style-hist)) (current-buffer)))))
 
 (defvar cursory-recovered-preset nil
-- 
2.34.0


[-- Attachment #7: Type: text/plain, Size: 893 bytes --]


> * tmr :: A set of utilities to set a timer which plays an alarm and
>   sends a desktop notification once it elapses.  Timers are set with the
>   'tmr' command, which prompts for a unit of time: something like "5" or
>   "5m" is read as "5 minutes", while other valid formats include "5s"
>   (seconds) and "5h" (hours).  A timer can have an arbitrary description
>   associated with it such as "Bake bread".  This is requested when 'tmr'
>   is invoked with a prefix argument.  Timers can be cancelled with
>   another command: it prompts for completion if there are multiple
>   timers else operates on the current one.
>
>   <https://git.sr.ht/~protesilaos/tmr>
>
> Any suggestions or objections?  If not, I will push the changes to
> elpa.git.  Thank you!

I wouldn't object, with or without the above patches.

> All the best,
> Protesilaos (or simply "Prot")

-- 
	Philip Kaludercic

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [ELPA] Add 'cursory' and 'tmr' packages?
  2022-04-21 10:30 ` Philip Kaludercic
@ 2022-04-21 12:15   ` Stefan Monnier
  2022-04-21 18:39   ` Protesilaos Stavrou
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2022-04-21 12:15 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: Protesilaos Stavrou, emacs-devel

Philip Kaludercic [2022-04-21 10:30:45] wrote:
> -      (insert (concat ";; Auto-generated file;"
> -                      " don't edit -*- mode: lisp-data -*-\n"))
> +      (insert ";; Auto-generated file; don't edit -*- mode: "
> +	      (if (<= 28 emacs-major-version)
> +		  "lisp-data"
> +		"emacs-lisp")
> +	      " -*-\n"))

BTW, I encourage the use of a `.eld` extension for those
elisp-data files.


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ELPA] Add 'cursory' and 'tmr' packages?
  2022-04-21 10:30 ` Philip Kaludercic
  2022-04-21 12:15   ` Stefan Monnier
@ 2022-04-21 18:39   ` Protesilaos Stavrou
  1 sibling, 0 replies; 4+ messages in thread
From: Protesilaos Stavrou @ 2022-04-21 18:39 UTC (permalink / raw)
  To: Philip Kaludercic, Stefan Monnier; +Cc: emacs-devel

> From: Philip Kaludercic <philipk@posteo.net>
> Date: Thu, 21 Apr 2022 10:30:45 +0000
>
> Protesilaos Stavrou <info@protesilaos.com> writes:
>
>> Hello everyone,
>>
>> I have two small packages that I would like to offer to GNU ELPA.  See
>> attached patches.  What they do, in brief:
>>
>> * cursory :: Lets the user specify presets of cursor configuration, such
>>   as 'cursor-type' and 'blink-cursor-delay', and switch between them on
>>   demand.  An example use-case is when one likes to use a block cursor
>>   with a relatively fast blink rate for day-to-day editing and a bar
>>   cursor with a slower blink rate while reading.
>>
>>   <https://git.sr.ht/~protesilaos/cursory>
>
> I have two little patch suggestions for cursory:
>
> [...]
>
> Also, in `cursory-store-latest-preset' you use lisp-data-mode, but that
> was added with Emacs 28.  It shouldn't really be an issue, but "fixing"
> it doesn't seem that difficult either:
>
> [...]

Thank you!  I applied all the patches.

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Thu, 21 Apr 2022 08:15:45 -0400
>
> Philip Kaludercic [2022-04-21 10:30:45] wrote:
>> -      (insert (concat ";; Auto-generated file;"
>> -                      " don't edit -*- mode: lisp-data -*-\n"))
>> +      (insert ";; Auto-generated file; don't edit -*- mode: "
>> +	      (if (<= 28 emacs-major-version)
>> +		  "lisp-data"
>> +		"emacs-lisp")
>> +	      " -*-\n"))
>
> BTW, I encourage the use of a `.eld` extension for those
> elisp-data files.

Also added the .eld extension and pushed the changes to elpa.git.

-- 
Protesilaos Stavrou
https://protesilaos.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-21 18:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21  7:31 [ELPA] Add 'cursory' and 'tmr' packages? Protesilaos Stavrou
2022-04-21 10:30 ` Philip Kaludercic
2022-04-21 12:15   ` Stefan Monnier
2022-04-21 18:39   ` Protesilaos Stavrou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).