[PATCH] gnu: git-modes -> emacs-git-modes.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ahmad Draidi
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Ahmad Draidi
Severity
normal

Debbugs page

Ahmad Draidi wrote 2 years ago
(address . guix-patches@gnu.org)(name . Ahmad Draidi)(address . a.r.draidi@redscript.org)
b921bab4f546ca8ce5c4a9c1a9a9887343e75fda.1689886157.git.a.r.draidi@redscript.org
* 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(-)

Toggle diff (27 lines)
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
Liliana Marie Prikler wrote 2 years ago
(name . Andrew Tropin)(address . andrew@trop.in)
aeb7beabb7ccccafdd40028ac54d46daa6e63f8f.camel@gmail.com
Am Freitag, dem 21.07.2023 um 00:49 +0400 schrieb Ahmad Draidi:
Toggle quote (12 lines)
> * 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
Ahmad Draidi wrote 2 years ago
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
87sf9ggsdy.fsf@redscript.org
Hello,

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

Toggle quote (21 lines)
> 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'.

Toggle quote (6 lines)
> 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.
Toggle quote (2 lines)
> Cheers

Thanks
Ahmad Draidi wrote 2 years ago
[PATCH v2] gnu: Rename git-modes to emacs-git-modes.
(address . 64755@debbugs.gnu.org)(name . Ahmad Draidi)(address . a.r.draidi@redscript.org)
825a3cb17bb9038516e805b26f5e508de2a2d914.1690022137.git.a.r.draidi@redscript.org
* 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(-)

Toggle diff (34 lines)
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
Ahmad Draidi wrote 2 years ago
merged
(name . GNU bug tracker automated control server)(address . control@debbugs.gnu.org)
87a5vcm9nz.fsf@redscript.org
close 64755
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 64755@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 64755
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help