all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [ANN] Emacs-Guix 0.3.4
@ 2017-12-28 20:20 Alex Kost
  2017-12-28 20:32 ` Daniel Pimentel
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Alex Kost @ 2017-12-28 20:20 UTC (permalink / raw)
  To: help-guix

Hello, Emacs-Guix (Emacs interface for GNU Guix) version 0.3.4 has been
released.  It may be installed with "guix package -i emacs-guix".

The main new features are:

1. "M-x guix-hash": it prompts for a file, calculates its hash and puts
   it into kill-ring (i.e., you can insert it with "C-y").  If it is
   called on a directory, it ignores VCS files (like "guix hash
   --recursive --exclude-vcs").  Also it supports dired-mode.  Thanks to
   ng0 for the idea of this command!

2. "M-x guix-derivation-mode": this major mode makes Guix derivations
   more human readable by indenting them and by making buttons from the
   store file names.  It is enabled automatically in "/gnu/store/….drv"
   files.  Many thanks to Oleg Pykhalov for inventing and implementing
   this feature!

3. As you probably know there are many single-line Guile files in the
   store, for example:

     /gnu/store/…-shepherd.conf
     /gnu/store/…-activate-service
     /var/guix/profiles/system/boot

   Similarly to the derivation files, the above files are not human
   readable as they are one-liners.  Now (I mean with Emacs-Guix 0.3.4),
   whenever you open such a file, it will be re-indented (its buffer,
   not the file itself!) and scheme-mode will be enabled there.

4. "M-x guix-superseded-packages": well, it just displays a list of
   superseded packages.

Happy Guix Year :-)

-- 
Alex

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

* Re: [ANN] Emacs-Guix 0.3.4
  2017-12-28 20:20 [ANN] Emacs-Guix 0.3.4 Alex Kost
@ 2017-12-28 20:32 ` Daniel Pimentel
  2017-12-28 22:49 ` ng0
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Daniel Pimentel @ 2017-12-28 20:32 UTC (permalink / raw)
  To: Alex Kost; +Cc: Help-Guix, help-guix

Congratulation Alex and Guix team:)

Happy guix year,

---
Daniel Pimentel (d4n1)

On 2017-12-28 17:20, Alex Kost wrote:
> Hello, Emacs-Guix (Emacs interface for GNU Guix) version 0.3.4 has been
> released.  It may be installed with "guix package -i emacs-guix".
> 
> The main new features are:
> 
> 1. "M-x guix-hash": it prompts for a file, calculates its hash and puts
>    it into kill-ring (i.e., you can insert it with "C-y").  If it is
>    called on a directory, it ignores VCS files (like "guix hash
>    --recursive --exclude-vcs").  Also it supports dired-mode.  Thanks 
> to
>    ng0 for the idea of this command!
> 
> 2. "M-x guix-derivation-mode": this major mode makes Guix derivations
>    more human readable by indenting them and by making buttons from the
>    store file names.  It is enabled automatically in "/gnu/store/….drv"
>    files.  Many thanks to Oleg Pykhalov for inventing and implementing
>    this feature!
> 
> 3. As you probably know there are many single-line Guile files in the
>    store, for example:
> 
>      /gnu/store/…-shepherd.conf
>      /gnu/store/…-activate-service
>      /var/guix/profiles/system/boot
> 
>    Similarly to the derivation files, the above files are not human
>    readable as they are one-liners.  Now (I mean with Emacs-Guix 
> 0.3.4),
>    whenever you open such a file, it will be re-indented (its buffer,
>    not the file itself!) and scheme-mode will be enabled there.
> 
> 4. "M-x guix-superseded-packages": well, it just displays a list of
>    superseded packages.
> 
> Happy Guix Year :-)

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

* Re: [ANN] Emacs-Guix 0.3.4
  2017-12-28 20:20 [ANN] Emacs-Guix 0.3.4 Alex Kost
  2017-12-28 20:32 ` Daniel Pimentel
