[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] .edit: Fix bug searching for sensible-editor
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] .edit: Fix bug searching for sensible-editor |
Date: |
Sat, 29 Feb 2020 15:49:03 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
But this makes me think whether `find_in_path' is the right
tool to
determine whether sensible-editor exists or not. What if the
user has
. in her PATH and her sensible-editor is in the current
directory, for
example?
I don't see what problems that would cause. find_in_path
would find ./sensible-editor and run it. Where would the
problem be?
Wouldn't find_in_path return "sensible-editor" in that case? Then
editor would be NULL.
A quick experiment shows that it returns "./sensible-editor". So
strcmp ("sensible-editor", "./sensible-editor") != 0 and thus editor !=
NULL.
Oh I see. Ok thanks for checking :)