all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* NonGNU ELPA: New package 'xdg-appmenu'
@ 2023-07-08  9:35 Akib Azmain Turja
  2023-07-09 18:07 ` Akib Azmain Turja
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Akib Azmain Turja @ 2023-07-08  9:35 UTC (permalink / raw)
  To: Emacs Developer List


[-- Attachment #1.1: Type: text/plain, Size: 343 bytes --]


I've just written a new package and would like to publish it to on
NonGNU ELPA:

--8<---------------cut here---------------start------------->8---
XDG Appmenu allows you to run XDG desktop application right from your
Emacs.  To run an application, just do `M-x xdg-appmenu'.
--8<---------------cut here---------------end--------------->8---


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: patch --]
[-- Type: text/x-patch, Size: 748 bytes --]

From 32b80f3bc0e4c35a74cc7027017676849ab311bf Mon Sep 17 00:00:00 2001
From: Akib Azmain Turja <akib@disroot.org>
Date: Sat, 8 Jul 2023 15:24:20 +0600
Subject: [PATCH] * elpa-packages (xdg-appmenu): New package

---
 elpa-packages | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/elpa-packages b/elpa-packages
index 0610724..ef0af0c 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -784,6 +784,8 @@
  (xah-fly-keys		:url "https://github.com/xahlee/xah-fly-keys"
   :ignored-files ("*.png"))
 
+ (xdg-appmenu           :url "https://codeberg.org/akib/emacs-xdg-appmenu")
+
  (xkcd			:url "https://github.com/vibhavp/emacs-xkcd"
   :readme "README.org"
   :ignored-files ("LICENSE" ".travis.yml" "images"))
-- 
2.40.1


