|
|
Created:
12 years ago by pebbe Modified:
11 years, 11 months ago Reviewers:
Sameer Ajmani CC:
golang-dev, Sameer Ajmani Visibility:
Public. |
DescriptionEmacs go-mode: fix Emacs freeze-up when copy/pasting from string or comment.
Fixes issue 3509.
Fixes issue 2767.
Patch Set 1 #Patch Set 2 : diff -r d063a7844d48 https://code.google.com/p/go #Patch Set 3 : diff -r 9db2758c3372 https://code.google.com/p/go #MessagesTotal messages: 12
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
Sign in to reply to this message.
On 2012/05/01 19:54:47, pebbe wrote: > Hello mailto:golang-dev@googlegroups.com, > > I'd like you to review this change to > https://code.google.com/p/go I'm very glad to see this fixed. For the record, can you explain what this is doing and why this fixes the issues?
Sign in to reply to this message.
On 2012/05/01 23:56:24, Sameer Ajmani wrote: > On 2012/05/01 19:54:47, pebbe wrote: > > Hello mailto:golang-dev@googlegroups.com, > > > > I'd like you to review this change to > > https://code.google.com/p/go > > I'm very glad to see this fixed. > > For the record, can you explain what this is doing and why this fixes the > issues? Actually, this doesn't fix the issue in XEmacs, only in GNU Emacs. (But my version of XEmacs is nearly two years old.) The Elisp command 'yank' that does pasting inserts text that is saved including its text-properties. Some of those text-properties are removed before inserting. Which properties are removed is controlled by the value of 'yank-excluded-properties'. Go-mode froze up in some cases when yanking text with property "go-mode-cs" to a location where this property shouldn't be, and then the function 'go-mode-cs' would get stuck in an infinite loop. I don't quite understand how the function 'go-mode-cs' works, and my feeling is that, perhaps, it is there that this problem should be addressed, but I don't know how. So, adding "go-mode-cs" (the text property, not the function) to 'yank-excluded-properties' solves it "externally". Please note: Only tested with GNU Emacs 23.3.2. The docstring for 'yank-excluded-propertie' states: "This variable was introduced, or its default value was changed, in version 22.1 of Emacs." I have no idea if this fix works in versions of Emacs before 22.1. Also note: XEmacs suffers from the same problem, and this fix does not work in XEmacs. At least, not in version 21.4.22. So, there is still need for a proper fix in the function 'go-mode-cs' itself, and my patch should probably not be used.
Sign in to reply to this message.
In the previous message, where I wrote 'go-mode-cs' function, it should be 'go-mode-font-lock-cs' function.
Sign in to reply to this message.
Hello golang-dev@googlegroups.com, sameer@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
Sign in to reply to this message.
On 2012/05/02 13:02:27, pebbe wrote: > Hello mailto:golang-dev@googlegroups.com, mailto:sameer@golang.org (cc: > mailto:golang-dev@googlegroups.com), > > Please take another look. This patch (Patch Set 3) works in both GNU Emacs and XEmacs.
Sign in to reply to this message.
On 2012/05/02 13:05:35, pebbe wrote: > On 2012/05/02 13:02:27, pebbe wrote: > > Hello mailto:golang-dev@googlegroups.com, mailto:sameer@golang.org (cc: > > mailto:golang-dev@googlegroups.com), > > > > Please take another look. > > This patch (Patch Set 3) works in both GNU Emacs and XEmacs. Hi, since this is your first submission, please sign the CLA per the instructions at: http://golang.org/doc/contribute.html#copyright I'll take care of updating CONTRIBUTORS and AUTHORS for you.
Sign in to reply to this message.
ping Peter : I'd like to submit your patches, but we need you to sign the CLA first. Please see the instructions in my previous email. On May 7, 2012 10:11 AM, <sameer@golang.org> wrote: > On 2012/05/02 13:05:35, pebbe wrote: > >> On 2012/05/02 13:02:27, pebbe wrote: >> > Hello mailto:golang-dev@**googlegroups.com<golang-dev@googlegroups.com>, >> mailto:sameer@golang.org >> > (cc: > >> > mailto:golang-dev@**googlegroups.com <golang-dev@googlegroups.com>), >> > >> > Please take another look. >> > > This patch (Patch Set 3) works in both GNU Emacs and XEmacs. >> > > Hi, since this is your first submission, please sign the CLA per the > instructions at: > http://golang.org/doc/**contribute.html#copyright<http://golang.org/doc/contr... > I'll take care of updating CONTRIBUTORS and AUTHORS for you. > > http://codereview.appspot.com/**6139066/<http://codereview.appspot.com/6139066/> >
Sign in to reply to this message.
Sameer Ajmani schreef op de 21e dag van de bloeimaand van het jaar 2012: > ping Peter : I'd like to submit your patches, but we need you to sign the > CLA first. Please see the instructions in my previous email. I did sign it, the day I got your previous mail. Did something go wrong? I didn't get an error message. Should I try signing again? -- Peter
Sign in to reply to this message.
Ah, I must have missed it. I'll follow up today. On May 22, 2012 4:29 AM, "Peter Kleiweg" <pkleiweg@xs4all.nl> wrote: > Sameer Ajmani schreef op de 21e dag van de bloeimaand van het jaar 2012: > > > ping Peter : I'd like to submit your patches, but we need you to sign the > > CLA first. Please see the instructions in my previous email. > > I did sign it, the day I got your previous mail. Did something > go wrong? I didn't get an error message. Should I try signing > again? > > > > > > -- > Peter >
Sign in to reply to this message.
LGTM
Sign in to reply to this message.
*** Submitted as http://code.google.com/p/go/source/detail?r=798239220647 *** Emacs go-mode: fix Emacs freeze-up when copy/pasting from string or comment. Fixes issue 3509. Fixes issue 2767. R=golang-dev, sameer CC=golang-dev http://codereview.appspot.com/6139066 Committer: Sameer Ajmani <sameer@golang.org>
Sign in to reply to this message.
|