unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Patches to add emacs-rfcview and emacs-ffap-rfc-space
@ 2016-04-04  0:58 Chris Marusich
  2016-04-05  9:29 ` Alex Kost
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Marusich @ 2016-04-04  0:58 UTC (permalink / raw)
  To: guix-devel


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

Hi,

The attached patches add some useful modules for reading RFCs (and STDs)
in Emacs.  To take full advantage of them (e.g., read RFCs from a local
directory), you need to make some straightforward modifications to your
~/.emacs file which are described in comments within the elisp modules.

-- 
Chris

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-emacs-rfcview.patch --]
[-- Type: text/x-patch, Size: 2027 bytes --]

From 169b960582996adc31ee3792195d4e0dcc62eea3 Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@gmail.com>
Date: Sat, 2 Apr 2016 13:29:05 -0700
Subject: [PATCH 1/2] gnu: Add emacs-rfcview.

* gnu/packages/emacs.scm (emacs-rfcview): New variable.
---
 gnu/packages/emacs.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index f53f73b..f1b2d11 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1507,3 +1507,30 @@ without modifier keys.  It's similar to Vim's separation of commands and
 insertion mode.  When enabled all keys are implicitly prefixed with
 @samp{C-} (among other helpful shortcuts).")
       (license license:gpl3+))))
+
+(define-public emacs-rfcview
+  (package
+    (name "emacs-rfcview")
+    (version "0.13")
+    (home-page "http://www.loveshack.ukfsn.org/emacs")
+    (source (origin
+              (method uncompressed-file-fetch)
+              (uri "http://www.loveshack.ukfsn.org/emacs/rfcview.el")
+              (sha256
+               (base32
+                "0ympj5rxig383zl2jf0pzdsa80nnq0dpvjiriq0ivfi98fj7kxbz"))))
+    (build-system emacs-build-system)
+    (native-inputs
+     `(("emacs" ,emacs-no-x)))
+    (synopsis "Prettify Request for Comments (RFC) documents")
+    (description "The Internet Engineering Task Force (IETF) and the Internet
+Society (ISOC) publish various Internet-related protocols and specifications
+as \"Request for Comments\" (RFC) documents and Internet Standard (STD)
+documents.  RFCs and STDs are published in a simple text form.  This package
+provides an Emacs major mode, rfcview-mode, which makes it more pleasant to
+read these documents in Emacs.  It prettifies the text and adds
+hyperlinks/menus for easier navigation.  It also provides functions for
+browsing the index of RFC documents and fetching them from remote servers or
+local directories.")
+    (license license:gpl3+)))
+
-- 
2.7.3


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-gnu-Add-emacs-ffap-rfc-space.patch --]
[-- Type: text/x-patch, Size: 1939 bytes --]

From b30527de5855d99d9187b931f4bf67058eb4439a Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@gmail.com>
Date: Sat, 2 Apr 2016 13:29:38 -0700
Subject: [PATCH 2/2] gnu: Add emacs-ffap-rfc-space.

* gnu/packages/emacs.scm (emacs-ffap-rfc-space): New variable.
---
 gnu/packages/emacs.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index f1b2d11..fdead15 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -1534,3 +1534,28 @@ browsing the index of RFC documents and fetching them from remote servers or
 local directories.")
     (license license:gpl3+)))
 
