~abcdw/rde-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
5 2

[PATCH] rde: org-protocol: Deprecate feature

Details
Message ID
<20240928183626.8400-1-ngraves@ngraves.fr>
DKIM signature
pass
Download raw message
Patch: +7 -36
Emacs introduced handling of org-protocol by default in version 29.2.
https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29#n79

org-protocol is present in default installed emacsclient.desktop file
but for some reason (probably the "default for" not being set) I
couldn't use that correctly.

This patch deprecates the emacs-org-protocol feature, which
functionality is now part of feature-emacs.
---
 src/rde/features/emacs-xyz.scm | 39 ++++------------------------------
 src/rde/features/emacs.scm     |  3 +++
 src/rde/features/presets.scm   |  1 -
 3 files changed, 7 insertions(+), 36 deletions(-)

diff --git a/src/rde/features/emacs-xyz.scm b/src/rde/features/emacs-xyz.scm
index 3e509989..eef4cb66 100644
--- a/src/rde/features/emacs-xyz.scm
+++ b/src/rde/features/emacs-xyz.scm
@@ -112,7 +112,7 @@
            feature-emacs-org-agenda-files-track
            feature-emacs-citation
            feature-emacs-org-dailies
            feature-emacs-org-protocol
            feature-emacs-org-protocol  ; Deprecated.
            feature-emacs-org-ql
            feature-emacs-spelling
            feature-emacs-org-recur
@@ -4956,41 +4956,10 @@ citar-org-roam-subdir if org-roam is enabled."
   (values `((,f-name . #t)))
   (home-services-getter get-home-services)))

(define* (feature-emacs-org-protocol)
  "Setup and configure Org-Protocol for Emacs."

  (define emacs-f-name 'org-protocol)
  (define f-name (symbol-append 'emacs- emacs-f-name))

  (define (get-home-services config)
    (require-value 'emacs config)
    (define emacs-cmd (get-value 'emacs-client config))

    (list
     (rde-elisp-configuration-service
      emacs-f-name
      config
      `((if after-init-time
            (require 'org-protocol)
            (add-hook 'after-init-hook (lambda () (require 'org-protocol)))))
      #:summary "\
Org Protocol Emacs"
      #:commentary "\
