Deutsch English Français Italiano |
<20240608221349.00001252@yahoo.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Michael S <already5chosen@yahoo.com> Newsgroups: comp.lang.c Subject: Re: Running an editor from ANSI C Date: Sat, 8 Jun 2024 22:13:49 +0300 Organization: A noiseless patient Spider Lines: 32 Message-ID: <20240608221349.00001252@yahoo.com> References: <v3pge7$uf2i$1@dont-email.me> <v3r2pl$16mtl$1@dont-email.me> <v3r7v8$1b57j$1@dont-email.me> <v3rek5$1c4i5$1@dont-email.me> <v3rrtm$1e6g8$1@dont-email.me> <v3ru84$1eafb$1@dont-email.me> <87o78dzw1a.fsf@nosuchdomain.example.com> <v3te2i$1ms1q$1@dont-email.me> <87frtpznoa.fsf@nosuchdomain.example.com> <v3uimm$20jte$3@dont-email.me> <871q59yty1.fsf@nosuchdomain.example.com> <v3uogs$21g4g$6@dont-email.me> <20240607142429.0000067b@yahoo.com> <v406q5$29fla$5@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Sat, 08 Jun 2024 21:13:56 +0200 (CEST) Injection-Info: dont-email.me; posting-host="c9d681fcf0a996120d10095f5cd827a6"; logging-data="2888164"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19shRGKspSKbpH8E5MpxSKj3sl9YxTQ/xg=" Cancel-Lock: sha1:8JUwIzx9NPy2dTQw218p/CUk2Gw= X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32) Bytes: 2732 On Fri, 7 Jun 2024 23:57:58 -0000 (UTC) Lawrence D'Oliveiro <ldo@nz.invalid> wrote: > On Fri, 7 Jun 2024 14:24:29 +0300, Michael S wrote: > > > On Fri, 7 Jun 2024 10:47:57 -0000 (UTC) > > Lawrence D'Oliveiro <ldo@nz.invalid> wrote: > > > >> On Fri, 07 Jun 2024 02:37:42 -0700, Keith Thompson wrote: > >> > >> > As for portability, I'm not aware of the $EDITOR convention being > >> > used on non-POSIX systems. > >> > >> Can non-POSIX systems offer anything better? Any worthwhile > >> alternative? > >> > >> No. > > > > Yes. The one below is better. > > ShellExecute(NULL, "edit", filename, NULL, NULL, SW_NORMAL); > > On Windows, that combines the command-line arguments into a single > string. Which then has to be teased apart by the receiving program. > Assuming the two ends can agree on consistent rules for doing so. You asked for something that is better *for user* than $EDITOR. The one above is very clearly better for user than $EDITOR. It is smarter - different editors are selected for different file types. And it achieves that with zero effort on part of app developer. I would be surprised if good Unices don't have something similar. But those better ways of lounching editor are not in POSIX.