+(define-public emacs-ffap-rfc-space
+  (package
+    (name "emacs-ffap-rfc-space")
+    (version "12")
+    (home-page "http://user42.tuxfamily.org/ffap-rfc-space/index.html")
+    (source (origin
+              (method uncompressed-file-fetch)
+              (uri "http://download.tuxfamily.org/user42/ffap-rfc-space.el")
+              (sha256
+               (base32
+                "1iv61dv57a73mdps7rn6zmgz7nqh14v0ninidyrasy45b1nv6gck"))))
+    (build-system emacs-build-system)
+    (native-inputs
+     `(("emacs" ,emacs-no-x)))
+    (synopsis "Make ffap recognize an RFC with a space before its number")
+    (description "The Internet Engineering Task Force (IETF) and the
+Internet Society (ISOC) publish various Internet-related protocols and
+specifications as \"Request for Comments\" (RFC) documents.  The
+built-in Emacs module \"ffap\" (Find File at Point) has the ability to
+recognize names at point which look like \"RFC1234\" and \"RFC-1234\"
+and load the appropriate RFC from a remote server.  However, it fails
+to recognize a name like \"RFC 1234\".  This package enhances ffap so
+that it correctly finds RFCs even when a space appears before the
+number.")
+    (license license:gpl3+)))
-- 
2.7.3


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

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

* Re: Patches to add emacs-rfcview and emacs-ffap-rfc-space
  2016-04-04  0:58 Patches to add emacs-rfcview and emacs-ffap-rfc-space Chris Marusich
@ 2016-04-05  9:29 ` Alex Kost
  2016-04-12  8:59   ` Alex Kost
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Kost @ 2016-04-05  9:29 UTC (permalink / raw)
  To: Chris Marusich; +Cc: guix-devel

Chris Marusich (2016-04-04 03:58 +0300) wrote:

> Hi,
>
> The attached patches add some useful modules for reading RFCs (and STDs)
> in Emacs.

Overall the patches look good to me, thanks!  But there is a problem
with both packages: the URL of the origin does not point to a versioned
file, so when the author will touch the source, the hash will be changed
and our package will not work anymore.  I suppose there are no mirrors
where we can fetch the "constant" source code, so we probably have to
live with this, but it is a potential problem-maker.

> To take full advantage of them (e.g., read RFCs from a local
> directory), you need to make some straightforward modifications to your
> ~/.emacs file which are described in comments within the elisp modules.

I think that for ffap-rfc-space, no changes in .emacs need to be done,
as the generated "ffap-rfc-space-autoloads.el" file contains the
required modification for ffap command.

Unluckily, rfcview.el package does not have an autoload cookie for
adjusting 'auto-mode-alist' as it is described there, so this
modification has to be done by a user.  But this is easy to fix, so if
you wish to contact with the maintainer you may ask him to make this
change (as it is done, for example, in csv-mode¹).

¹ http://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/packages/csv-mode/csv-mode.el#n354

-- 
Alex

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

* Re: Patches to add emacs-rfcview and emacs-ffap-rfc-space
  2016-04-05  9:29 ` Alex Kost
@ 2016-04-12  8:59   ` Alex Kost
  2016-04-14 16:59     ` Federico Beffa
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Kost @ 2016-04-12  8:59 UTC (permalink / raw)
  To: Chris Marusich; +Cc: guix-devel, Federico Beffa

Alex Kost (2016-04-05 12:29 +0300) wrote:

> Chris Marusich (2016-04-04 03:58 +0300) wrote:
>
>> Hi,
>>
>> The attached patches add some useful modules for reading RFCs (and STDs)
>> in Emacs.
>
> Overall the patches look good to me, thanks!  But there is a problem
> with both packages: the URL of the origin does not point to a versioned
> file, so when the author will touch the source, the hash will be changed
> and our package will not work anymore.  I suppose there are no mirrors
> where we can fetch the "constant" source code, so we probably have to
> live with this, but it is a potential problem-maker.

Ping for the other reviewers.  I don't know what to do with these
packages: on one hand they are unreliable because their hashes may
change any time.  But OTOH we already have the same potential problems
with 'emacs-mit-scheme-doc' and 'emacs-constants' packages.

I personally wouldn't like to include such packages in Guix at all.  I
think the only hope with them is that they are dead, so their hashes
will not be changed.  Federico, did you have this problem in mind when
you packaged them?

-- 
Alex

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

* Re: Patches to add emacs-rfcview and emacs-ffap-rfc-space
  2016-04-12  8:59   ` Alex Kost
@ 2016-04-14 16:59     ` Federico Beffa
  2016-04-15  8:36       ` Alex Kost
  0 siblings, 1 reply; 5+ messages in thread
From: Federico Beffa @ 2016-04-14 16:59 UTC (permalink / raw)
  To: Alex Kost; +Cc: Guix-devel

On Tue, Apr 12, 2016 at 10:59 AM, Alex Kost <alezost@gmail.com> wrote:
> Alex Kost (2016-04-05 12:29 +0300) wrote:
>
>> Chris Marusich (2016-04-04 03:58 +0300) wrote:
>>
>>> Hi,
>>>
>>> The attached patches add some useful modules for reading RFCs (and STDs)
>>> in Emacs.
>>
>> Overall the patches look good to me, thanks!  But there is a problem
>> with both packages: the URL of the origin does not point to a versioned
>> file, so when the author will touch the source, the hash will be changed
>> and our package will not work anymore.  I suppose there are no mirrors
>> where we can fetch the "constant" source code, so we probably have to
>> live with this, but it is a potential problem-maker.
>
> Ping for the other reviewers.  I don't know what to do with these
> packages: on one hand they are unreliable because their hashes may
> change any time.  But OTOH we already have the same potential problems
> with 'emacs-mit-scheme-doc' and 'emacs-constants' packages.
>
> I personally wouldn't like to include such packages in Guix at all.  I
> think the only hope with them is that they are dead, so their hashes
> will not be changed.  Federico, did you have this problem in mind when
> you packaged them?

Of course I did and I agree it is annoying.

'emacs-constants' has not been changed in a long time because it is
kind of "done". I've recently sent a patch to the author and took the
occasion to mention to him that it would help us to have versioned
releases. He accepted the patch, but I think he is not into archiving
old versions. So probably this package will soon break, but it will be
a matter of fixing the hash (and maybe again in a few years).

In any case, from my point of view, proposing to drop packages is not
very constructive. A more helpful approach would be to find a place
where we could archive specific versions of packages with this kind of
problem. I know that people here do not particularly like GitHub, but
possibly a similar place/service could do.

Regards,
Fede

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

* Re: Patches to add emacs-rfcview and emacs-ffap-rfc-space
  2016-04-14 16:59     ` Federico Beffa
@ 2016-04-15  8:36       ` Alex Kost
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Kost @ 2016-04-15  8:36 UTC (permalink / raw)
  To: Federico Beffa; +Cc: Guix-devel

Federico Beffa (2016-04-14 19:59 +0300) wrote:

> On Tue, Apr 12, 2016 at 10:59 AM, Alex Kost <alezost@gmail.com> wrote:
>> Alex Kost (2016-04-05 12:29 +0300) wrote:
>>
>>> Chris Marusich (2016-04-04 03:58 +0300) wrote:
>>>
>>>> Hi,
>>>>
>>>> The attached patches add some useful modules for reading RFCs (and STDs)
>>>> in Emacs.
>>>
>>> Overall the patches look good to me, thanks!  But there is a problem
>>> with both packages: the URL of the origin does not point to a versioned
>>> file, so when the author will touch the source, the hash will be changed
>>> and our package will not work anymore.  I suppose there are no mirrors
>>> where we can fetch the "constant" source code, so we probably have to
>>> live with this, but it is a potential problem-maker.
>>
>> Ping for the other reviewers.  I don't know what to do with these
>> packages: on one hand they are unreliable because their hashes may
>> change any time.  But OTOH we already have the same potential problems
>> with 'emacs-mit-scheme-doc' and 'emacs-constants' packages.
>>
>> I personally wouldn't like to include such packages in Guix at all.  I
>> think the only hope with them is that they are dead, so their hashes
>> will not be changed.  Federico, did you have this problem in mind when
>> you packaged them?
>
> Of course I did and I agree it is annoying.
>
> 'emacs-constants' has not been changed in a long time because it is
> kind of "done". I've recently sent a patch to the author and took the
> occasion to mention to him that it would help us to have versioned
> releases. He accepted the patch, but I think he is not into archiving
> old versions. So probably this package will soon break, but it will be
> a matter of fixing the hash (and maybe again in a few years).
>
> In any case, from my point of view, proposing to drop packages is not
> very constructive. A more helpful approach would be to find a place
> where we could archive specific versions of packages with this kind of
> problem. I know that people here do not particularly like GitHub, but
> possibly a similar place/service could do.

Yeah, it would be perfect.  Perhaps some day we'll have some kind of
"Guix archve" for this purpose.  OK, so I'm applying these patches to
master.  Sorry for the delay, Chris, and thanks for contributing!

-- 
Alex

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

end of thread, other threads:[~2016-04-15  8:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-04  0:58 Patches to add emacs-rfcview and emacs-ffap-rfc-space Chris Marusich
2016-04-05  9:29 ` Alex Kost
2016-04-12  8:59   ` Alex Kost
2016-04-14 16:59     ` Federico Beffa
2016-04-15  8:36       ` Alex Kost

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).