[PATCH] gnu: Add emacs-openwith.

  • Done
  • quality assurance status badge
Details
3 participants
  • David Wilson
  • Marius Bakke
  • zimoun
Owner
unassigned
Submitted by
David Wilson
Severity
normal

Debbugs page

David Wilson wrote 5 years ago
(address . guix-patches@gnu.org)
6928567c-cd7f-40d9-be83-64aae9cc9cac@www.fastmail.com
Hi Guix!

This patch adds the "openwith" package for Emacs to make it easier to launch external applications for configured file types. I've tested the package and run it through "guix lint", all looks good.

Thanks!

David
From cdd934a91f03450b1eb8fd89aca8272d94438620 Mon Sep 17 00:00:00 2001
From: David Wilson <david@daviwil.com>
Date: Tue, 19 Nov 2019 06:24:31 -0800
Subject: [PATCH] gnu: Add emacs-openwith.

* gnu/packages/emacs-xyz.scm (emacs-openwith) New variable.
---
gnu/packages/emacs-xyz.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ea4ab0e6f9..4fab900c7a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -10248,6 +10248,27 @@ list of commands is displayed in a handy popup.")
characters from end of lines.")
(license license:gpl3+)))
+(define-public emacs-openwith
+ (let ((commit "1dc89670822966fab6e656f6519fdd7f01e8301a")
+ (revision "0"))
+ (package
+ (name "emacs-openwith")
+ (home-page "https://github.com/emacsmirror/openwith")
+ (version (git-version "0.0.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference (url home-page) (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1wl6gnxsyhaad4cl9bxjc0qbc5jzvlwbwjbajs0n1s6qr07d6r01"))))
+ (build-system emacs-build-system)
+ (synopsis "Emacs")
+ (description
+ "This package enables external applications to be launched for
+configured file types when you use commands like @code{find-file}, etc.")
+ (license license:gpl2+))))
+
(define-public emacs-org-edit-latex
(package
(name "emacs-org-edit-latex")
--
2.24.0
Marius Bakke wrote 5 years ago
875zjfaa8i.fsf@devup.no
"David Wilson" <david@daviwil.com> writes:

Toggle quote (4 lines)
> Hi Guix!
>
> This patch adds the "openwith" package for Emacs to make it easier to launch external applications for configured file types. I've tested the package and run it through "guix lint", all looks good.

Thanks!

[...]

Toggle quote (7 lines)
> +(define-public emacs-openwith
> + (let ((commit "1dc89670822966fab6e656f6519fdd7f01e8301a")
> + (revision "0"))
> + (package
> + (name "emacs-openwith")
> + (home-page "https://github.com/emacsmirror/openwith")

The actual home page is here according to the README:


[...]

Toggle quote (2 lines)
> + (synopsis "Emacs")

This synopsis is a bit short. :-)

Toggle quote (4 lines)
> + (description
> + "This package enables external applications to be launched for
> +configured file types when you use commands like @code{find-file}, etc.")

Maybe "This package lets you associate file name patterns with
external applications that are automatically invoked when you use
commands like @code{find-file}, etc".

Dunno, YMMV :-) It just wasn't clear to me how it worked (and how to
interpret the "etc") without the extra context.

Can you send an updated patch?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl3UTq0ACgkQoqBt8qM6
VPqzrQgAyk5hlXFULyT/6uvXHw+TOpkjQS6Z+CvkhjehSbgE22ujnTOvWLgR4Wji
RFezIbRCOZi6L3KbvqoBJAl8PCpH4d+W7NwpLT7RGKVa34c+LsbgLNiZzzNYjFNu
8PNRQOjCJDkaScSTQpH1G5TJYvC8vWSlrPXgtzdSHe/IFghN+bPbMbFiM9N3sYVx
tWQcr56T66EwH+ZFEahh6zlgOE+MHYGiZDV/OAsUpzqRashcksgkl9XpuDvyFzj4
/gvppDtnpNc1XiUeYK+oFNjUmw7BSq+yQnheFNwniw/NfLKHSZtyBqRtLQjd5ccc
yO1JOTNp2BmaB6cmUyjMFKRH0JEuoA==
=5IWx
-----END PGP SIGNATURE-----

David Wilson wrote 5 years ago
69ad356e-7f07-41df-b381-dfc90e71454d@www.fastmail.com
Hi Marius, thanks for the reply!

On Tue, Nov 19, 2019, at 12:21 PM, Marius Bakke wrote:
Toggle quote (6 lines)
>
> The actual home page is here according to the README:
>
> https://bitbucket.org/jpkotta/openwith
>

Thanks! Fixed.

Toggle quote (4 lines)
>
> This synopsis is a bit short. :-)
>

I swear I put something in for that, sorry I missed it!

Toggle quote (6 lines)
>
> Maybe "This package lets you associate file name patterns with
> external applications that are automatically invoked when you use
> commands like @code{find-file}, etc".
>

I've taken your suggestion and improved on it like so:

"This package enables you to associate file name patterns with external
applications that are automatically invoked when you use commands like
@code{find-file}. For example, you can have it open @code{png} files with
@code{feh} and @code{mp4} files with @code{mpv}. This is especially useful
when browsing files with Dired."

Updated patch is attached, thanks again!

David
From c53654238337dda9f6cad64f69dea87cedd0450f Mon Sep 17 00:00:00 2001
From: David Wilson <david@daviwil.com>
Date: Tue, 19 Nov 2019 06:24:31 -0800
Subject: [PATCH] gnu: Add emacs-openwith.

* gnu/packages/emacs-xyz.scm (emacs-openwith) New variable.
---
gnu/packages/emacs-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 6dcbd00307..a2e9164001 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -10272,6 +10272,30 @@ list of commands is displayed in a handy popup.")
characters from end of lines.")
(license license:gpl3+)))
+(define-public emacs-openwith
+ (let ((commit "1dc89670822966fab6e656f6519fdd7f01e8301a")
+ (revision "0"))
+ (package
+ (name "emacs-openwith")
+ (home-page "https://bitbucket.org/jpkotta/openwith")
+ (version (git-version "0.0.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference (url home-page) (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1wl6gnxsyhaad4cl9bxjc0qbc5jzvlwbwjbajs0n1s6qr07d6r01"))))
+ (build-system emacs-build-system)
+ (synopsis "Open external applications for files with Emacs")
+ (description
+ "This package enables you to associate file name patterns with external
+applications that are automatically invoked when you use commands like
+@code{find-file}. For example, you can have it open @code{png} files with
+@code{feh} and @code{mp4} files with @code{mpv}. This is especially useful
+when browsing files with Dired.")
+ (license license:gpl2+))))
+
(define-public emacs-org-edit-latex
(package
(name "emacs-org-edit-latex")
--
2.24.0
Marius Bakke wrote 5 years ago
87tv6x6pq6.fsf@devup.no
"David Wilson" <david@daviwil.com> writes:

Toggle quote (14 lines)
>>
>> Maybe "This package lets you associate file name patterns with
>> external applications that are automatically invoked when you use
>> commands like @code{find-file}, etc".
>>
>
> I've taken your suggestion and improved on it like so:
>
> "This package enables you to associate file name patterns with external
> applications that are automatically invoked when you use commands like
> @code{find-file}. For example, you can have it open @code{png} files with
> @code{feh} and @code{mp4} files with @code{mpv}. This is especially useful
> when browsing files with Dired."

Thank you! That description is much better. :-)

Toggle quote (2 lines)
> Updated patch is attached, thanks again!

I found that 'git-fetch' failed, so I changed the patch to use
'hg-fetch'. It still produced the same hash.

But, I read in another message that BitBucket is shutting down Mercurial
support in 2020, so I'm not sure what to do about it. Thoughts?

In any case the patch is applied!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl3W2UEACgkQoqBt8qM6
VPrjDggAvEHApLmYyfkMkgopXoM41feYNPAHSG0jc3hnYcizn8tag6gkceGkc8MP
9A1A3cT5DIS5eJySzEslQbEgXwan3SDOGLfeIIXc22Rg8FKapqUBzPZAnbK/IcgQ
Jubi0qJ1a6Hs/cqi4QxsgcZxz6Q9bwiSohAP8YRYcR9hFip+1Xr4BYgJLb96MYpp
tXZHid47ZrV7uUr5Av6ylBW8YrKYlgDI7tsB/IUPrJj6G03UL1fNuQewLvEjcfTV
H4Vu4rYYG3BsP6kcv47j3a5dROJn9bSTKw3p5aWbw/GYmLEAea7QPGygld7WEEiF
Myp+MSmjCbebUv5yxSVv2ipP4J1jcw==
=ctb7
-----END PGP SIGNATURE-----

Closed
zimoun wrote 5 years ago
Re: bug#38272: [PATCH] gnu: Add emacs-openwith.
CAJ3okZ1Cox-uY8CceqZRsSjB1XRR_ZHB1rCPbh2-NecXtC5PvQ@mail.gmail.com
Hi Marius,

On Thu, 21 Nov 2019 at 19:37, Marius Bakke <mbakke@fastmail.com> wrote:

Toggle quote (3 lines)
> But, I read in another message that BitBucket is shutting down Mercurial
> support in 2020, so I'm not sure what to do about it. Thoughts?

The timeline of the shutdown is here [1] so we have still some time. :-)

