unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Keeping replace-buffer-contents runtime in bounds
Date: Sun, 17 Feb 2019 19:26:04 +0100	[thread overview]
Message-ID: <87k1hyxoeb.fsf@gnu.org> (raw)
In-Reply-To: <83imxil8h6.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 17 Feb 2019 17:50:45 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> If that number of seconds is over, compareseq returns early and
>> replace-buffer-contents falls back to plain delete and insert.
>
> The gotcha about aborting after more than the time-out value should be
> mentioned in the doc string.

Right, I will do that including a NEWS entry and an update of the Info
docs.

> Thanks for working on this.  My only other comment is that maybe we
> should allow passing the time-out value via the function's arguments,
> not via a global variable.  It seems to me the time-out will be used
> in more use cases than MAX-COSTS, and in any case treating these two
> differently API-wise sounds strangely inconsistent.

I'll do that.  So two optional args and MAX-SECS as the first one,
right?

>> This is my first C encounter in emacs, so please feel free to
>> nit-pick.
>
> Nitpicking:
>
>> +  DEFVAR_LISP ("replace-buffer-contents-max-secs",
>> +	       Vreplace_buffer_contents_max_secs,
>> +	       doc: /* If differencing the two buffers takes longer than this,
>> +`replace-buffer-contents' falls back to a plain delete and insert.  */);
>
> The first sentence of a doc string should not be longer than 79
> characters.  (But if you agree with me, this variable will go away, so
> it's a moot point.)

Yup.

Bye,
Tassilo



  reply	other threads:[~2019-02-17 18:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-16 20:09 Keeping replace-buffer-contents runtime in bounds Tassilo Horn
2019-02-17 15:50 ` Eli Zaretskii
2019-02-17 18:26   ` Tassilo Horn [this message]
2019-02-17 18:59     ` Eli Zaretskii
2019-02-24 10:11   ` Tassilo Horn
2019-02-24 16:12     ` Eli Zaretskii
2019-02-24 20:13     ` Philipp Stephani
2019-02-25  6:28       ` Tassilo Horn
2019-02-25 20:16         ` Tassilo Horn
2019-02-25 21:03           ` Stefan Monnier
2019-02-26  6:51             ` Tassilo Horn

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: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k1hyxoeb.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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://git.savannah.gnu.org/cgit/emacs.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).