[-- Attachment #1.3: Type: text/plain, Size: 196 bytes --]


-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: NonGNU ELPA: New package 'xdg-appmenu'
  2023-07-08  9:35 NonGNU ELPA: New package 'xdg-appmenu' Akib Azmain Turja
@ 2023-07-09 18:07 ` Akib Azmain Turja
  2023-07-09 19:39   ` Eshel Yaron
  2023-07-10  1:59 ` Richard Stallman
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Akib Azmain Turja @ 2023-07-09 18:07 UTC (permalink / raw)
  To: Emacs Developer List

[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]

Akib Azmain Turja <akib@disroot.org> writes:

> I've just written a new package and would like to publish it to on
> NonGNU ELPA:
>
> XDG Appmenu allows you to run XDG desktop application right from your
> Emacs.  To run an application, just do `M-x xdg-appmenu'.
>
> From 32b80f3bc0e4c35a74cc7027017676849ab311bf Mon Sep 17 00:00:00 2001
> From: Akib Azmain Turja <akib@disroot.org>
> Date: Sat, 8 Jul 2023 15:24:20 +0600
> Subject: [PATCH] * elpa-packages (xdg-appmenu): New package
>
> ---
>  elpa-packages | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/elpa-packages b/elpa-packages
> index 0610724..ef0af0c 100644
> --- a/elpa-packages
> +++ b/elpa-packages
> @@ -784,6 +784,8 @@
>   (xah-fly-keys		:url "https://github.com/xahlee/xah-fly-keys"
>    :ignored-files ("*.png"))
>  
> + (xdg-appmenu           :url "https://codeberg.org/akib/emacs-xdg-appmenu")
> +
>   (xkcd			:url "https://github.com/vibhavp/emacs-xkcd"
>    :readme "README.org"
>    :ignored-files ("LICENSE" ".travis.yml" "images"))
> -- 
> 2.40.1

Ping?

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: NonGNU ELPA: New package 'xdg-appmenu'
  2023-07-09 18:07 ` Akib Azmain Turja
@ 2023-07-09 19:39   ` Eshel Yaron
  0 siblings, 0 replies; 14+ messages in thread
From: Eshel Yaron @ 2023-07-09 19:39 UTC (permalink / raw)
  To: Akib Azmain Turja; +Cc: Emacs Developer List

Hey,

>> XDG Appmenu allows you to run XDG desktop application right from your
>> Emacs.  To run an application, just do `M-x xdg-appmenu'.

I've just tried it out and it seems convenient and works really well!

One suggestion: you could add an `annotation-function` in `xdg-appmenu`
instead of relying on integration with `marginalia`.  That way you can
get mostly the same results without requiring the user to install and
configure `marginalia`.  E.g.:

diff --git a/xdg-appmenu.el b/xdg-appmenu.el
index 733b5d7..a47dc99 100644
--- a/xdg-appmenu.el
+++ b/xdg-appmenu.el
@@ -29,13 +29,6 @@ ;;; Commentary:
 ;; XDG Appmenu allows you to run XDG desktop application right from
 ;; your Emacs.  To run an application, just do `M-x xdg-appmenu'.
 
-;; If you use Marginalia, you might want to add the following to your
-;; init file to show the description of each application in the
-;; minibuffer prompt:
-
-;;  (push '(xdg-app xdg-appmenu-marginalia-annotate builtin none)
-;;        marginalia-annotator-registry)
-
 ;;; Code:
 
 (require 'subr-x)
@@ -177,7 +170,8 @@ (defun xdg-appmenu (app)
             "Run application: "
             (lambda (string pred action)
               (if (eq action 'metadata)
-                  `(metadata (category . xdg-app))
+                  `(metadata (category . xdg-app)
+                             (annotation-function . xdg-appmenu-annotate))
                 (complete-with-action action xdg-appmenu--list
                                       string pred)))
             nil t nil 'xdg-appmenu-history))))
@@ -189,18 +183,18 @@ (defun xdg-appmenu (app)
       (when (nth 3 spec)
         (pop-to-buffer-same-window buffer)))))
 
-(defvar marginalia-separator)
-(declare-function marginalia--truncate "marginalia")
-
-(defun xdg-appmenu-marginalia-annotate (cand)
+(defun xdg-appmenu-annotate (cand)
   "Annotate candidate CAND with its comment."
-  (let ((spec (assoc cand xdg-appmenu--list)))
-    (if (or (not spec) (not (nth 4 spec))
-            (string-empty-p (nth 4 spec)))
-        ""
-      (concat #(" " 0 1 (marginalia--align t)) marginalia-separator
-              (propertize (marginalia--truncate (nth 4 spec) 1.0)
-                          'face 'marginalia-documentation)))))
+  (let* ((spec (assoc cand xdg-appmenu--list))
+         (max-width (seq-max (mapcar #'string-width
+                                     (mapcar #'car
+                                             xdg-appmenu--list))))
+         (annotation (nth 4 spec)))
+    (unless (or (not annotation) (string-empty-p annotation))
+      (concat
+       (propertize " " 'display
+                   `(space :align-to ,(+ 2 max-width)))
+       (truncate-string-to-width annotation 80 nil nil t)))))
 
 (defun xdg-appmenu-terminal-runner-term (app command)
   "Run shell command COMMAND in a Term buffer.



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

* Re: NonGNU ELPA: New package 'xdg-appmenu'
  2023-07-08  9:35 NonGNU ELPA: New package 'xdg-appmenu' Akib Azmain Turja
  2023-07-09 18:07 ` Akib Azmain Turja
@ 2023-07-10  1:59 ` Richard Stallman
  2023-07-10  7:53   ` Akib Azmain Turja
  2023-07-19 16:23 ` Akib Azmain Turja
  2023-09-05 18:31 ` Akib Azmain Turja
  3 siblings, 1 reply; 14+ messages in thread
From: Richard Stallman @ 2023-07-10  1:59 UTC (permalink / raw)
  To: Akib Azmain Turja; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > I've just written a new package and would like to publish it to on
  > NonGNU ELPA:

People, is this a useful feature?  (I don't know.)
If it is, how about putting it it ih GNU ELPA>

Whether it is GNU ELPA or NonGNU ELPA, it calls for making arrangements,
not just patching it into a list!

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





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

* Re: NonGNU ELPA: New package 'xdg-appmenu'
  2023-07-10  1:59 ` Richard Stallman
@ 2023-07-10  7:53   ` Akib Azmain Turja
  0 siblings, 0 replies; 14+ messages in thread
From: Akib Azmain Turja @ 2023-07-10  7:53 UTC (permalink / raw)
  To: Richard Stallman; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > I've just written a new package and would like to publish it to on
>   > NonGNU ELPA:
>
> People, is this a useful feature?  (I don't know.)

Yeah, for example if you use EXWM, you can use XDG Appmenu to run GUI
applications directly.

> If it is, how about putting it it ih GNU ELPA>
>

Nice, but I'm unable to complete my paperwork right now, so...  :(

> Whether it is GNU ELPA or NonGNU ELPA, it calls for making arrangements,
> not just patching it into a list!

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: NonGNU ELPA: New package 'xdg-appmenu'
  2023-07-08  9:35 NonGNU ELPA: New package 'xdg-appmenu' Akib Azmain Turja
  2023-07-09 18:07 ` Akib Azmain Turja
  2023-07-10  1:59 ` Richard Stallman
@ 2023-07-19 16:23 ` Akib Azmain Turja
  2023-09-05 18:31 ` Akib Azmain Turja
  3 siblings, 0 replies; 14+ messages in thread
From: Akib Azmain Turja @ 2023-07-19 16:23 UTC (permalink / raw)
  To: Emacs Developer List

[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]

Ping?  Anyone?

Akib Azmain Turja <akib@disroot.org> writes:

> I've just written a new package and would like to publish it to on
> NonGNU ELPA:
>
> XDG Appmenu allows you to run XDG desktop application right from your
> Emacs.  To run an application, just do `M-x xdg-appmenu'.
>
> From 32b80f3bc0e4c35a74cc7027017676849ab311bf Mon Sep 17 00:00:00 2001
> From: Akib Azmain Turja <akib@disroot.org>
> Date: Sat, 8 Jul 2023 15:24:20 +0600
> Subject: [PATCH] * elpa-packages (xdg-appmenu): New package
>
> ---
>  elpa-packages | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/elpa-packages b/elpa-packages
> index 0610724..ef0af0c 100644
> --- a/elpa-packages
> +++ b/elpa-packages
> @@ -784,6 +784,8 @@
>   (xah-fly-keys		:url "https://github.com/xahlee/xah-fly-keys"
>    :ignored-files ("*.png"))
>  
> + (xdg-appmenu           :url "https://codeberg.org/akib/emacs-xdg-appmenu")
> +
>   (xkcd			:url "https://github.com/vibhavp/emacs-xkcd"
>    :readme "README.org"
>    :ignored-files ("LICENSE" ".travis.yml" "images"))
> -- 
> 2.40.1

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: NonGNU ELPA: New package 'xdg-appmenu'
  2023-07-08  9:35 NonGNU ELPA: New package 'xdg-appmenu' Akib Azmain Turja
                   ` (2 preceding siblings ...)
  2023-07-19 16:23 ` Akib Azmain Turja
@ 2023-09-05 18:31 ` Akib Azmain Turja
  2023-09-05 20:11   ` Stefan Kangas
  3 siblings, 1 reply; 14+ messages in thread
From: Akib Azmain Turja @ 2023-09-05 18:31 UTC (permalink / raw)
  To: Emacs Developer List, Philip Kaludercic

[-- Attachment #1: Type: text/plain, Size: 1275 bytes --]

Ping? (2)

Akib Azmain Turja <akib@disroot.org> writes:

> I've just written a new package and would like to publish it to on
> NonGNU ELPA:
>
> XDG Appmenu allows you to run XDG desktop application right from your
> Emacs.  To run an application, just do `M-x xdg-appmenu'.
>
> From 32b80f3bc0e4c35a74cc7027017676849ab311bf Mon Sep 17 00:00:00 2001
> From: Akib Azmain Turja <akib@disroot.org>
> Date: Sat, 8 Jul 2023 15:24:20 +0600
> Subject: [PATCH] * elpa-packages (xdg-appmenu): New package
>
> ---
>  elpa-packages | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/elpa-packages b/elpa-packages
> index 0610724..ef0af0c 100644
> --- a/elpa-packages
> +++ b/elpa-packages
> @@ -784,6 +784,8 @@
>   (xah-fly-keys		:url "https://github.com/xahlee/xah-fly-keys"
>    :ignored-files ("*.png"))
>  
> + (xdg-appmenu           :url "https://codeberg.org/akib/emacs-xdg-appmenu")
> +
>   (xkcd			:url "https://github.com/vibhavp/emacs-xkcd"
>    :readme "README.org"
>    :ignored-files ("LICENSE" ".travis.yml" "images"))
> -- 
> 2.40.1

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: NonGNU ELPA: New package 'xdg-appmenu'
  2023-09-05 18:31 ` Akib Azmain Turja
@ 2023-09-05 20:11   ` Stefan Kangas
  2023-09-06  6:27     ` Juri Linkov
                       ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Stefan Kangas @ 2023-09-05 20:11 UTC (permalink / raw)
  To: Akib Azmain Turja, Emacs Developer List, Philip Kaludercic; +Cc: Juri Linkov

Akib Azmain Turja <akib@disroot.org> writes:

> Ping? (2)
>
> Akib Azmain Turja <akib@disroot.org> writes:
>
>> I've just written a new package and would like to publish it to on
>> NonGNU ELPA:
>>
>> XDG Appmenu allows you to run XDG desktop application right from your
>> Emacs.  To run an application, just do `M-x xdg-appmenu'.

Thanks, this looks like a useful addition.  I have two questions:

- How does this compare to the work made by Juri in Bug#63911?  Could
  the efforts be merged somehow, such that the end result ends up in
  Emacs, or does that not make sense?  (I'm copying in Juri too.)

- Do you think that it might make sense to add it to GNU ELPA instead?
  I see that you're the only author, so we would only need a copyright
  assignment from you.

In case you're interested, there is also Bug#18132 where we have
previously discussed XDG and mailcap in relation to Dired.

>> From 32b80f3bc0e4c35a74cc7027017676849ab311bf Mon Sep 17 00:00:00 2001
>> From: Akib Azmain Turja <akib@disroot.org>
>> Date: Sat, 8 Jul 2023 15:24:20 +0600
>> Subject: [PATCH] * elpa-packages (xdg-appmenu): New package
>>
>> ---
>>  elpa-packages | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/elpa-packages b/elpa-packages
>> index 0610724..ef0af0c 100644
>> --- a/elpa-packages
>> +++ b/elpa-packages
>> @@ -784,6 +784,8 @@
>>   (xah-fly-keys		:url "https://github.com/xahlee/xah-fly-keys"
>>    :ignored-files ("*.png"))
>>
>> + (xdg-appmenu           :url "https://codeberg.org/akib/emacs-xdg-appmenu")
>> +
>>   (xkcd			:url "https://github.com/vibhavp/emacs-xkcd"
>>    :readme "README.org"
>>    :ignored-files ("LICENSE" ".travis.yml" "images"))
>> --
>> 2.40.1



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

* Re: NonGNU ELPA: New package 'xdg-appmenu'
  2023-09-05 20:11   ` Stefan Kangas
@ 2023-09-06  6:27     ` Juri Linkov
  2023-09-06  7:13       ` Stefan Kangas
  2023-09-06 18:47       ` Akib Azmain Turja
  2023-09-06  7:42     ` Philip Kaludercic
  2023-09-06 18:56     ` Akib Azmain Turja
  2 siblings, 2 replies; 14+ messages in thread
From: Juri Linkov @ 2023-09-06  6:27 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Akib Azmain Turja, Emacs Developer List, Philip Kaludercic

>>> I've just written a new package and would like to publish it to on
>>> NonGNU ELPA:
>>>
>>> XDG Appmenu allows you to run XDG desktop application right from your
>>> Emacs.  To run an application, just do `M-x xdg-appmenu'.
>
> Thanks, this looks like a useful addition.  I have two questions:
>
> - How does this compare to the work made by Juri in Bug#63911?  Could
>   the efforts be merged somehow, such that the end result ends up in
>   Emacs, or does that not make sense?  (I'm copying in Juri too.)

The patch in bug#63911 relies on the helper functions implemented
in the core package emacs/lisp/xdg.el such as 'xdg-mime-apps'
and 'xdg-desktop-read-file'.

The package https://codeberg.org/akib/emacs-xdg-appmenu
duplicates the work already done in xdg.el.

However, it's hard to compare these two implementations.
Maybe in case if something is missing in xdg.el
it could be improved based on code from the package?



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

* Re: NonGNU ELPA: New package 'xdg-appmenu'
  2023-09-06  6:27     ` Juri Linkov
@ 2023-09-06  7:13       ` Stefan Kangas
  2023-09-06 18:47       ` Akib Azmain Turja
  1 sibling, 0 replies; 14+ messages in thread
From: Stefan Kangas @ 2023-09-06  7:13 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Akib Azmain Turja, Emacs Developer List, Philip Kaludercic

Juri Linkov <juri@linkov.net> writes:

> The patch in bug#63911 relies on the helper functions implemented
> in the core package emacs/lisp/xdg.el such as 'xdg-mime-apps'
> and 'xdg-desktop-read-file'.
>
> The package https://codeberg.org/akib/emacs-xdg-appmenu
> duplicates the work already done in xdg.el.
>
> However, it's hard to compare these two implementations.
> Maybe in case if something is missing in xdg.el
> it could be improved based on code from the package?

It would be useful to improve xdg.el if there is something missing
there, indeed.

What do you think, Akib?



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

* Re: NonGNU ELPA: New package 'xdg-appmenu'
  2023-09-05 20:11   ` Stefan Kangas
  2023-09-06  6:27     ` Juri Linkov
@ 2023-09-06  7:42     ` Philip Kaludercic
  2023-09-06 18:56     ` Akib Azmain Turja
  2 siblings, 0 replies; 14+ messages in thread
From: Philip Kaludercic @ 2023-09-06  7:42 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Akib Azmain Turja, Emacs Developer List, Juri Linkov

Stefan Kangas <stefankangas@gmail.com> writes:

> Akib Azmain Turja <akib@disroot.org> writes:
>
>> Ping? (2)
>>
>> Akib Azmain Turja <akib@disroot.org> writes:
>>
>>> I've just written a new package and would like to publish it to on
>>> NonGNU ELPA:
>>>
>>> XDG Appmenu allows you to run XDG desktop application right from your
>>> Emacs.  To run an application, just do `M-x xdg-appmenu'.
>
> Thanks, this looks like a useful addition.  I have two questions:
>
> - How does this compare to the work made by Juri in Bug#63911?  Could
>   the efforts be merged somehow, such that the end result ends up in
>   Emacs, or does that not make sense?  (I'm copying in Juri too.)

I am inclined to argue for something like this as well, the
functionality itself it rather limited for just one package.

> - Do you think that it might make sense to add it to GNU ELPA instead?
>   I see that you're the only author, so we would only need a copyright
>   assignment from you.

From what I recall, Akib is in a situation where he couldn't sign the
copyright assignment.  I don't know if anything has changed on that
front, but if it has, it would be a nice opportunity to move some
packages from NonGNU to GNU ELPA.

> In case you're interested, there is also Bug#18132 where we have
> previously discussed XDG and mailcap in relation to Dired.
>
>>> From 32b80f3bc0e4c35a74cc7027017676849ab311bf Mon Sep 17 00:00:00 2001
>>> From: Akib Azmain Turja <akib@disroot.org>
>>> Date: Sat, 8 Jul 2023 15:24:20 +0600
>>> Subject: [PATCH] * elpa-packages (xdg-appmenu): New package
>>>
>>> ---
>>>  elpa-packages | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/elpa-packages b/elpa-packages
>>> index 0610724..ef0af0c 100644
>>> --- a/elpa-packages
>>> +++ b/elpa-packages
>>> @@ -784,6 +784,8 @@
>>>   (xah-fly-keys		:url "https://github.com/xahlee/xah-fly-keys"
>>>    :ignored-files ("*.png"))
>>>
>>> + (xdg-appmenu           :url "https://codeberg.org/akib/emacs-xdg-appmenu")
>>> +
>>>   (xkcd			:url "https://github.com/vibhavp/emacs-xkcd"
>>>    :readme "README.org"
>>>    :ignored-files ("LICENSE" ".travis.yml" "images"))
>>> --
>>> 2.40.1



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

* Re: NonGNU ELPA: New package 'xdg-appmenu'
  2023-09-06  6:27     ` Juri Linkov
  2023-09-06  7:13       ` Stefan Kangas
@ 2023-09-06 18:47       ` Akib Azmain Turja
  2023-09-06 20:00         ` Stefan Kangas
  1 sibling, 1 reply; 14+ messages in thread
From: Akib Azmain Turja @ 2023-09-06 18:47 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Stefan Kangas, Emacs Developer List, Philip Kaludercic

[-- Attachment #1: Type: text/plain, Size: 1589 bytes --]

Juri Linkov <juri@linkov.net> writes:

>>>> I've just written a new package and would like to publish it to on
>>>> NonGNU ELPA:
>>>>
>>>> XDG Appmenu allows you to run XDG desktop application right from your
>>>> Emacs.  To run an application, just do `M-x xdg-appmenu'.
>>
>> Thanks, this looks like a useful addition.  I have two questions:
>>
>> - How does this compare to the work made by Juri in Bug#63911?  Could
>>   the efforts be merged somehow, such that the end result ends up in
>>   Emacs, or does that not make sense?  (I'm copying in Juri too.)
>
> The patch in bug#63911 relies on the helper functions implemented
> in the core package emacs/lisp/xdg.el such as 'xdg-mime-apps'
> and 'xdg-desktop-read-file'.

Is it something new (in Emacs 29 or master branch) or did I just missed
these nice functions?

>
> The package https://codeberg.org/akib/emacs-xdg-appmenu
> duplicates the work already done in xdg.el.

Taking a quick look, the answer is looks like yeah, sadly.

>
> However, it's hard to compare these two implementations.
> Maybe in case if something is missing in xdg.el
> it could be improved based on code from the package?

I don't think anything can be improved.  xdg.el contains a full-blown
desktop file parser.  And xdg-appmenu, just a hacky regexp based
implement that just looks for specific keys in a particular group.

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: NonGNU ELPA: New package 'xdg-appmenu'
  2023-09-05 20:11   ` Stefan Kangas
  2023-09-06  6:27     ` Juri Linkov
  2023-09-06  7:42     ` Philip Kaludercic
@ 2023-09-06 18:56     ` Akib Azmain Turja
  2 siblings, 0 replies; 14+ messages in thread
From: Akib Azmain Turja @ 2023-09-06 18:56 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Emacs Developer List, Philip Kaludercic, Juri Linkov

[-- Attachment #1: Type: text/plain, Size: 2573 bytes --]

Stefan Kangas <stefankangas@gmail.com> writes:

> Akib Azmain Turja <akib@disroot.org> writes:
>
>> Ping? (2)
>>
>> Akib Azmain Turja <akib@disroot.org> writes:
>>
>>> I've just written a new package and would like to publish it to on
>>> NonGNU ELPA:
>>>
>>> XDG Appmenu allows you to run XDG desktop application right from your
>>> Emacs.  To run an application, just do `M-x xdg-appmenu'.
>
> Thanks, this looks like a useful addition.  I have two questions:
>
> - How does this compare to the work made by Juri in Bug#63911?  Could
>   the efforts be merged somehow, such that the end result ends up in
>   Emacs, or does that not make sense?  (I'm copying in Juri too.)
>

Taking a quick look at Bug#63911, IIUC that ticket is about adding the
"Open with" option in Dired like the GUI file managers, right?  On the
other hand, my package launches an app, without any file, like you'd do
from the application menu (or whatever term, I don't know) of GNOME or
KDE.

> - Do you think that it might make sense to add it to GNU ELPA instead?
>   I see that you're the only author, so we would only need a copyright
>   assignment from you.
>

I took a look at xdg.el, and seems like it already has everything
needed.  I think it might make it sense to put it directly in xdg.el, it
would be a small addition I think, just the command and one or two
helper function.

> In case you're interested, there is also Bug#18132 where we have
> previously discussed XDG and mailcap in relation to Dired.
>
>>> From 32b80f3bc0e4c35a74cc7027017676849ab311bf Mon Sep 17 00:00:00 2001
>>> From: Akib Azmain Turja <akib@disroot.org>
>>> Date: Sat, 8 Jul 2023 15:24:20 +0600
>>> Subject: [PATCH] * elpa-packages (xdg-appmenu): New package
>>>
>>> ---
>>>  elpa-packages | 2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/elpa-packages b/elpa-packages
>>> index 0610724..ef0af0c 100644
>>> --- a/elpa-packages
>>> +++ b/elpa-packages
>>> @@ -784,6 +784,8 @@
>>>   (xah-fly-keys		:url "https://github.com/xahlee/xah-fly-keys"
>>>    :ignored-files ("*.png"))
>>>
>>> + (xdg-appmenu           :url "https://codeberg.org/akib/emacs-xdg-appmenu")
>>> +
>>>   (xkcd			:url "https://github.com/vibhavp/emacs-xkcd"
>>>    :readme "README.org"
>>>    :ignored-files ("LICENSE" ".travis.yml" "images"))
>>> --
>>> 2.40.1
>

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: NonGNU ELPA: New package 'xdg-appmenu'
  2023-09-06 18:47       ` Akib Azmain Turja
@ 2023-09-06 20:00         ` Stefan Kangas
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Kangas @ 2023-09-06 20:00 UTC (permalink / raw)
  To: Akib Azmain Turja, Juri Linkov; +Cc: Emacs Developer List, Philip Kaludercic

Akib Azmain Turja <akib@disroot.org> writes:

>> The patch in bug#63911 relies on the helper functions implemented
>> in the core package emacs/lisp/xdg.el such as 'xdg-mime-apps'
>> and 'xdg-desktop-read-file'.
>
> Is it something new (in Emacs 29 or master branch) or did I just missed
> these nice functions?

xdg.el is new in Emacs 26.1, but some of its functions were added in
later versions.



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

end of thread, other threads:[~2023-09-06 20:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-08  9:35 NonGNU ELPA: New package 'xdg-appmenu' Akib Azmain Turja
2023-07-09 18:07 ` Akib Azmain Turja
2023-07-09 19:39   ` Eshel Yaron
2023-07-10  1:59 ` Richard Stallman
2023-07-10  7:53   ` Akib Azmain Turja
2023-07-19 16:23 ` Akib Azmain Turja
2023-09-05 18:31 ` Akib Azmain Turja
2023-09-05 20:11   ` Stefan Kangas
2023-09-06  6:27     ` Juri Linkov
2023-09-06  7:13       ` Stefan Kangas
2023-09-06 18:47       ` Akib Azmain Turja
2023-09-06 20:00         ` Stefan Kangas
2023-09-06  7:42     ` Philip Kaludercic
2023-09-06 18:56     ` Akib Azmain Turja

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.