The best seems to first list all the packages offended via some scheme
code -- I have no idea how many packages will be impacted.
Then contact each upstream to know what is their plan, i.e., where the
new location of the source will be: git conversion and still on
BitBucket; still hg and move to elsewhere; etc.

I do not know if it is better to open only one bug report to track the
progress (maybe my preference), or to open one bug report per package.

What do you think?


All the best,
simon

Marius Bakke wrote 5 years ago
87y2w47vuw.fsf@devup.no
zimoun <zimon.toutoune@gmail.com> writes:

Toggle quote (11 lines)
> Hi Marius,
>
> On Thu, 21 Nov 2019 at 19:37, Marius Bakke <mbakke@fastmail.com> wrote:
>
>> But, I read in another message that BitBucket is shutting down Mercurial
>> support in 2020, so I'm not sure what to do about it. Thoughts?
>
> The timeline of the shutdown is here [1] so we have still some time. :-)
>
> [1] https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket

Thanks for the link. I hope the affected archives will be available
through the Software Heritage API for the time travellers among us.

Toggle quote (6 lines)
> The best seems to first list all the packages offended via some scheme
> code -- I have no idea how many packages will be impacted.
> Then contact each upstream to know what is their plan, i.e., where the
> new location of the source will be: git conversion and still on
> BitBucket; still hg and move to elsewhere; etc.

