~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
3 2

[PATCH] rde: emacs: Add option default-application-launcher?

Details
Message ID
<20220916160110.17977-1-ngraves@ngraves.fr>
DKIM signature
missing
Download raw message
Patch: +20 -2
---
 rde/features/emacs.scm | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/rde/features/emacs.scm b/rde/features/emacs.scm
index e01fd61..1ab77f9 100644
--- a/rde/features/emacs.scm
+++ b/rde/features/emacs.scm
@@ -208,12 +208,14 @@ environment outside of Guix Home."
          (extra-init-el '())
          (extra-early-init-el '())
          (default-terminal? #t)
          (default-application-launcher? #t)
          (disable-warnings? #t)
          (auto-update-buffers? #t)
          (auto-clean-space? #t))
  "Setup and configure GNU Emacs."
  (ensure-pred boolean? emacs-server-mode?)
  (ensure-pred boolean? default-terminal?)
  (ensure-pred boolean? default-application-launcher?)
  (ensure-pred boolean? disable-warnings?)
  (ensure-pred boolean? auto-update-buffers?)
  (ensure-pred boolean? auto-clean-space?)
@@ -240,6 +242,18 @@ environment outside of Guix Home."
                           "--no-splash"
                           (cdr (command-line)))))

  (define emacs-application-launcher
    (program-file "emacs-application-launcher"
                  #~(system* #$emacs-client-create-frame
                           "--eval" "(progn \
(set-frame-name \"App Launcher - Emacs Client\") \
(let ((current-frame (selected-frame))) \
  (unwind-protect \
      (command-execute 'app-launcher-run-app) \
    (delete-frame current-frame))))"
                           "-F"
                           "((minibuffer . only) (width . 120) (height . 11))")))

  (define (emacs-home-services config)
    "Returns home services related to GNU Emacs."
    (require-value 'full-name config)
@@ -452,7 +466,8 @@ It can contain settings not yet moved to separate features."
        #:elisp-packages
        (append (list (get-value 'emacs-configure-rde-keymaps config)
                      emacs-expand-region)
                (if auto-clean-space? (list emacs-ws-butler) '())))
                (if auto-clean-space? (list emacs-ws-butler) '())
                (if default-application-launcher? (list emacs-app-launcher) '())))

       (service
        home-emacs-service-type
@@ -520,7 +535,10 @@ It can contain settings not yet moved to separate features."
             emacs-server-mode?)
            (if default-terminal?
                `((default-terminal . ,emacs-client-create-frame))
                '())))
                '())
            (if default-application-launcher?
                   `((default-application-launcher . ,emacs-application-launcher))
                   '())))
   (home-services-getter emacs-home-services)))

;; TODO: https://www.reddit.com/r/emacs/comments/xb6qdm/super_fast_emacs_start_up/
-- 
2.37.3
Details
Message ID
<87pmfvmhg3.fsf@ngraves.fr>
In-Reply-To
<20220916160110.17977-1-ngraves@ngraves.fr> (view parent)
DKIM signature
missing
Download raw message
This option needs the package emacs-app-launcher, which is sent as a
patch to guix : https://issues.guix.gnu.org/57770

Does seem to work quite OK, doesn't have icons but I don't really care.
Still some weird behaviour when opening (I think it's related to the
floating behaviour, I might take a look on that).

-- 
Best regards,
Nicolas Graves
Details
Message ID
<875yhksv1x.fsf@ngraves.fr>
In-Reply-To
<87pmfvmhg3.fsf@ngraves.fr> (view parent)
DKIM signature
missing
Download raw message
The package emacs-app-launcher has been upstreamed ;) 

-- 
Best regards,
Nicolas Graves
Details
Message ID
<87r1063x3i.fsf@trop.in>
In-Reply-To
<20220916160110.17977-1-ngraves@ngraves.fr> (view parent)
DKIM signature
pass
Download raw message
On 2022-09-16 18:01, Nicolas Graves wrote:

> ---
>  rde/features/emacs.scm | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/rde/features/emacs.scm b/rde/features/emacs.scm
> index e01fd61..1ab77f9 100644
> --- a/rde/features/emacs.scm
> +++ b/rde/features/emacs.scm
> @@ -208,12 +208,14 @@ environment outside of Guix Home."
>            (extra-init-el '())
>            (extra-early-init-el '())
>            (default-terminal? #t)
> +          (default-application-launcher? #t)
>            (disable-warnings? #t)
>            (auto-update-buffers? #t)
>            (auto-clean-space? #t))
>    "Setup and configure GNU Emacs."
>    (ensure-pred boolean? emacs-server-mode?)
>    (ensure-pred boolean? default-terminal?)
> +  (ensure-pred boolean? default-application-launcher?)
>    (ensure-pred boolean? disable-warnings?)
>    (ensure-pred boolean? auto-update-buffers?)
>    (ensure-pred boolean? auto-clean-space?)
> @@ -240,6 +242,18 @@ environment outside of Guix Home."
>                             "--no-splash"
>                             (cdr (command-line)))))
>  
> +  (define emacs-application-launcher
> +    (program-file "emacs-application-launcher"
> +                  #~(system* #$emacs-client-create-frame
> +                           "--eval" "(progn \
> +(set-frame-name \"App Launcher - Emacs Client\") \
> +(let ((current-frame (selected-frame))) \
> +  (unwind-protect \
> +      (command-execute 'app-launcher-run-app) \
> +    (delete-frame current-frame))))"
> +                           "-F"
> +                           "((minibuffer . only) (width . 120) (height . 11))")))
> +
>    (define (emacs-home-services config)
>      "Returns home services related to GNU Emacs."
>      (require-value 'full-name config)
> @@ -452,7 +466,8 @@ It can contain settings not yet moved to separate features."
>          #:elisp-packages
>          (append (list (get-value 'emacs-configure-rde-keymaps config)
>                        emacs-expand-region)
> -                (if auto-clean-space? (list emacs-ws-butler) '())))
> +                (if auto-clean-space? (list emacs-ws-butler) '())
> +                (if default-application-launcher? (list emacs-app-launcher) '())))
>  
>         (service
>          home-emacs-service-type
> @@ -520,7 +535,10 @@ It can contain settings not yet moved to separate features."
>               emacs-server-mode?)
>              (if default-terminal?
>                  `((default-terminal . ,emacs-client-create-frame))
> -                '())))
> +                '())
> +            (if default-application-launcher?
> +                   `((default-application-launcher . ,emacs-application-launcher))
> +                   '())))
>     (home-services-getter emacs-home-services)))
>  
>  ;; TODO: https://www.reddit.com/r/emacs/comments/xb6qdm/super_fast_emacs_start_up/

Nice job!  Thank you for the patch and package.  Applied and generalized
repitetive code.

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