From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: How can I undo a change from a modification-hook? Date: Wed, 26 Apr 2017 12:38:14 -0400 Message-ID: References: <2448005f-9fc4-78b2-3203-9fc8204f6f5b@mit.edu> <87fd6638-f46a-95f2-8b70-f271f5daeb63@gmail.com> <7f8bb205-c311-3360-ad0e-df205240199b@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1493224705 2597 195.159.176.226 (26 Apr 2017 16:38:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 26 Apr 2017 16:38:25 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 26 18:38:22 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3PxM-0000WA-Gx for ged-emacs-devel@m.gmane.org; Wed, 26 Apr 2017 18:38:20 +0200 Original-Received: from localhost ([::1]:56192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3PxQ-0001wq-Qx for ged-emacs-devel@m.gmane.org; Wed, 26 Apr 2017 12:38:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3PxK-0001wl-LP for emacs-devel@gnu.org; Wed, 26 Apr 2017 12:38:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3PxK-0001Ne-18 for emacs-devel@gnu.org; Wed, 26 Apr 2017 12:38:18 -0400 Original-Received: from mail-qt0-x22e.google.com ([2607:f8b0:400d:c0d::22e]:33534) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d3PxJ-0001NY-Qs for emacs-devel@gnu.org; Wed, 26 Apr 2017 12:38:17 -0400 Original-Received: by mail-qt0-x22e.google.com with SMTP id m36so5463508qtb.0 for ; Wed, 26 Apr 2017 09:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=uH4BlGojv93LUvTSOCLSPN3cno3cDf6j//N16pVOJoc=; b=g+gFwF1lqqtxkoHw3fdKne3UInpahZqdeLyeBmTI02cIxijl73obOzyjr2nOu6cPAV cI4Stb3zJnhGVFTzfvDwMCw8p2/kbeW35b0GY3v1aOTYfTU3s4GuYbV1WfuPnJ2YnY7U A2mulClZJMuwpy+4tiZj1SfCbDyWMw6YD75iaoDSZtpmzMOnGMdPwWo0V23fkR4Yvepm 2zHDfHh4ohTYuJ5IB16svCaqB48br6I0C+dGf7kRc+UPSuVDk9wjj7T25AV0w6yQfs2X kqptldT/5wW2dYKiOwJh8JwSvnXYSI0E+iHz0QRZ0XfJGUdTUKCPDWmTFbOEAlLjfVqW SPHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=uH4BlGojv93LUvTSOCLSPN3cno3cDf6j//N16pVOJoc=; b=teJfxfMWAR0Qrtw5tqaWRAt3581JPl0McQn2hKoB7Fo30dAjMwUIMGq7xbmIt0c32t vbpfLjtLKoRgyMB2Bb4x3HM4Tow6U/fWV9YxosgminMT45dP3vUnAFZUBmDr5pVXJMjG HbBU5mr/YQf0+bzc+A9USdafuSVDffuL0xgW7MCebN+vbc4c//DTSRXxyWx36kwOPh43 xF3rxinWIxBf76KkDLp0+q8G3KKXj204SU2HPYGazq0JQ60UXFqTvmz+EIaItorayOog b0+LLyjnN75mV5R/IkXM8+1FM4tI1GSkJaaS3vCYQu54X/zfOkKTX9V8IHhM4Wv2tpNl 7/jw== X-Gm-Message-State: AN3rC/5XMvPCaRYNst8p1CAMK8c5MVs9WlsQ3w/5XgfD1iAgMd8FEdqs afZVmpzPBSbwaQFcl58= X-Received: by 10.200.44.36 with SMTP id d33mr734554qta.51.1493224697069; Wed, 26 Apr 2017 09:38:17 -0700 (PDT) Original-Received: from ?IPv6:2001:470:8b2d:1a:9bab:c177:73b2:20a9? ([2001:470:8b2d:1a:9bab:c177:73b2:20a9]) by smtp.gmail.com with ESMTPSA id f13sm494953qta.59.2017.04.26.09.38.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Apr 2017 09:38:16 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214313 Archived-At: On 2017-04-26 10:51, Stefan Monnier wrote: >>> In the case of PG, I'd suggest you treat such a case as >>> a non-whitespace change. >> But I can't, can I? The damage (the change) is already done at that point, >> and I can't revert it. > > But you can "retract" until the beginning of the changed area. No, not if the current subprocess is busy.