For this package in particular, I think it's okay to go with the
original emacsmirror source David used, as the code had not changed
since 2012. :-)

More active packages probably already have a migration plan, so I
suppose we'll have to deal with it on a case by case basis.

Toggle quote (5 lines)
> I do not know if it is better to open only one bug report to track the
> progress (maybe my preference), or to open one bug report per package.
>
> What do you think?

I think one bug to track it is sufficient, but no strong opinion.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl3bA/cACgkQoqBt8qM6
VPpgbgf+IbeUkG4VKqCX8GivwMaqVkatlL/HnkaTzsHh7ZZVoFMUaqo2z4DjCzzh
ag8x+Upp/iohSkXIFgHcCFR+JCQhfEO5IuRWkK3O1k+s5UVbFzn+GVw/UfTJ6lp0
A8Rrqcrc70O3HZ/Mv/N4F6R87CFZ3n3LTN//hPd4hJTz2STDnKo/TlOkDYwVw3zG
G8bxOZiN0gSOl+gQLBLB9brKO1iYBH+8eHDTMZWVfdoQSjYWp1Jt+DMNf/KI1Gb1
3b6FoA1lFzZUVAOQVxR51XstRkF/dc2bAAPjcf7X7CaUUGjKJno87n00rz1RJa4W
1HEwh8ZWTW6sbeMOFyGLSFfc92hL/g==
=R33U
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 38272
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