GNU bug report logs - #71716
[PATCH] Add new completion-preview-insert-{word,sexp} commands

Previous Next

Package: emacs;

Reported by: Jules Tamagnan <jtamagnan <at> gmail.com>

Date: Sat, 22 Jun 2024 09:12:02 UTC

Severity: normal

Tags: patch

Fixed in version 31.1

Done: Eshel Yaron <me <at> eshelyaron.com>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 71716 <at> debbugs.gnu.org (full text, mbox):

From: Jules Tamagnan <jtamagnan <at> gmail.com>
To: Eshel Yaron <me <at> eshelyaron.com>
Cc: 71716 <at> debbugs.gnu.org
Subject: Re: bug#71716: [PATCH] Add new completion-preview-insert-{word,
 sexp} commands
Date: Sun, 23 Jun 2024 17:45:05 -0700
Jules Tamagnan <jtamagnan <at> gmail.com> writes:

> The second patch
> `completion-preview-partial-insertion-with-region-delete.patch` is the
> version of the change that uses in-buffer deletion. There's not much to
> say here, it seems quite a bit more robust.

I guess one thing to mention is that the use of `full-end` and `new-end`
could be replaced by `(+ (length aft) end)` and `(point)` respectively
which I had originally avoided to reduce calculations but might better
fit the style of the code.

Another idea would be to add a test proving that
`(completion-preview--insert-partial #'end-of-buffer)` will never place
the point too far. I have tested this on my own but haven't written a
test for it.

There are surely other style comments too, maybe the use of whitespace
within a function is considered bad form?

As always open to any and all feedback. Thanks in advance.

Best,
Jules




This bug report was last modified 1 year and 12 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.