~abcdw/rde-devel

rde: org-protocol: Deprecate feature v1 APPLIED

Nicolas Graves: 3
 rde: org-protocol: Deprecate feature
 rde: org-protocol: Deprecate feature
 rde: org-protocol: Deprecate feature

 9 files changed, 41 insertions(+), 108 deletions(-)
Looks good, but I can't apply it.

Does it apply for you on master branch?
(guix deprecation) was missing.

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

Thank you very much for you hard work!
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~abcdw/rde-devel/patches/55231/mbox | git am -3
Learn more about email & git

[PATCH] rde: org-protocol: Deprecate feature Export this patch

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 Export this patch

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
Looks good, but I can't apply it.

Does it apply for you on master branch?

[PATCH v3] rde: org-protocol: Deprecate feature Export this patch

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
(guix deprecation) was missing.

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

Thank you very much for you hard work!