@ 2017-12-28 22:49 ` ng0
  2017-12-29 17:44 ` Oleg Pykhalov
  2018-01-08 14:57 ` Ludovic Courtès
  3 siblings, 0 replies; 10+ messages in thread
From: ng0 @ 2017-12-28 22:49 UTC (permalink / raw)
  To: Alex Kost; +Cc: help-guix

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

Alex Kost transcribed 1.4K bytes:
> Hello, Emacs-Guix (Emacs interface for GNU Guix) version 0.3.4 has been
> released.  It may be installed with "guix package -i emacs-guix".
> 
> The main new features are:
> 
> 1. "M-x guix-hash": it prompts for a file, calculates its hash and puts
>    it into kill-ring (i.e., you can insert it with "C-y").  If it is
>    called on a directory, it ignores VCS files (like "guix hash
>    --recursive --exclude-vcs").  Also it supports dired-mode.  Thanks to
>    ng0 for the idea of this command!

Hey cool :) Thanks for the quick implementation of this fuzzy idea!
Thanks for your (and your contributors) work on this release :)

> 2. "M-x guix-derivation-mode": this major mode makes Guix derivations
>    more human readable by indenting them and by making buttons from the
>    store file names.  It is enabled automatically in "/gnu/store/….drv"
>    files.  Many thanks to Oleg Pykhalov for inventing and implementing
>    this feature!
> 
> 3. As you probably know there are many single-line Guile files in the
>    store, for example:
> 
>      /gnu/store/…-shepherd.conf
>      /gnu/store/…-activate-service
>      /var/guix/profiles/system/boot
> 
>    Similarly to the derivation files, the above files are not human
>    readable as they are one-liners.  Now (I mean with Emacs-Guix 0.3.4),
>    whenever you open such a file, it will be re-indented (its buffer,
>    not the file itself!) and scheme-mode will be enabled there.
> 
> 4. "M-x guix-superseded-packages": well, it just displays a list of
>    superseded packages.
> 
> Happy Guix Year :-)
> 
> -- 
> Alex
> 
> 

-- 
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://c.n0.is/ng0_pubkeys/tree/keys
  WWW: https://n0.is

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

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

* Re: [ANN] Emacs-Guix 0.3.4
  2017-12-28 20:20 [ANN] Emacs-Guix 0.3.4 Alex Kost
  2017-12-28 20:32 ` Daniel Pimentel
  2017-12-28 22:49 ` ng0
@ 2017-12-29 17:44 ` Oleg Pykhalov
  2017-12-30 20:51   ` Alex Kost
  2018-01-08 14:57 ` Ludovic Courtès
  3 siblings, 1 reply; 10+ messages in thread
From: Oleg Pykhalov @ 2017-12-29 17:44 UTC (permalink / raw)
  To: Alex Kost; +Cc: help-guix

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

Hello Alex, Guix

Alex Kost <alezost@gmail.com> writes:

> Hello, Emacs-Guix (Emacs interface for GNU Guix) version 0.3.4 has been
> released.  It may be installed with "guix package -i emacs-guix".
>
> The main new features are:

By the way, 'guix-edit' supports a new behavior:

    Read symbol at point and if it is a package name, return it.  If it
    is not a package name or if current command has a prefix argument,
    read the name from minibuffer.

    (from 'guix-read-package-name-at-point' documentation string).

To set it up you need the following in your '.emacs':

    (setq guix-read-package-name-function
          #'guix-read-package-name-at-point)

> 1. "M-x guix-hash": it prompts for a file, calculates its hash and puts
>    it into kill-ring (i.e., you can insert it with "C-y").  If it is
>    called on a directory, it ignores VCS files (like "guix hash
>    --recursive --exclude-vcs").  Also it supports dired-mode.  Thanks to
>    ng0 for the idea of this command!

I like this, but as I undertand it works only with files or directories
locally.  Could we do something like:

    (defun guix-download (url)
      (interactive "sDownload URL: ")
      (insert (shell-command-to-string (concat "guix download "
                                               url
                                               " 2>/dev/null"
                                               "| tail -n 1"
                                               "| tr -d '\n'"))))

which will download a thing and paste a hash at the cursor position.

We have a 'guix-devel-download-package-source', but it basically the
same as a shell command 'guix download PACKAGE' which requires to copy
hash manually.  What we probably want is to get a hash into Emacs
kill-ring as guix-hash does.

> 2. "M-x guix-derivation-mode": this major mode makes Guix derivations
>    more human readable by indenting them and by making buttons from the
>    store file names.  It is enabled automatically in "/gnu/store/….drv"
>    files.  Many thanks to Oleg Pykhalov for inventing and implementing
>    this feature!

Thank you for leading and improvements after, too!

[...]

> Happy Guix Year :-)

Happy New Year!


Oleg.

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

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

* Re: [ANN] Emacs-Guix 0.3.4
  2017-12-29 17:44 ` Oleg Pykhalov
@ 2017-12-30 20:51   ` Alex Kost
  0 siblings, 0 replies; 10+ messages in thread
From: Alex Kost @ 2017-12-30 20:51 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: help-guix

Oleg Pykhalov (2017-12-29 20:44 +0300) wrote:

> Hello Alex, Guix
>
> Alex Kost <alezost@gmail.com> writes:
>
>> Hello, Emacs-Guix (Emacs interface for GNU Guix) version 0.3.4 has been
>> released.  It may be installed with "guix package -i emacs-guix".
>>
>> The main new features are:
>
> By the way, 'guix-edit' supports a new behavior:
>
>     Read symbol at point and if it is a package name, return it.  If it
>     is not a package name or if current command has a prefix argument,
>     read the name from minibuffer.
>
>     (from 'guix-read-package-name-at-point' documentation string).

Oh, right, I forgot about it, sorry :-)