Adding xdg-mime-entry and loading org-protocol.
This integrates well with elfeed for now."
      #:keywords '(convenience)
      #:elisp-packages '())

     (emacs-xdg-service
      emacs-f-name
      "Emacs (Client) [Org-protocol]"
      emacs-cmd
      #:default-for '(x-scheme-handler/org-protocol))))

(define-deprecated/alias feature-emacs-org-protocol
  (feature
   (name f-name)
   (values `((,f-name . #t)))
   (home-services-getter get-home-services)))
   (name 'org-protocol)
   (values '((org-protocol . #t)))))

(define* (feature-emacs-spelling
          #:key
diff --git a/src/rde/features/emacs.scm b/src/rde/features/emacs.scm
index dec329ad..309160aa 100644
--- a/src/rde/features/emacs.scm
+++ b/src/rde/features/emacs.scm
@@ -602,6 +602,9 @@ It can contain settings not yet moved to separate features."
                        #~(system* "emacs" "-q"))
     (emacs-xdg-service 'emacs-Q "Emacs (No init, no site-lisp: -Q)"
                        #~(system* "emacs" "-Q"))
     (emacs-xdg-service 'emacs-org-protocol "Emacs (Client) [Org-protocol]"
                        emacs-client
                        #:default-for '(x-scheme-handler/org-protocol))

     (service home-emacs-feature-loader-service-type
              (home-emacs-feature-loader-configuration
diff --git a/src/rde/features/presets.scm b/src/rde/features/presets.scm
index 72741a2f..c56000a5 100644
--- a/src/rde/features/presets.scm
+++ b/src/rde/features/presets.scm
@@ -145,7 +145,6 @@

   (feature-emacs-pdf-tools)
   (feature-emacs-nov-el)
   (feature-emacs-org-protocol)

   (feature-emacs-smartparens
    #:show-smartparens? #t)
-- 
2.46.0

[PATCH v2] rde: org-protocol: Deprecate feature

Details
Message ID
<20240928222729.10521-1-ngraves@ngraves.fr>
In-Reply-To
<20240928183626.8400-1-ngraves@ngraves.fr> (view parent)
DKIM signature
pass
Download raw message
Patch: +17 -36
Emacs introduced handling of org-protocol by default in version 29.2.
https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29#n79

org-protocol is present in default installed emacsclient.desktop file
but for some reason (probably the "default for" not being set) I
couldn't use that correctly.

This patch deprecated the emacs-org-protocol feature, which
functionality is now part of feature-emacs.
---
 src/rde/features/emacs-xyz.scm | 39 ++++------------------------------
 src/rde/features/emacs.scm     | 13 ++++++++++++
 src/rde/features/presets.scm   |  1 -
 3 files changed, 17 insertions(+), 36 deletions(-)

diff --git a/src/rde/features/emacs-xyz.scm b/src/rde/features/emacs-xyz.scm
index 3e509989..eef4cb66 100644
--- a/src/rde/features/emacs-xyz.scm
+++ b/src/rde/features/emacs-xyz.scm
@@ -112,7 +112,7 @@
            feature-emacs-org-agenda-files-track
            feature-emacs-citation
            feature-emacs-org-dailies
            feature-emacs-org-protocol
            feature-emacs-org-protocol  ; Deprecated.
            feature-emacs-org-ql
            feature-emacs-spelling
            feature-emacs-org-recur
@@ -4956,41 +4956,10 @@ citar-org-roam-subdir if org-roam is enabled."
   (values `((,f-name . #t)))
   (home-services-getter get-home-services)))

(define* (feature-emacs-org-protocol)
  "Setup and configure Org-Protocol for Emacs."

  (define emacs-f-name 'org-protocol)
  (define f-name (symbol-append 'emacs- emacs-f-name))

  (define (get-home-services config)
    (require-value 'emacs config)
    (define emacs-cmd (get-value 'emacs-client config))

    (list
     (rde-elisp-configuration-service
      emacs-f-name
      config
      `((if after-init-time
            (require 'org-protocol)
            (add-hook 'after-init-hook (lambda () (require 'org-protocol)))))
      #:summary "\
Org Protocol Emacs"
      #:commentary "\
Adding xdg-mime-entry and loading org-protocol.
This integrates well with elfeed for now."
      #:keywords '(convenience)
      #:elisp-packages '())

     (emacs-xdg-service
      emacs-f-name
      "Emacs (Client) [Org-protocol]"
      emacs-cmd
      #:default-for '(x-scheme-handler/org-protocol))))

(define-deprecated/alias feature-emacs-org-protocol
  (feature
   (name f-name)
   (values `((,f-name . #t)))
   (home-services-getter get-home-services)))
   (name 'org-protocol)
   (values '((org-protocol . #t)))))

(define* (feature-emacs-spelling
          #:key
diff --git a/src/rde/features/emacs.scm b/src/rde/features/emacs.scm
index dec329ad..be5f39c7 100644
--- a/src/rde/features/emacs.scm
+++ b/src/rde/features/emacs.scm
@@ -602,6 +602,9 @@ It can contain settings not yet moved to separate features."
                        #~(system* "emacs" "-q"))
     (emacs-xdg-service 'emacs-Q "Emacs (No init, no site-lisp: -Q)"
                        #~(system* "emacs" "-Q"))
     (emacs-xdg-service 'emacs-org-protocol "Emacs (Client) [Org-protocol]"
                        emacs-client
                        #:default-for '(x-scheme-handler/org-protocol))

     (service home-emacs-feature-loader-service-type
              (home-emacs-feature-loader-configuration
@@ -631,6 +634,16 @@ It can contain settings not yet moved to separate features."
       (init-el extra-init-el)
       (early-init-el extra-early-init-el)))

     (simple-service
      'emacs-org-protocol
      home-emacs-service-type
      (home-emacs-extension
       (init-el
        `(if after-init-time
             (require 'org-protocol)
             (add-hook 'after-init-hook
                       (lambda () (require 'org-protocol)))))))

     (simple-service
      'emacs-set-default-editor
      home-environment-variables-service-type
diff --git a/src/rde/features/presets.scm b/src/rde/features/presets.scm
index 72741a2f..c56000a5 100644
--- a/src/rde/features/presets.scm
+++ b/src/rde/features/presets.scm
@@ -145,7 +145,6 @@

   (feature-emacs-pdf-tools)
   (feature-emacs-nov-el)
   (feature-emacs-org-protocol)

   (feature-emacs-smartparens
    #:show-smartparens? #t)
-- 
2.46.0

Re: [PATCH v2] rde: org-protocol: Deprecate feature

Details
Message ID
<87ldz9ebde.fsf@trop.in>
In-Reply-To
<20240928222729.10521-1-ngraves@ngraves.fr> (view parent)
DKIM signature
pass
Download raw message
On 2024-09-29 00:27, Nicolas Graves wrote:

> Emacs introduced handling of org-protocol by default in version 29.2.
> https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29#n79
>
> org-protocol is present in default installed emacsclient.desktop file
> but for some reason (probably the "default for" not being set) I
> couldn't use that correctly.
>
> This patch deprecated the emacs-org-protocol feature, which
> functionality is now part of feature-emacs.
> ---
>  src/rde/features/emacs-xyz.scm | 39 ++++------------------------------
>  src/rde/features/emacs.scm     | 13 ++++++++++++
>  src/rde/features/presets.scm   |  1 -
>  3 files changed, 17 insertions(+), 36 deletions(-)
>
> diff --git a/src/rde/features/emacs-xyz.scm b/src/rde/features/emacs-xyz.scm
> index 3e509989..eef4cb66 100644
> --- a/src/rde/features/emacs-xyz.scm
> +++ b/src/rde/features/emacs-xyz.scm
> @@ -112,7 +112,7 @@
>              feature-emacs-org-agenda-files-track
>              feature-emacs-citation
>              feature-emacs-org-dailies
> -            feature-emacs-org-protocol
> +            feature-emacs-org-protocol  ; Deprecated.
>              feature-emacs-org-ql
>              feature-emacs-spelling
>              feature-emacs-org-recur
> @@ -4956,41 +4956,10 @@ citar-org-roam-subdir if org-roam is enabled."
>     (values `((,f-name . #t)))
>     (home-services-getter get-home-services)))
>  
> -(define* (feature-emacs-org-protocol)
> -  "Setup and configure Org-Protocol for Emacs."
> -
> -  (define emacs-f-name 'org-protocol)
> -  (define f-name (symbol-append 'emacs- emacs-f-name))
> -
> -  (define (get-home-services config)
> -    (require-value 'emacs config)
> -    (define emacs-cmd (get-value 'emacs-client config))
> -
> -    (list
> -     (rde-elisp-configuration-service
> -      emacs-f-name
> -      config
> -      `((if after-init-time
> -            (require 'org-protocol)
> -            (add-hook 'after-init-hook (lambda () (require 'org-protocol)))))
> -      #:summary "\
> -Org Protocol Emacs"
> -      #:commentary "\
> -Adding xdg-mime-entry and loading org-protocol.
> -This integrates well with elfeed for now."
> -      #:keywords '(convenience)
> -      #:elisp-packages '())
> -
> -     (emacs-xdg-service
> -      emacs-f-name
> -      "Emacs (Client) [Org-protocol]"
> -      emacs-cmd
> -      #:default-for '(x-scheme-handler/org-protocol))))
> -
> +(define-deprecated/alias feature-emacs-org-protocol
>    (feature
> -   (name f-name)
> -   (values `((,f-name . #t)))
> -   (home-services-getter get-home-services)))
> +   (name 'org-protocol)
> +   (values '((org-protocol . #t)))))
>  
>  (define* (feature-emacs-spelling
>            #:key
> diff --git a/src/rde/features/emacs.scm b/src/rde/features/emacs.scm
> index dec329ad..be5f39c7 100644
> --- a/src/rde/features/emacs.scm
> +++ b/src/rde/features/emacs.scm
> @@ -602,6 +602,9 @@ It can contain settings not yet moved to separate features."
>                          #~(system* "emacs" "-q"))
>       (emacs-xdg-service 'emacs-Q "Emacs (No init, no site-lisp: -Q)"
>                          #~(system* "emacs" "-Q"))
> +     (emacs-xdg-service 'emacs-org-protocol "Emacs (Client) [Org-protocol]"
> +                        emacs-client
> +                        #:default-for '(x-scheme-handler/org-protocol))
>  
>       (service home-emacs-feature-loader-service-type
>                (home-emacs-feature-loader-configuration
> @@ -631,6 +634,16 @@ It can contain settings not yet moved to separate features."
>         (init-el extra-init-el)
>         (early-init-el extra-early-init-el)))
>  
> +     (simple-service
> +      'emacs-org-protocol
> +      home-emacs-service-type
> +      (home-emacs-extension
> +       (init-el
> +        `(if after-init-time
> +             (require 'org-protocol)
> +             (add-hook 'after-init-hook
> +                       (lambda () (require 'org-protocol)))))))
> +
>       (simple-service
>        'emacs-set-default-editor
>        home-environment-variables-service-type
> diff --git a/src/rde/features/presets.scm b/src/rde/features/presets.scm
> index 72741a2f..c56000a5 100644
> --- a/src/rde/features/presets.scm
> +++ b/src/rde/features/presets.scm
> @@ -145,7 +145,6 @@
>  
>     (feature-emacs-pdf-tools)
>     (feature-emacs-nov-el)
> -   (feature-emacs-org-protocol)
>  
>     (feature-emacs-smartparens
>      #:show-smartparens? #t)

Looks good, but I can't apply it.

Does it apply for you on master branch?

-- 
Best regards,
Andrew Tropin

Re: [PATCH v2] rde: org-protocol: Deprecate feature

Details
Message ID
<87cykla0vr.fsf@ngraves.fr>
In-Reply-To
<87ldz9ebde.fsf@trop.in> (view parent)
DKIM signature
pass
Download raw message
On 2024-09-30 13:31, Andrew Tropin wrote:


>
> Looks good, but I can't apply it.
>
> Does it apply for you on master branch?

I may have a few commits before that, I'll rebase and resend ;)

-- 
Best regards,
Nicolas Graves

[PATCH v3] rde: org-protocol: Deprecate feature

Details
Message ID
<20241001063823.4285-1-ngraves@ngraves.fr>
In-Reply-To
<20240928222729.10521-1-ngraves@ngraves.fr> (view parent)
DKIM signature
pass
Download raw message
Patch: +17 -36
Emacs introduced handling of org-protocol by default in version 29.2.
https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29#n79

org-protocol is present in default installed emacsclient.desktop file
but for some reason (probably the "default for" not being set) I
couldn't use that correctly.

This patch deprecated the emacs-org-protocol feature, which
functionality is now part of feature-emacs.
---
 src/rde/features/emacs-xyz.scm | 39 ++++------------------------------
 src/rde/features/emacs.scm     | 13 ++++++++++++
 src/rde/features/presets.scm   |  1 -
 3 files changed, 17 insertions(+), 36 deletions(-)

diff --git a/src/rde/features/emacs-xyz.scm b/src/rde/features/emacs-xyz.scm
index 31522d10..8c948534 100644
--- a/src/rde/features/emacs-xyz.scm
+++ b/src/rde/features/emacs-xyz.scm
@@ -112,7 +112,7 @@
            feature-emacs-org-agenda-files-track
            feature-emacs-citation
            feature-emacs-org-dailies
            feature-emacs-org-protocol
            feature-emacs-org-protocol  ; Deprecated.
            feature-emacs-org-ql
            feature-emacs-spelling
            feature-emacs-org-recur
@@ -4957,41 +4957,10 @@ citar-org-roam-subdir if org-roam is enabled."
   (values `((,f-name . #t)))
   (home-services-getter get-home-services)))

(define* (feature-emacs-org-protocol)
  "Setup and configure Org-Protocol for Emacs."

  (define emacs-f-name 'org-protocol)
  (define f-name (symbol-append 'emacs- emacs-f-name))

  (define (get-home-services config)
    (require-value 'emacs config)
    (define emacs-cmd (get-value 'emacs-client config))

    (list
     (rde-elisp-configuration-service
      emacs-f-name
      config
      `((if after-init-time
            (require 'org-protocol)
            (add-hook 'after-init-hook (lambda () (require 'org-protocol)))))
      #:summary "\
Org Protocol Emacs"
      #:commentary "\
Adding xdg-mime-entry and loading org-protocol.
This integrates well with elfeed for now."
      #:keywords '(convenience)
      #:elisp-packages '())

     (emacs-xdg-service
      emacs-f-name
      "Emacs (Client) [Org-protocol]"
      emacs-cmd
      #:default-for '(x-scheme-handler/org-protocol))))

(define-deprecated/alias feature-emacs-org-protocol
  (feature
   (name f-name)
   (values `((,f-name . #t)))
   (home-services-getter get-home-services)))
   (name 'org-protocol)
   (values '((org-protocol . #t)))))

(define* (feature-emacs-spelling
          #:key
diff --git a/src/rde/features/emacs.scm b/src/rde/features/emacs.scm
index dec329ad..be5f39c7 100644
--- a/src/rde/features/emacs.scm
+++ b/src/rde/features/emacs.scm
@@ -602,6 +602,9 @@ It can contain settings not yet moved to separate features."
                        #~(system* "emacs" "-q"))
     (emacs-xdg-service 'emacs-Q "Emacs (No init, no site-lisp: -Q)"
                        #~(system* "emacs" "-Q"))
     (emacs-xdg-service 'emacs-org-protocol "Emacs (Client) [Org-protocol]"
                        emacs-client
                        #:default-for '(x-scheme-handler/org-protocol))

     (service home-emacs-feature-loader-service-type
              (home-emacs-feature-loader-configuration
@@ -631,6 +634,16 @@ It can contain settings not yet moved to separate features."
       (init-el extra-init-el)
       (early-init-el extra-early-init-el)))

     (simple-service
      'emacs-org-protocol
      home-emacs-service-type
      (home-emacs-extension
       (init-el
        `(if after-init-time
             (require 'org-protocol)
             (add-hook 'after-init-hook
                       (lambda () (require 'org-protocol)))))))

     (simple-service
      'emacs-set-default-editor
      home-environment-variables-service-type
diff --git a/src/rde/features/presets.scm b/src/rde/features/presets.scm
index 72741a2f..c56000a5 100644
--- a/src/rde/features/presets.scm
+++ b/src/rde/features/presets.scm
@@ -145,7 +145,6 @@

   (feature-emacs-pdf-tools)
   (feature-emacs-nov-el)
   (feature-emacs-org-protocol)

   (feature-emacs-smartparens
    #:show-smartparens? #t)
-- 
2.46.0

Re: [PATCH v3] rde: org-protocol: Deprecate feature

Details
Message ID
<87y1344dh5.fsf@trop.in>
In-Reply-To
<20241001063823.4285-1-ngraves@ngraves.fr> (view parent)
DKIM signature
pass
Download raw message
On 2024-10-01 08:38, Nicolas Graves wrote:

> Emacs introduced handling of org-protocol by default in version 29.2.
> https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/NEWS?h=emacs-29#n79
>
> org-protocol is present in default installed emacsclient.desktop file
> but for some reason (probably the "default for" not being set) I
> couldn't use that correctly.
>
> This patch deprecated the emacs-org-protocol feature, which
> functionality is now part of feature-emacs.
> ---
>  src/rde/features/emacs-xyz.scm | 39 ++++------------------------------
>  src/rde/features/emacs.scm     | 13 ++++++++++++
>  src/rde/features/presets.scm   |  1 -
>  3 files changed, 17 insertions(+), 36 deletions(-)
>
> diff --git a/src/rde/features/emacs-xyz.scm b/src/rde/features/emacs-xyz.scm
> index 31522d10..8c948534 100644
> --- a/src/rde/features/emacs-xyz.scm
> +++ b/src/rde/features/emacs-xyz.scm
> @@ -112,7 +112,7 @@
>              feature-emacs-org-agenda-files-track
>              feature-emacs-citation
>              feature-emacs-org-dailies
> -            feature-emacs-org-protocol
> +            feature-emacs-org-protocol  ; Deprecated.
>              feature-emacs-org-ql
>              feature-emacs-spelling
>              feature-emacs-org-recur
> @@ -4957,41 +4957,10 @@ citar-org-roam-subdir if org-roam is enabled."
>     (values `((,f-name . #t)))
>     (home-services-getter get-home-services)))
>  
> -(define* (feature-emacs-org-protocol)
> -  "Setup and configure Org-Protocol for Emacs."
> -
> -  (define emacs-f-name 'org-protocol)
> -  (define f-name (symbol-append 'emacs- emacs-f-name))
> -
> -  (define (get-home-services config)
> -    (require-value 'emacs config)
> -    (define emacs-cmd (get-value 'emacs-client config))
> -
> -    (list
> -     (rde-elisp-configuration-service
> -      emacs-f-name
> -      config
> -      `((if after-init-time
> -            (require 'org-protocol)
> -            (add-hook 'after-init-hook (lambda () (require 'org-protocol)))))
> -      #:summary "\
> -Org Protocol Emacs"
> -      #:commentary "\
> -Adding xdg-mime-entry and loading org-protocol.
> -This integrates well with elfeed for now."
> -      #:keywords '(convenience)
> -      #:elisp-packages '())
> -
> -     (emacs-xdg-service
> -      emacs-f-name
> -      "Emacs (Client) [Org-protocol]"
> -      emacs-cmd
> -      #:default-for '(x-scheme-handler/org-protocol))))
> -
> +(define-deprecated/alias feature-emacs-org-protocol
>    (feature
> -   (name f-name)
> -   (values `((,f-name . #t)))
> -   (home-services-getter get-home-services)))
> +   (name 'org-protocol)
> +   (values '((org-protocol . #t)))))
>  
>  (define* (feature-emacs-spelling
>            #:key
> diff --git a/src/rde/features/emacs.scm b/src/rde/features/emacs.scm
> index dec329ad..be5f39c7 100644
> --- a/src/rde/features/emacs.scm
> +++ b/src/rde/features/emacs.scm
> @@ -602,6 +602,9 @@ It can contain settings not yet moved to separate features."
>                          #~(system* "emacs" "-q"))
>       (emacs-xdg-service 'emacs-Q "Emacs (No init, no site-lisp: -Q)"
>                          #~(system* "emacs" "-Q"))
> +     (emacs-xdg-service 'emacs-org-protocol "Emacs (Client) [Org-protocol]"
> +                        emacs-client
> +                        #:default-for '(x-scheme-handler/org-protocol))
>  
>       (service home-emacs-feature-loader-service-type
>                (home-emacs-feature-loader-configuration
> @@ -631,6 +634,16 @@ It can contain settings not yet moved to separate features."
>         (init-el extra-init-el)
>         (early-init-el extra-early-init-el)))
>  
> +     (simple-service
> +      'emacs-org-protocol
> +      home-emacs-service-type
> +      (home-emacs-extension
> +       (init-el
> +        `(if after-init-time
> +             (require 'org-protocol)
> +             (add-hook 'after-init-hook
> +                       (lambda () (require 'org-protocol)))))))
> +
>       (simple-service
>        'emacs-set-default-editor
>        home-environment-variables-service-type
> diff --git a/src/rde/features/presets.scm b/src/rde/features/presets.scm
> index 72741a2f..c56000a5 100644
> --- a/src/rde/features/presets.scm
> +++ b/src/rde/features/presets.scm
> @@ -145,7 +145,6 @@
>  
>     (feature-emacs-pdf-tools)
>     (feature-emacs-nov-el)
> -   (feature-emacs-org-protocol)
>  
>     (feature-emacs-smartparens
>      #:show-smartparens? #t)

(guix deprecation) was missing.

Applied, fixed, pushed as https://git.sr.ht/~abcdw/rde/commit/b517c0fd

Thank you very much for you hard work!

-- 
Best regards,
Andrew Tropin
Reply to thread Export thread (mbox)