unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Pip Cet <pipcet@gmail.com>
Cc: Paul Eggert <eggert@cs.ucla.edu>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: 31395511: "Don’t attempt to modify constant strings"
Date: Thu, 04 Jun 2020 10:31:21 +0100	[thread overview]
Message-ID: <87r1uvkwie.fsf@gmail.com> (raw)
In-Reply-To: <CAOqdjBfTA+SjmbGBVR0zgq=i_q1DzGoKNc7n3ZW_TPiFF9g8ww@mail.gmail.com> (Pip Cet's message of "Thu, 4 Jun 2020 04:38:19 +0000")

Pip Cet <pipcet@gmail.com> writes:

> On Wed, Jun 3, 2020 at 11:48 PM João Távora <joaotavora@gmail.com> wrote:
>> On Wed, Jun 3, 2020 at 11:42 PM Pip Cet <pipcet@gmail.com> wrote:
>> By itself, that doesn't work.  I have the same problem.
>
> Strange, I'd tried it locally and it appeared to work.

Yep, I didn't dig in, but it seems now that some buttons works and
other's don't  work.  So in a REPL typing "123"

  CL-USER> 123
  123 (7 bits, #x7b, #o173, #b1111011)

doesn't work (the second line should be interactive and it's not). But
now I did dig in and that's because other code is using the same
paradigm that sly-make-action-button was using.  Everything should work
if I track such users and change them.

I think I will lose compatibility to ~24.4, which is where I developed
this code.  Oh well.

>> I think I'd rather this previous behavior were retained, or at least
>> achievable by request. I haven't touched this code in a long
>> I don't know what else might depend on it.
>
> But the previous behavior was buggy. Things like
>
> (defun sly-inspector-insert-more-button (index previous)
>   (insert (sly-make-action-button
>            (if previous " [--more--]\n" " [--more--]")
>            #'sly-inspector-fetch-more
>            'range-args (list index previous))))
>
> worked only by accident, before.
  
Accident/spec/divine providence: they worked, and for a long time.
make-text-button never warned me about mutability/immutability, constant
strings or non-constant strings.  So effectively we're changing the sepc
implicit or explicit, in a backwards-incompatible way, and that breaks
programs, case in point.

João

PS: I admit I didn't check the recent "incompatible lisp changes" NEWS
for recent Emacs versions, maybe there's something in there that could
have given me a heads up.





      reply	other threads:[~2020-06-04  9:31 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 21:52 31395511: "Don’t attempt to modify constant strings" João Távora
2020-06-03 22:41 ` Paul Eggert
2020-06-03 22:52   ` Pip Cet
2020-06-03 23:20     ` Paul Eggert
2020-06-03 23:20     ` Basil L. Contovounesios
2020-06-03 22:41 ` Pip Cet
2020-06-03 23:08   ` Basil L. Contovounesios
2020-06-03 23:31     ` Basil L. Contovounesios
2020-06-03 23:48   ` João Távora
2020-06-04  0:43     ` Paul Eggert
2020-06-04  1:19       ` Paul Eggert
2020-06-04  7:26         ` Pip Cet
2020-06-04 11:11           ` Basil L. Contovounesios
2020-06-04 19:46             ` Paul Eggert
2020-06-04 20:25               ` João Távora
2020-06-04 20:29                 ` Paul Eggert
2020-06-04 21:21                   ` Drew Adams
2020-06-04 20:43               ` Pip Cet
2020-06-04 21:27                 ` Stefan Monnier
2020-06-04 21:42                   ` Pip Cet
2020-06-04 23:10                 ` Paul Eggert
2020-06-05  2:09                   ` Clément Pit-Claudel
2020-06-05  6:44                     ` Paul Eggert
2020-06-05 12:44                       ` Stefan Monnier
2020-06-05 17:01                     ` Drew Adams
2020-06-05  9:48                   ` Pip Cet
2020-06-05 18:37                     ` Paul Eggert
2020-06-04 22:33               ` Basil L. Contovounesios
2020-06-05 15:25       ` João Távora
2020-06-05 17:14         ` Dmitry Gutov
2020-06-05 23:19           ` João Távora
2020-06-05 23:32             ` Dmitry Gutov
2020-06-06  1:34               ` FW: " Drew Adams
2020-06-06  0:23             ` Drew Adams
2020-06-06  1:43             ` Paul Eggert
2020-06-06  4:06               ` Richard Stallman
2020-06-06 11:41               ` João Távora
2020-06-06 11:47                 ` João Távora
2020-06-04  4:38     ` Pip Cet
2020-06-04  9:31       ` João Távora [this message]

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=87r1uvkwie.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=pipcet@gmail.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://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).