From: Lars Schneider <larsxschneider@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Lars Schneider <lars.schneider@autodesk.com>,
git <git@vger.kernel.org>, Stefan Beller <sbeller@google.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH v2] launch_editor(): indicate that Git waits for user input
Date: Wed, 22 Nov 2017 17:47:09 +0100 [thread overview]
Message-ID: <0DD1EE8A-47F1-41AA-8F86-C9FDF99D22A0@gmail.com> (raw)
In-Reply-To: <xmqqy3n4rbnr.fsf@gitster.mtv.corp.google.com>
> On 17 Nov 2017, at 19:40, Junio C Hamano <gitster@pobox.com> wrote:
>
> lars.schneider@autodesk.com writes:
>
>> Junio posted the original version of this patch [1] as response to my RFC [2].
>> I took Junio's patch and slightly changed the commit message as well as the
>> message printed to the user after GIT_EDITOR is invoked [3].
>>
>> Thanks,
>> Lars
>
> Thanks.
>
>> diff --git a/editor.c b/editor.c
>> index 7519edecdc..23db92d8c6 100644
>> --- a/editor.c
>> +++ b/editor.c
>> @@ -40,6 +40,32 @@ int launch_editor(const char *path, struct strbuf...
>> ...
>> + if (close_notice) {
>> + fprintf(
>> + stderr,
>> + "Launched your editor ('%s'). Adjust, save, and close the "
>> + "file to continue. Waiting for your input... ", editor
>
> How wide is your typical terminal window? With message this long, a
> sample standalone program I used while developing the prototype of
> this feature no longer can retract this "temporary" message.
>
> Would something shorter like "Waiting for you to finish editing..."
> work well enough?
Yeah, Eric criticized the verbosity elsewhere, too. I understand your point
of view. Let's revert it to your initial short version.
- Lars
>
> -- -- --
> #include <stdio.h>
>
> int main(void)
> {
> const char *EL = "\033[K"; /* Erase in Line */
> const char *editor = "emacsclient";
>
> fprintf(
> stderr,
> "Launched your editor ('%s'). Adjust, save, and close the "
> "file to continue. Waiting for your input... ", editor);
> fflush(stderr);
> sleep(2);
> fprintf(stderr, "\r%s", EL);
> fflush(stderr);
> return 0;
> }
> -- -- --
>
next prev parent reply other threads:[~2017-11-22 16:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 13:51 [PATCH v2] launch_editor(): indicate that Git waits for user input lars.schneider
2017-11-17 18:40 ` Junio C Hamano
2017-11-22 16:47 ` Lars Schneider [this message]
2017-11-17 19:41 ` Eric Sunshine
2017-11-18 1:40 ` Junio C Hamano
2017-11-19 17:49 ` Kaartic Sivaraam
2017-11-20 0:11 ` Junio C Hamano
2017-11-22 16:55 ` Lars Schneider
2017-11-22 17:58 ` Kaartic Sivaraam
2017-11-24 6:38 ` Junio C Hamano
2017-11-22 16:53 ` Lars Schneider
2017-11-22 17:33 ` Eric Sunshine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0DD1EE8A-47F1-41AA-8F86-C9FDF99D22A0@gmail.com \
--to=larsxschneider@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=lars.schneider@autodesk.com \
--cc=sbeller@google.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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).