From edd @end|ng |rom deb|@n@org  Fri Dec 13 21:02:42 2024
From: edd @end|ng |rom deb|@n@org (Dirk Eddelbuettel)
Date: Fri, 13 Dec 2024 14:02:42 -0600
Subject: [Rd] 
 Is it advisable/possible to default on Linux to an EDITOR that
 actually exists?
In-Reply-To: <CAPRVBcx-q=RwpZ+x63-nB8ijhXYgrx5-U9uuxOt8WkcAKgndnQ@mail.gmail.com>
References: <CAPRVBcxY_2jZkqtNepDRhLJXMRmgDC61jxYsDCBR2EyEX3e+5g@mail.gmail.com>
 <2FE55908-DDD7-4E20-B221-9FB839D32CB8@R-project.org>
 <CAPRVBcx-q=RwpZ+x63-nB8ijhXYgrx5-U9uuxOt8WkcAKgndnQ@mail.gmail.com>
Message-ID: <26460.37602.235030.50183@rob.eddelbuettel.com>


On 11 December 2024 at 15:00, Michael Chirico wrote:
| Thanks Simon, I didn't know that! That's definitely a compelling
| reason to leave the current default untouched and to eschew any
| finicky attempts to find back-up editors.

I am not sure I agree with the fairly bold statement by Simon. I do not
install or use that many different Unix flavours but I do come across some
that do not, by default, install vi

  $ docker run --rm -ti debian bash
  root at 54d4be543766:/# vi
  bash: vi: command not found
  root at 54d4be543766:/#
  root at 54d4be543766:/# nano
  bash: nano: command not found
  exit
  $ 

Distributions may have defined sets of packages deemed 'essential', editors
do not seem to be part of that here.

Anyway, when you are calling edit(), or call a function calling edit() you
can always override appropriately with both an environment variable or an R
option so this all seems like a nothingburger to me.  "If on systems that
don't have all tools, maybe don't call functions from package `usethis`"
(which makes reasonable assumptions about what could be present) also seems
like a valid strategy.

Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



[Rd] Is it advisable/possible to default on Linux to an EDITOR that actually exists?
Dirk Eddelbuettel