unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#64755] [PATCH] gnu: git-modes -> emacs-git-modes.
@ 2023-07-20 20:49 Ahmad Draidi via Guix-patches via
  2023-07-21 18:27 ` Liliana Marie Prikler
  2023-07-22 10:35 ` [bug#64755] [PATCH v2] gnu: Rename git-modes to emacs-git-modes Ahmad Draidi via Guix-patches via
  0 siblings, 2 replies; 4+ messages in thread
From: Ahmad Draidi via Guix-patches via @ 2023-07-20 20:49 UTC (permalink / raw)
  To: 64755; +Cc: Ahmad Draidi, Andrew Tropin, Liliana Marie Prikler

* gnu/packages/emacs-xyz.scm (emacs-git-modes): New variable.
(git-modes): Deprecate variable.
---

This makes the package name consistent when installing it through 'guix package -i' and a variable name in a system declaration file (e.g. /etc/config.scm). It finishes the job in #29582.

Not sure if the deprecation method I used is optimal, since it brings back to life the package name 'git-modes'. However, putting 'emacs-git-modes' in 'old-name' causes 'warning: ambiguous package specification', as expected.

 gnu/packages/emacs-xyz.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 550e5d2a65..6e8b2b313c 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -1261,7 +1261,7 @@ (define-public emacs-project
 some utility functions, and commands using that infrastructure.")
     (license license:gpl3+)))
 
