unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: 50646@debbugs.gnu.org
Subject: bug#50646: 28.0.50; narrow-to-defun sometimes narrows to wrong defun
Date: Sun, 19 Sep 2021 22:02:44 +0200	[thread overview]
Message-ID: <AM9PR09MB4977381B09C57C7413CF3E1296DF9@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <a35fd8d176050377dac1a50113aa555a@webmail.orcon.net.nz> (Phil Sainty's message of "Sun, 19 Sep 2021 22:56:03 +1200")

Phil Sainty <psainty@orcon.net.nz> writes:

> On 2021-09-19 18:36, Arthur Miller wrote:
>> My question is though, why it happens only with 'when'? I haven't
>> found any other form to show same behaviour. There probably are
>> some, I just haven't found them by manually testing.
>
> Now that you've narrowed this down to a code conversion issue, that
> part was simple to debug (by comparing the buffer in its literal and
> non-literal forms), and the reason is that subr.el contains multi-byte
> characters.  This included a documentation bug, as the docstring for
> `setq-local' had this paragraph in the source:
>
>     The second VALUE is not computed until after the first VARIABLE
>     is set, and so on; each VALUE can use the new value of variables
>     set earlier in the ‘setq-local’.  The return value of the
>     ‘setq-local’ form is the value of the last VALUE.
>
> Note the incorrect unicode quote characters.
>
> I've just pushed a fix for that, but there's also a more intentional
> INVERTED EXCLAMATION MARK unicode character in one of the comments,
> though, and I've left this alone.
>
>     ;; ¡Beware! when I tried to edebug this code, Emacs got into a weird state
>     ;; where all the keys were unbound (i.e. it somehow got triggered
>     ;; within read-key, apparently).  I had to kill it.
>
> In short, you don't want to be making assumptions about the encoding
> of elisp files.
>
> Tangentially, the commit message related to those quote characters
> says "expand the doc string by taking some text from `setq'", so I
> believe those fancy unicode quote characters were accidentally copied
> and pasted from a *Help* buffer rendering of the `setq' docstring.
> I think it's a good idea to set `text-quoting-style' to 'grave to
> ensure that can never happen.
>
>
> -Phil
Hi, sorry for the later answers, but it was busy day for me today.

I just answered you in other, so I won't repeat here. Yes, I realized myself
what is going on today; I didn't do any testing and such, I such sent mail, when
I saw myself I used 'literal' version there.

Anyway, thanks, and I see from the responses between you and Eli that it
resulted in some updates to manual and you fixing erronous characters in
subr.el, so my goofy misstake at least brought something good :).

Anyway, thanks for the help and good job!





  reply	other threads:[~2021-09-19 20:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 17:06 bug#50646: 28.0.50; narrow-to-defun sometimes narrows to wrong defun arthur.miller
2021-09-18 14:09 ` Lars Ingebrigtsen
2021-09-18 17:27   ` Arthur Miller
2021-09-18 18:34     ` Arthur Miller
2021-09-19  8:34   ` Arthur Miller
2021-09-19  3:41 ` Phil Sainty
2021-09-19  6:36   ` Arthur Miller
2021-09-19 10:56     ` Phil Sainty
2021-09-19 20:02       ` Arthur Miller [this message]
2021-09-19  8:33   ` Arthur Miller
2021-09-19 10:04     ` Phil Sainty
2021-09-19 12:01       ` Eli Zaretskii
2021-09-19 12:06         ` Phil Sainty
2021-09-19 12:17           ` Eli Zaretskii
2021-09-19 12:53             ` Phil Sainty
2021-09-19 13:43               ` Eli Zaretskii
2021-09-19 14:21                 ` Phil Sainty
2021-09-19 15:22                   ` Eli Zaretskii
2021-09-19 15:25             ` bug#50646: [External] : " Drew Adams
2021-09-19 19:57       ` Arthur Miller
2021-09-20  6:02         ` Lars Ingebrigtsen

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=AM9PR09MB4977381B09C57C7413CF3E1296DF9@AM9PR09MB4977.eurprd09.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=50646@debbugs.gnu.org \
    --cc=psainty@orcon.net.nz \
    /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).