(this feature is also the Oleg's idea)

>> 1. "M-x guix-hash": it prompts for a file, calculates its hash and puts
>>    it into kill-ring (i.e., you can insert it with "C-y").  If it is
>>    called on a directory, it ignores VCS files (like "guix hash
>>    --recursive --exclude-vcs").  Also it supports dired-mode.  Thanks to
>>    ng0 for the idea of this command!
>
> I like this, but as I undertand it works only with files or directories
> locally.

Yes, it is the analog of "guix hash", so it works with local files only.

> Could we do something like:
>
>     (defun guix-download (url)
>       (interactive "sDownload URL: ")
>       (insert (shell-command-to-string (concat "guix download "
>                                                url
>                                                " 2>/dev/null"
>                                                "| tail -n 1"
>                                                "| tr -d '\n'"))))
>
> which will download a thing and paste a hash at the cursor position.

I wouldn't like to have such a wrapper for a shell command as using
"Guix REPL" would be faster.  Although the main problem is: what you
suggest is a *synchronous* command, and downloading files may take a
long time, so Emacs will become unresponsive until the file will be
downloaded and its hash will be calculated.

> We have a 'guix-devel-download-package-source', but it basically the
> same as a shell command 'guix download PACKAGE' which requires to copy
> hash manually.  What we probably want is to get a hash into Emacs
> kill-ring as guix-hash does.

I don't see how this can be done.  Is it OK for you that this
downloading will happen synchronously?  Or do you have ideas how it can
be implemented otherwise?

-- 
Alex

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

* Re: [ANN] Emacs-Guix 0.3.4
  2017-12-28 20:20 [ANN] Emacs-Guix 0.3.4 Alex Kost
                   ` (2 preceding siblings ...)
  2017-12-29 17:44 ` Oleg Pykhalov
@ 2018-01-08 14:57 ` Ludovic Courtès
  2018-01-08 20:40   ` Ricardo Wurmus
  2018-01-09 20:29   ` Alex Kost
  3 siblings, 2 replies; 10+ messages in thread
From: Ludovic Courtès @ 2018-01-08 14:57 UTC (permalink / raw)
  To: Alex Kost; +Cc: help-guix

Hi!

Alex Kost <alezost@gmail.com> skribis:

> 2. "M-x guix-derivation-mode": this major mode makes Guix derivations
>    more human readable by indenting them and by making buttons from the
>    store file names.  It is enabled automatically in "/gnu/store/….drv"
>    files.  Many thanks to Oleg Pykhalov for inventing and implementing
>    this feature!
>
> 3. As you probably know there are many single-line Guile files in the
>    store, for example:
>
>      /gnu/store/…-shepherd.conf
>      /gnu/store/…-activate-service
>      /var/guix/profiles/system/boot
>
>    Similarly to the derivation files, the above files are not human
>    readable as they are one-liners.  Now (I mean with Emacs-Guix 0.3.4),
>    whenever you open such a file, it will be re-indented (its buffer,
>    not the file itself!) and scheme-mode will be enabled there.

One word: awesome.  :-)

I have a minor issue: I use ‘ido’ and ‘ido-find-file’ insist on browsing
the entire /gnu/store when I do C-x C-f with a store file name at point
(except if the file name denotes a directory.)  So to open a .drv file,
I have to work around that.

How do people handle this?

Thank you!

Ludo’.

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

* Re: [ANN] Emacs-Guix 0.3.4
  2018-01-08 14:57 ` Ludovic Courtès
@ 2018-01-08 20:40   ` Ricardo Wurmus
  2018-01-08 22:29     ` Vladimir Sedach
       [not found]     ` <87d12kugpq.fsf@t43.lan.>
  2018-01-09 20:29   ` Alex Kost
  1 sibling, 2 replies; 10+ messages in thread
From: Ricardo Wurmus @ 2018-01-08 20:40 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Alex Kost, help-guix


Ludovic Courtès <ludo@gnu.org> writes:

> I have a minor issue: I use ‘ido’ and ‘ido-find-file’ insist on browsing
> the entire /gnu/store when I do C-x C-f with a store file name at point
> (except if the file name denotes a directory.)  So to open a .drv file,
> I have to work around that.
>
> How do people handle this?

I use “M-x ffap” for /gnu/store file names.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

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

* Re: [ANN] Emacs-Guix 0.3.4
  2018-01-08 20:40   ` Ricardo Wurmus
@ 2018-01-08 22:29     ` Vladimir Sedach
       [not found]     ` <87d12kugpq.fsf@t43.lan.>
  1 sibling, 0 replies; 10+ messages in thread
From: Vladimir Sedach @ 2018-01-08 22:29 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix, Alex Kost


Ricardo Wurmus <rekado@elephly.net> writes:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> I have a minor issue: I use ‘ido’ and ‘ido-find-file’ insist on browsing
>> the entire /gnu/store when I do C-x C-f with a store file name at point
>> (except if the file name denotes a directory.)  So to open a .drv file,
>> I have to work around that.
>>
>> How do people handle this?
>
> I use “M-x ffap” for /gnu/store file names.

ffap is great. You can set ido-use-filename-at-point to make ido behave
in a similar way. I like having C-x C-f bound to ffap and C-x f call
projectile-find-file or ido-find-file depending on the result of calling
projectile-project-root.

Vladimir

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

* Re: [ANN] Emacs-Guix 0.3.4
  2018-01-08 14:57 ` Ludovic Courtès
  2018-01-08 20:40   ` Ricardo Wurmus
@ 2018-01-09 20:29   ` Alex Kost
  1 sibling, 0 replies; 10+ messages in thread
From: Alex Kost @ 2018-01-09 20:29 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: help-guix

Ludovic Courtès (2018-01-08 15:57 +0100) wrote:

[...]
> I have a minor issue: I use ‘ido’ and ‘ido-find-file’ insist on browsing
> the entire /gnu/store when I do C-x C-f with a store file name at point
> (except if the file name denotes a directory.)

I'm not sure I understand your problem.  I think ido-find-file prompts
with "/gnu/store" directory just because you do "C-x C-f" from a buffer
which 'default-directory' variable is set to "/gnu/store".

I don't think ido checks a file name at point, at least it doesn't by
default: I've tried (with "emacs -Q" and ido-mode enabled) to do "C-x
C-f" on a store file, and I got a propmt with files from the current
directory (not from /gnu/store as you describe).

> So to open a .drv file, I have to work around that.

Sorry, I don't understand what you mean.  As other people point, if you
have a drv file at point, you may open it with "M-x ffap".  If you wish
to open a store file from 'guix-derivation-mode', you can just press RET
on it.

-- 
Alex

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

* Re: [ANN] Emacs-Guix 0.3.4
       [not found]     ` <87d12kugpq.fsf@t43.lan.>
@ 2018-01-12 11:30       ` Ludovic Courtès
  0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2018-01-12 11:30 UTC (permalink / raw)
  To: Vladimir Sedach; +Cc: Alex Kost, help-guix

Vladimir Sedach <vas@oneofus.la> skribis:

> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>> I have a minor issue: I use ‘ido’ and ‘ido-find-file’ insist on browsing
>>> the entire /gnu/store when I do C-x C-f with a store file name at point
>>> (except if the file name denotes a directory.)  So to open a .drv file,
>>> I have to work around that.
>>>
>>> How do people handle this?
>>
>> I use “M-x ffap” for /gnu/store file names.
>
> ffap is great. You can set ido-use-filename-at-point to make ido behave
> in a similar way. I like having C-x C-f bound to ffap and C-x f call
> projectile-find-file or ido-find-file depending on the result of calling
> projectile-project-root.

Oh silly me, I had set ‘ido-use-filename-at-point’ to 'guess, which is
what was causing troubles for /gnu/store.

Thanks!

Ludo’.

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

end of thread, other threads:[~2018-01-12 11:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-28 20:20 [ANN] Emacs-Guix 0.3.4 Alex Kost
2017-12-28 20:32 ` Daniel Pimentel
2017-12-28 22:49 ` ng0
2017-12-29 17:44 ` Oleg Pykhalov
2017-12-30 20:51   ` Alex Kost
2018-01-08 14:57 ` Ludovic Courtès
2018-01-08 20:40   ` Ricardo Wurmus
2018-01-08 22:29     ` Vladimir Sedach
     [not found]     ` <87d12kugpq.fsf@t43.lan.>
2018-01-12 11:30       ` Ludovic Courtès
2018-01-09 20:29   ` Alex Kost

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

	https://git.savannah.gnu.org/cgit/guix.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.