-(define-public git-modes
+(define-public emacs-git-modes
   (package
     (name "emacs-git-modes")
     (version "1.4.1")
@@ -1285,6 +1285,9 @@ (define-public git-modes
 @file{.git/config}.")
     (license license:gpl3+)))
 
+(define-public git-modes
+  (deprecated-package "git-modes" emacs-git-modes))
+
 (define-public emacs-with-editor
   (package
     (name "emacs-with-editor")

base-commit: 21b718f4d6c3ded8ef50d12f6e9ae6474f74620f
-- 
2.41.0





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

* [bug#64755] [PATCH] gnu: git-modes -> emacs-git-modes.
  2023-07-20 20:49 [bug#64755] [PATCH] gnu: git-modes -> emacs-git-modes Ahmad Draidi via Guix-patches via
@ 2023-07-21 18:27 ` Liliana Marie Prikler
  2023-07-22 10:15   ` Ahmad Draidi via Guix-patches via
  2023-07-22 10:35 ` [bug#64755] [PATCH v2] gnu: Rename git-modes to emacs-git-modes Ahmad Draidi via Guix-patches via
  1 sibling, 1 reply; 4+ messages in thread
From: Liliana Marie Prikler @ 2023-07-21 18:27 UTC (permalink / raw)
  To: Ahmad Draidi, 64755; +Cc: Andrew Tropin

Am Freitag, dem 21.07.2023 um 00:49 +0400 schrieb Ahmad Draidi:
> * gnu/packages/emacs-xyz.scm (emacs-git-modes): New variable.
> (git-modes): Deprecate variable.
> ---
> 
> This makes the package name consistent when installing it through
> 'guix package -i' and a variable name in a system declaration file
> (e.g. /etc/config.scm). It finishes the job in #29582.
> 
> Not sure if the deprecation method I used is optimal, since it brings
> back to life the package name 'git-modes'. However, putting 'emacs-
> git-modes' in 'old-name' causes 'warning: ambiguous package
> specification', as expected.
There is define-deprecated/public, as well as more idiomatic ways of
writing the commit message, i.e. 

gnu: Rename git-modes to emacs-git-modes.

* gnu/packages/emacs-xyz.scm (git-modes): Deprecate and rename to…
(emacs-git-modes): … this.

Cheers




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

* [bug#64755] [PATCH] gnu: git-modes -> emacs-git-modes.
  2023-07-21 18:27 ` Liliana Marie Prikler
@ 2023-07-22 10:15   ` Ahmad Draidi via Guix-patches via
  0 siblings, 0 replies; 4+ messages in thread
From: Ahmad Draidi via Guix-patches via @ 2023-07-22 10:15 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 64755, Andrew Tropin

Hello,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Freitag, dem 21.07.2023 um 00:49 +0400 schrieb Ahmad Draidi:
>> * gnu/packages/emacs-xyz.scm (emacs-git-modes): New variable.
>> (git-modes): Deprecate variable.
>> ---
>>
>> This makes the package name consistent when installing it 
>> through
>> 'guix package -i' and a variable name in a system declaration 
>> file
>> (e.g. /etc/config.scm). It finishes the job in #29582.
>>
>> Not sure if the deprecation method I used is optimal, since it 
>> brings
>> back to life the package name 'git-modes'. However, putting 
>> 'emacs-
>> git-modes' in 'old-name' causes 'warning: ambiguous package
>> specification', as expected.
> There is define-deprecated/public, as well as more idiomatic 
> ways of
> writing the commit message, i.e.
>
I grepped the repo, but managed to miss 'deprecation.scm' 
somehow. Thanks for the tip.
I updated the patch with 'define-deprecated/public-alias'.

> gnu: Rename git-modes to emacs-git-modes.
>
> * gnu/packages/emacs-xyz.scm (git-modes): Deprecate and rename 
> to…
> (emacs-git-modes): … this.
>
I got the previous commit message from 3aeca58073, which seemed 
weird to me, but I thought it's the way to go.

I'll email the updated patch shortly.
> Cheers

Thanks




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

* [bug#64755] [PATCH v2] gnu: Rename git-modes to emacs-git-modes.
  2023-07-20 20:49 [bug#64755] [PATCH] gnu: git-modes -> emacs-git-modes Ahmad Draidi via Guix-patches via
  2023-07-21 18:27 ` Liliana Marie Prikler
@ 2023-07-22 10:35 ` Ahmad Draidi via Guix-patches via
  1 sibling, 0 replies; 4+ messages in thread
From: Ahmad Draidi via Guix-patches via @ 2023-07-22 10:35 UTC (permalink / raw)
  To: 64755; +Cc: Ahmad Draidi, Andrew Tropin, Liliana Marie Prikler

* gnu/packages/emacs-xyz.scm (git-modes): Deprecate and rename to...
(emacs-git-modes): ... this.
[use-modules]: Add (guix deprecation).
---
 gnu/packages/emacs-xyz.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 6af5faf4cb..10bfb76046 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -153,6 +153,7 @@ (define-module (gnu packages emacs-xyz)
   #:use-module (guix packages)
   #:use-module (guix cvs-download)
   #:use-module (guix download)
+  #:use-module (guix deprecation)
   #:use-module (guix bzr-download)
   #:use-module (guix gexp)
   #:use-module (guix i18n)
@@ -1261,7 +1262,7 @@ (define-public emacs-project
 some utility functions, and commands using that infrastructure.")
     (license license:gpl3+)))
 
-(define-public git-modes
+(define-public emacs-git-modes
   (package
     (name "emacs-git-modes")
     (version "1.4.1")
@@ -1285,6 +1286,8 @@ (define-public git-modes
 @file{.git/config}.")
     (license license:gpl3+)))
 
+(define-deprecated/public-alias git-modes emacs-git-modes)
+
 (define-public emacs-with-editor
   (package
     (name "emacs-with-editor")

base-commit: ab7bae8de3d3a27556dfe8e13ca349eabd730fa1
-- 
2.41.0





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

end of thread, other threads:[~2023-07-22 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-20 20:49 [bug#64755] [PATCH] gnu: git-modes -> emacs-git-modes Ahmad Draidi via Guix-patches via
2023-07-21 18:27 ` Liliana Marie Prikler
2023-07-22 10:15   ` Ahmad Draidi via Guix-patches via
2023-07-22 10:35 ` [bug#64755] [PATCH v2] gnu: Rename git-modes to emacs-git-modes Ahmad Draidi via Guix-patches via

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

	https://git.savannah.gnu.org/cgit/guix.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).