From: Alex Kost <alezost@gmail.com>
To: Oleg Pykhalov <go.wigust@gmail.com>
Cc: help-guix@gnu.org
Subject: Re: [ANN] Emacs-Guix 0.3.4
Date: Sat, 30 Dec 2017 23:51:59 +0300 [thread overview]
Message-ID: <87o9mgos5s.fsf@gmail.com> (raw)
In-Reply-To: <87bmihtono.fsf@gmail.com> (Oleg Pykhalov's message of "Fri, 29 Dec 2017 20:44:11 +0300")
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
next prev parent reply other threads:[~2017-12-30 20:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o9mgos5s.fsf@gmail.com \
--to=alezost@gmail.com \
--cc=go.wigust@gmail.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).