From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Adding refactoring capabilities to Emacs Date: Thu, 7 Sep 2023 23:14:09 +0100 Message-ID: References: <83fs4f36wi.fsf@gnu.org> <87edj9erbk.fsf@betli.tmit.bme.hu> <87h6o5vl8m.fsf@localhost> <87cyytvl40.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28388"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Felician Nemeth , emacs-devel@gnu.org, Eli Zaretskii , "Philip K." , Dmitry Gutov , Stefan Monnier To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 08 00:15:23 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qeNHX-00078m-3W for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Sep 2023 00:15:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeNGf-0001c5-5r; Thu, 07 Sep 2023 18:14:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeNGd-0001bx-Om for emacs-devel@gnu.org; Thu, 07 Sep 2023 18:14:27 -0400 Original-Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qeNGZ-00035z-Eg; Thu, 07 Sep 2023 18:14:26 -0400 Original-Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2b9d07a8d84so24070421fa.3; Thu, 07 Sep 2023 15:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694124861; x=1694729661; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=L5eVYRDA1s9hIzQ7vb8FyX8ZuniF5ykWnuIePOXKfyo=; b=EY19OGYPh2NZdaIx3AVNfnCXBZWcmJTyYbaInYvzEZM3JVPqspo83i2c2iG/CPYBYw d3ENiz0bOmyv/LKuoauPu+JPm3X+sVLVoV/LBqpwneCFBKCwvRbaIc9XSJuuFQDp8zzK 87upIJ9yG+G7P9NyMHSAS+zPXP3dvzwu5DoliAdGG/aRAekd7YbOdi7jBKpvcNjBfWLZ 4L3OvVO2WGWVhqfi0xgSopd567/wTiPXcSL+br4nyrS6nYdzo7ZY8bnlOgxLdNJckBHZ zxOe0Eq/wffts5pYxmf8CnTmDKQZFlGrLcB80LrVuIzpGyuSlJmCEgQqypuORA0tiLuj 1A5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694124861; x=1694729661; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L5eVYRDA1s9hIzQ7vb8FyX8ZuniF5ykWnuIePOXKfyo=; b=mVobHdQQ79vrDvnupJStUUKRl3LeqiLPQCTGFYAVuQkOze+pf7kzz5Z0qej4ik+fuq C78KBRz44o8VawP0V3QtWXIEwwq0WNLU4Dt3IHhx/v7Antj0oEJXg8k3gjpxYaSP2a3f tU2h0vAx8RywhCWnkGDAet82TpfHmQsr0h/EpTo8pKL6KOAu2TGexm/j4cTpCEBJKrVi aejiz4sLVkvufxIBj/89HwxBPtI8r2qCdwvqHeEv3yoMY595QFhrvkkBj0+hqrKO4fJ6 j5WXSlHnM3mN6KGsDL8l7GsyiReyMLDzzSDSo+fyfsJemXGpbI8UOEZeIFeKK312MKP1 16AQ== X-Gm-Message-State: AOJu0YxK/9v/hBRPLdaC5EQYeisxjhSm4+nJQZ4MkF/IbYesZsv6p0/X 0fa1d+IeQUOnNyCNAIDx35T/qvpUkVOgLV7R74TmUcb7Qgc= X-Google-Smtp-Source: AGHT+IESS8QJ2fpWXCvllZJq7bql6Qe3mMQwqLqI1lrBJ/iaRQxtF+3niTL9O62H+23p4JLljQRDCIPwZU9cCAG9LT8= X-Received: by 2002:a2e:9e45:0:b0:2bc:dba0:60f9 with SMTP id g5-20020a2e9e45000000b002bcdba060f9mr303364ljk.44.1694124861092; Thu, 07 Sep 2023 15:14:21 -0700 (PDT) In-Reply-To: <87cyytvl40.fsf@localhost> Received-SPF: pass client-ip=2a00:1450:4864:20::22e; envelope-from=joaotavora@gmail.com; helo=mail-lj1-x22e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310290 Archived-At: On Thu, Sep 7, 2023 at 8:27=E2=80=AFPM Ihor Radchenko = wrote: > > Ihor Radchenko writes: > > >> How would a user undo such an operation in case of a multi-file edit? > >> Does the undo system support this? > > Actually, it might be possible: > > In `buffer-undo-list', one entry type is > > An entry (apply FUN-NAME . ARGS) means undo the change with > (apply FUN-NAME ARGS). > > An entry (apply DELTA BEG END FUN-NAME . ARGS) supports selective und= o > in the active region. BEG and END is the range affected by this entr= y > and DELTA is the number of characters added or deleted in that range = by > this change. > > This can be used to do anything for undo, including editing other files. In which of the buffer-undo-list's of changed buffers would you place the entry? And how would you handle redo, if at all? Hurts my brain just to think about it, but I'd love to see a demo. Jo=C3=A3o