From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: bug#22550: (require 'magit) produces error: "no such file or directory" "dash" Date: Sat, 06 Feb 2016 00:54:42 +0300 Message-ID: <87si16n7q5.fsf@gmail.com> References: <87egctdsb0.fsf@gmail.com> <87lh70vclr.fsf@gmail.com> <87lh7033q9.fsf@gmail.com> <87y4b0tfdn.fsf@gmail.com> <87bn7w2gfd.fsf@gmail.com> <87vb63zgwb.fsf@gmail.com> <87oabv1a75.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRoLJ-0000kn-WF for bug-guix@gnu.org; Fri, 05 Feb 2016 16:55:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRoLG-0001dQ-OB for bug-guix@gnu.org; Fri, 05 Feb 2016 16:55:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:54481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRoLG-0001dM-KP for bug-guix@gnu.org; Fri, 05 Feb 2016 16:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aRoLG-0007DA-FC for bug-guix@gnu.org; Fri, 05 Feb 2016 16:55:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87oabv1a75.fsf@gmail.com> (myglc2@gmail.com's message of "Fri, 05 Feb 2016 09:52:14 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: myglc2 Cc: 22550@debbugs.gnu.org myglc2 (2016-02-05 17:52 +0300) wrote: > Alex Kost writes: [...] >> The purpose of "M-x guix-edit" Emacs command (and "guix edit" shell >> command) is just to show you the source code of the package. This >> source is usually placed in the store, and you shouldn't edit it. If >> you are going to contribute to guix, (info "(guix) Building from Git") >> is the right way. >> >> For "M-x guix-edit", there is a trick that allows to point to any place >> with packages =E2=80=94 setting 'guix-directory' variable. For example,= if you >> cloned guix to "~/src" directory, after: >> >> (setq guix-directory "~/src/guix") >> >> "M-x guix-edit magit" will open "~/src/guix/gnu/packages/emacs.scm" file. > > Thank you Alex. This really helps me. FWIW, Here are a couple thoughts: > > It was confusing to me that 'guix-edit' shows "Note: file is write > protected". This behavior made me wonder what was wrong with my setup > and/or my understanding. Nothing is wrong. What you describe is a common Emacs thing when you open a read-only file. Emacs displays this message because you open a file from /gnu/store (which is read-only). If you run: touch /tmp/foo ; chmod 444 /tmp/foo and then open this /tmp/foo file in Emacs, you'll get the same message. > This might be improved by: > > 1) expanding one of the messages: "Note: file is write protected", or > 'command-execute: Buffer is read-only: #' to say, > if you want to modify guix see "8.1 Building from Git". These messages come from Emacs itself, not from any guix code, so I don't see how to change it (and I actually wouldn't like to do it, as I think changing a default Emacs behaviour would be more confusing) > - or - > > a) rename the current 'guix-edit' function to guix-inspect', > 'guix-examine', or'guix-view'. "M-x guix-edit" Emacs command was named so after "guix edit" shell command. I think having "M-x guix-view" which will do the same as "guix edit" in shell and "M-x guix-edit" which will do something else will be confusing. > b) make a new/improved 'guix-edit' that prompts for guix-directory if it > is not already not set, perhaps also refering the user to "8.1 > Building from Git". As I see it, 'M-x guix-edit' should do the same as 'guix edit' in shell, i.e. it should open a package file without additional prompting. OTOH I think it would be good to improve 'guix-edit' so that with C-u it will prompt for a directory with guix packages. --=20 Alex