* Cannot use `vc-annotate' on OS X
@ 2013-06-02 1:26 Xue Fuqiao
2013-06-02 2:50 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Xue Fuqiao @ 2013-06-02 1:26 UTC (permalink / raw)
To: help-gnu-emacs
Hi list,
I wanted to display an annotated version of files.el, so I pressed
`C-x v g' in that file. But Debugger entered:
Debugger entered--Lisp error: (file-error "Searching for program"
"No such file or directory" "bzr")
start-process("bzr" #<buffer *Annotate files.el (rev 112804)*>
"bzr" "annotate" "--long" "--all" "-r" "112804" "files.el")
apply(start-process "bzr" #<buffer *Annotate files.el (rev
112804)*> "bzr" ("annotate" "--long" "--all" "-r" "112804"
"files.el"))
start-file-process("bzr" #<buffer *Annotate files.el (rev
112804)*> "bzr" "annotate" "--long" "--all" "-r" "112804" "files.el")
apply(start-file-process "bzr" #<buffer *Annotate files.el (rev
112804)*> "bzr" ("annotate" "--long" "--all" "-r" "112804"
"files.el"))
vc-do-command(#<buffer *Annotate files.el (rev 112804)*> async
"bzr" "/Users/xfq/emacs-repo/bzr/trunk/lisp/files.el" "annotate"
"--long" "--all" "-r" "112804")
apply(vc-do-command #<buffer *Annotate files.el (rev 112804)*>
async "bzr" "/Users/xfq/emacs-repo/bzr/trunk/lisp/files.el" "annotate"
("--long" "--all" "-r" "112804"))
vc-bzr-command("annotate" #<buffer *Annotate files.el (rev
112804)*> async "/Users/xfq/emacs-repo/bzr/trunk/lisp/files.el"
"--long" "--all" "-r" "112804")
apply(vc-bzr-command "annotate" #<buffer *Annotate files.el (rev
112804)*> async "/Users/xfq/emacs-repo/bzr/trunk/lisp/files.el"
"--long" "--all" ("-r" "112804"))
vc-bzr-annotate-command("/Users/xfq/emacs-repo/bzr/trunk/lisp/files.el"
#<buffer *Annotate files.el (rev 112804)*> "112804")
apply(vc-bzr-annotate-command
("/Users/xfq/emacs-repo/bzr/trunk/lisp/files.el" #<buffer *Annotate
files.el (rev 112804)*> "112804"))
vc-call-backend(Bzr annotate-command
"/Users/xfq/emacs-repo/bzr/trunk/lisp/files.el" #<buffer *Annotate
files.el (rev 112804)*> "112804")
vc-annotate("/Users/xfq/emacs-repo/bzr/trunk/lisp/files.el" "112804" 20.0)
call-interactively(vc-annotate nil nil)
command-execute(vc-annotate)
I can use bzr outside Emacs, and I'm using OS X 10.8.3 with Bazaar
2.5.1 and python 2.7.2. It seems that Emacs cannot find my bzr. Can
anyone point me in the right direction?
FYI:
$ which bzr
/usr/local/bin/bzr
$ cat /etc/paths
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cannot use `vc-annotate' on OS X
2013-06-02 1:26 Cannot use `vc-annotate' on OS X Xue Fuqiao
@ 2013-06-02 2:50 ` Eli Zaretskii
2013-06-02 3:05 ` Xue Fuqiao
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2013-06-02 2:50 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Sun, 2 Jun 2013 09:26:09 +0800
> From: Xue Fuqiao <xfq.free@gmail.com>
>
> I wanted to display an annotated version of files.el, so I pressed
> `C-x v g' in that file. But Debugger entered:
>
> Debugger entered--Lisp error: (file-error "Searching for program"
> "No such file or directory" "bzr")
> [...]
> I can use bzr outside Emacs, and I'm using OS X 10.8.3 with Bazaar
> 2.5.1 and python 2.7.2. It seems that Emacs cannot find my bzr. Can
> anyone point me in the right direction?
>
> FYI:
> $ which bzr
> /usr/local/bin/bzr
> $ cat /etc/paths
> /usr/bin
> /bin
> /usr/sbin
> /sbin
> /usr/local/bin
Try
M-: (executable-find "bzr") RET
If that doesn't find bzr, check you exec-path.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cannot use `vc-annotate' on OS X
2013-06-02 2:50 ` Eli Zaretskii
@ 2013-06-02 3:05 ` Xue Fuqiao
2013-06-02 15:11 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Xue Fuqiao @ 2013-06-02 3:05 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
On Sun, Jun 2, 2013 at 10:50 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> Date: Sun, 2 Jun 2013 09:26:09 +0800
>> From: Xue Fuqiao <xfq.free@gmail.com>
>>
>> I wanted to display an annotated version of files.el, so I pressed
>> `C-x v g' in that file. But Debugger entered:
>>
>> Debugger entered--Lisp error: (file-error "Searching for program"
>> "No such file or directory" "bzr")
>> [...]
>> I can use bzr outside Emacs, and I'm using OS X 10.8.3 with Bazaar
>> 2.5.1 and python 2.7.2. It seems that Emacs cannot find my bzr. Can
>> anyone point me in the right direction?
>>
>> FYI:
>> $ which bzr
>> /usr/local/bin/bzr
>> $ cat /etc/paths
>> /usr/bin
>> /bin
>> /usr/sbin
>> /sbin
>> /usr/local/bin
>
> Try
>
> M-: (executable-find "bzr") RET
>
> If that doesn't find bzr, check you exec-path.
`F1 v exec-path RET':
exec-path is a variable defined in `C source code'.
Its value is
("/usr/bin" "/bin" "/usr/sbin" "/sbin"
"/Users/xfq/emacs-repo/bzr/trunk/nextstep/Emacs.app/Contents/MacOS/libexec"
"/Users/xfq/emacs-repo/bzr/trunk/nextstep/Emacs.app/Contents/MacOS/bin")
`/usr/local/bin' isn't in it. I'll add this path into my `.emacs',
thank you.
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cannot use `vc-annotate' on OS X
2013-06-02 3:05 ` Xue Fuqiao
@ 2013-06-02 15:11 ` Eli Zaretskii
2013-06-02 16:47 ` Dmitry Gutov
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2013-06-02 15:11 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Sun, 2 Jun 2013 11:05:05 +0800
> From: Xue Fuqiao <xfq.free@gmail.com>
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
>
> `F1 v exec-path RET':
> exec-path is a variable defined in `C source code'.
> Its value is
> ("/usr/bin" "/bin" "/usr/sbin" "/sbin"
> "/Users/xfq/emacs-repo/bzr/trunk/nextstep/Emacs.app/Contents/MacOS/libexec"
> "/Users/xfq/emacs-repo/bzr/trunk/nextstep/Emacs.app/Contents/MacOS/bin")
>
> `/usr/local/bin' isn't in it. I'll add this path into my `.emacs',
> thank you.
Not a good idea, if you ask me. Your exec-path and PATH outside of
Emacs should be in agreement (with the exception of the libexec
directory). Otherwise, Emacs will be able to find files that the
shell cannot, or vice versa.
So I would suggest to figure out why the shell outside Emacs can find
what Emacs cannot, and fix whatever causes that, instead of simply
adding directories to exec-path.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cannot use `vc-annotate' on OS X
2013-06-02 15:11 ` Eli Zaretskii
@ 2013-06-02 16:47 ` Dmitry Gutov
2013-06-03 23:00 ` Xue Fuqiao
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2013-06-02 16:47 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Sun, 2 Jun 2013 11:05:05 +0800
>> From: Xue Fuqiao <xfq.free@gmail.com>
>> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
>>
>> `F1 v exec-path RET':
>> exec-path is a variable defined in `C source code'.
>> Its value is
>> ("/usr/bin" "/bin" "/usr/sbin" "/sbin"
>> "/Users/xfq/emacs-repo/bzr/trunk/nextstep/Emacs.app/Contents/MacOS/libexec"
>> "/Users/xfq/emacs-repo/bzr/trunk/nextstep/Emacs.app/Contents/MacOS/bin")
>>
>> `/usr/local/bin' isn't in it. I'll add this path into my `.emacs',
>> thank you.
>
> Not a good idea, if you ask me. Your exec-path and PATH outside of
> Emacs should be in agreement (with the exception of the libexec
> directory). Otherwise, Emacs will be able to find files that the
> shell cannot, or vice versa.
>
> So I would suggest to figure out why the shell outside Emacs can find
> what Emacs cannot, and fix whatever causes that, instead of simply
> adding directories to exec-path.
Sounds like the problem described in and apparently solved by
https://github.com/purcell/exec-path-from-shell
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cannot use `vc-annotate' on OS X
2013-06-02 16:47 ` Dmitry Gutov
@ 2013-06-03 23:00 ` Xue Fuqiao
0 siblings, 0 replies; 6+ messages in thread
From: Xue Fuqiao @ 2013-06-03 23:00 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: help-gnu-emacs
Hi Dmitry and Eli,
On Mon, Jun 3, 2013 at 12:47 AM, Dmitry Gutov <dgutov@yandex.ru> wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> Date: Sun, 2 Jun 2013 11:05:05 +0800
>>> From: Xue Fuqiao <xfq.free@gmail.com>
>>> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
>>>
>>> `F1 v exec-path RET':
>>> exec-path is a variable defined in `C source code'.
>>> Its value is
>>> ("/usr/bin" "/bin" "/usr/sbin" "/sbin"
>>> "/Users/xfq/emacs-repo/bzr/trunk/nextstep/Emacs.app/Contents/MacOS/libexec"
>>> "/Users/xfq/emacs-repo/bzr/trunk/nextstep/Emacs.app/Contents/MacOS/bin")
>>>
>>> `/usr/local/bin' isn't in it. I'll add this path into my `.emacs',
>>> thank you.
>>
>> Not a good idea, if you ask me. Your exec-path and PATH outside of
>> Emacs should be in agreement (with the exception of the libexec
>> directory). Otherwise, Emacs will be able to find files that the
>> shell cannot, or vice versa.
>>
>> So I would suggest to figure out why the shell outside Emacs can find
>> what Emacs cannot, and fix whatever causes that, instead of simply
>> adding directories to exec-path.
On OS X, an Emacs session started from GUI will have a different
environment with a shell in terminal. Obviously this will lead to
unexpected results when calling external utilities like `bzr' from
Emacs.
> Sounds like the problem described in and apparently solved by
> https://github.com/purcell/exec-path-from-shell
This library works around this problem by copying environment variables
from the shell, and it works for me. Thank you.
--
Best regards, Xue Fuqiao.
http://www.gnu.org/software/emacs/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-06-03 23:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-02 1:26 Cannot use `vc-annotate' on OS X Xue Fuqiao
2013-06-02 2:50 ` Eli Zaretskii
2013-06-02 3:05 ` Xue Fuqiao
2013-06-02 15:11 ` Eli Zaretskii
2013-06-02 16:47 ` Dmitry Gutov
2013-06-03 23:00 ` Xue Fuqiao
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).