bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8275: [PATCH] Re: bug#8275: 24.0.50; Intro to Emacs Lisp Issue


From: Y . E .
Subject: bug#8275: [PATCH] Re: bug#8275: 24.0.50; Intro to Emacs Lisp Issue
Date: Sun, 12 Dec 2021 08:50:16 +0200

>>> Do you want to fix this, or shall I try?  The problem is that
>>> append-to-buffer now uses let* and with-current-buffer, so this might
>>> break the flow of the text.  At this point in the book, let* and
>>> with-current-buffer are not yet introduced.

The current version of the 'append-to-buffer' section:
- Provides explanations based on the 'append-to-buffer' function
  definition from GNU Emacs 22, which uses 'let*' but not
  'with-current-buffer'.
- Already introduces 'let*'.

The suggested patch improves the flow of the text by re-organizing it to
correspond better the structure of the 'append-to-buffer' function and
providing more details about the 'let*' expression in it.

>> Here are some thoughts:
>> - I don't think it's of any importance that the example code be
>>   identical to the currently used code.

I also tend to think it should be fine to stick to some Emacs' version
(22 in this case) of the code, at least at this stage.

>> - append-to-buffer might not be the best example since AFAICT copying
>>   text from one buffer to another is not a common operation and in most
>>   cases this is done via buffer-substring + insert (often with some
>>   processing on the string between the two) rather than with
>>   insert-buffer-substring which is a rarely used function.
>> - yes, I think the text would benefit from some rethink to try and present
>>   with-current-buffer in preference to set-buffer, but it's not
>>   a simple fix.

The suggested patch concentrates on cleanups rather than rewrites,
because this may be a sufficient change (at this stage, again) and an
easier one to accomplish.

> I've now added the above comments to a comment in the file itself.  If
> anyone intends to review that section, they will find the comment and a
> pointer to this bug report.

The patch removes the mentioned comment since the suggested changes
cover fixing (or "wontfixing") the entries of the comment. A pointer to
this bug report was added to the suggested commit message.

Attachment: 0001-Cleanup-append-to-buffer-section-in-ELisp-Intro.patch
Description: Cleanup append-to-buffer section in ELisp Intro


reply via email to

[Prev in Thread] Current Thread [Next in Thread]