Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(21)

Issue 4276059: code review 4276059: misc/emacs: gofmt: don't clobber the current buffer on ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 12 months ago by Sameer (personal)
Modified:
13 years, 10 months ago
Reviewers:
CC:
rsc, aclements, amdragon_mit.edu, golang-dev
Visibility:
Public.

Description

misc/emacs: gofmt: don't clobber the current buffer on failure Change M-x gofmt to display errors in a new buffer instead of clobbering the current buffer. Add gofmt-before-save, which runs gofmt when in go-mode. This can be used with before-save-hook. Add to your .emacs: (add-hook 'before-save-hook 'gofmt-before-save)

Patch Set 1 #

Patch Set 2 : diff -r 2a70fd529a01 http://go.googlecode.com/hg/ #

Patch Set 3 : diff -r ae2851fd0361 http://go.googlecode.com/hg/ #

Patch Set 4 : diff -r ae2851fd0361 http://go.googlecode.com/hg/ #

Patch Set 5 : diff -r ae2851fd0361 http://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 6 : diff -r ae2851fd0361 http://go.googlecode.com/hg/ #

Patch Set 7 : diff -r ae2851fd0361 http://go.googlecode.com/hg/ #

Total comments: 23

Patch Set 8 : diff -r ae2851fd0361 http://go.googlecode.com/hg/ #

Patch Set 9 : diff -r ae2851fd0361 http://go.googlecode.com/hg/ #

Patch Set 10 : diff -r 3a85cba563d6 http://go.googlecode.com/hg/ #

Patch Set 11 : diff -r 3a85cba563d6 http://go.googlecode.com/hg/ #

Patch Set 12 : diff -r 3a85cba563d6 http://go.googlecode.com/hg/ #

Patch Set 13 : diff -r 3a85cba563d6 http://go.googlecode.com/hg/ #

Patch Set 14 : diff -r 3a85cba563d6 http://go.googlecode.com/hg/ #

Patch Set 15 : diff -r 31eae9ad9d23 http://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -20 lines) Patch
M misc/emacs/go-mode.el View 1 2 3 4 5 6 7 1 chunk +41 lines, -17 lines 0 comments Download
M misc/emacs/go-mode-load.el View 1 2 3 4 5 6 7 2 chunks +16 lines, -3 lines 0 comments Download

Messages

Total messages: 19
Sameer (personal)
Hello rsc, aclements (cc: golang-dev@googlegroups.com), I'd like you to review this change to http://go.googlecode.com/hg/
13 years, 12 months ago (2011-03-18 20:08:04 UTC) #1
rsc
Fine with me. I'd like some emacs user to sign off on this though.
13 years, 12 months ago (2011-03-18 21:29:10 UTC) #2
Sameer (personal)
Sure, I'm open to any suggested reviewers. I just grabbed you two from the filelog. ...
13 years, 12 months ago (2011-03-19 00:42:22 UTC) #3
Sameer (personal)
http://codereview.appspot.com/4276059/diff/8003/misc/emacs/go-mode.el File misc/emacs/go-mode.el (right): http://codereview.appspot.com/4276059/diff/8003/misc/emacs/go-mode.el#newcode540 misc/emacs/go-mode.el:540: (when (eq major-mode 'go-mode) This when guard is the ...
13 years, 12 months ago (2011-03-19 02:01:28 UTC) #4
rsc
On Fri, Mar 18, 2011 at 20:42, Sameer Ajmani <ajmani@gmail.com> wrote: > Sure, I'm open ...
13 years, 12 months ago (2011-03-19 03:07:20 UTC) #5
Sameer (personal)
I've simplified this CL per my earlier comments on it: gofmt now replaces the current ...
13 years, 12 months ago (2011-03-21 01:44:53 UTC) #6
amdragon_mit.edu
On Fri, Mar 18, 2011 at 11:07 PM, Russ Cox <rsc@golang.org> wrote: > On Fri, ...
13 years, 12 months ago (2011-03-21 08:38:35 UTC) #7
aclements
http://codereview.appspot.com/4276059/diff/3/misc/emacs/go-mode.el File misc/emacs/go-mode.el (left): http://codereview.appspot.com/4276059/diff/3/misc/emacs/go-mode.el#oldcode502 misc/emacs/go-mode.el:502: The (provide 'go-mode) should be the last line in ...
13 years, 12 months ago (2011-03-21 08:42:37 UTC) #8
Sameer (personal)
http://codereview.appspot.com/4276059/diff/3/misc/emacs/go-mode.el File misc/emacs/go-mode.el (right): http://codereview.appspot.com/4276059/diff/3/misc/emacs/go-mode.el#newcode503 misc/emacs/go-mode.el:503: (defun get-empty-buffer (name) On 2011/03/21 08:42:37, aclements wrote: > ...
13 years, 12 months ago (2011-03-22 00:44:56 UTC) #9
aclements
LGTM (modulo updating the commit message). http://codereview.appspot.com/4276059/diff/3/misc/emacs/go-mode.el File misc/emacs/go-mode.el (right): http://codereview.appspot.com/4276059/diff/3/misc/emacs/go-mode.el#newcode523 misc/emacs/go-mode.el:523: (old-point (point)) On ...
13 years, 12 months ago (2011-03-22 01:12:49 UTC) #10
Sameer (personal)
http://codereview.appspot.com/4276059/diff/3/misc/emacs/go-mode.el File misc/emacs/go-mode.el (right): http://codereview.appspot.com/4276059/diff/3/misc/emacs/go-mode.el#newcode523 misc/emacs/go-mode.el:523: (old-point (point)) On 2011/03/22 01:12:49, aclements wrote: > On ...
13 years, 12 months ago (2011-03-22 01:23:54 UTC) #11
Sameer (personal)
Please ignore the bazillion patch sets. Trying unsuccessfully to get hg submit to work. On ...
13 years, 12 months ago (2011-03-22 01:33:18 UTC) #12
Sameer (personal)
Ah, I must not be a committer. Russ, will you commit this CL? I added ...
13 years, 12 months ago (2011-03-22 01:44:00 UTC) #13
rsc
yes, i will submit it.
13 years, 12 months ago (2011-03-22 02:58:01 UTC) #14
rsc
please hg revert CONTRIBUTORS; hg mail 4276059
13 years, 11 months ago (2011-03-23 17:45:24 UTC) #15
Sameer (personal)
Hello rsc, aclements, amdragon@mit.edu (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 11 months ago (2011-03-23 23:42:45 UTC) #16
aclements
On 2011/03/23 23:42:45, Sameer Ajmani wrote: > Hello rsc, aclements, mailto:amdragon@mit.edu (cc: mailto:golang-dev@googlegroups.com), > > ...
13 years, 11 months ago (2011-03-24 01:22:24 UTC) #17
Sameer (personal)
Done. On Wed, Mar 23, 2011 at 1:45 PM, Russ Cox <rsc@golang.org> wrote: > please ...
13 years, 11 months ago (2011-03-24 14:31:20 UTC) #18
rsc
13 years, 11 months ago (2011-03-24 14:35:44 UTC) #19
*** Submitted as http://code.google.com/p/go/source/detail?r=31d7feb9281b ***

misc/emacs: gofmt: don't clobber the current buffer on failure

Change M-x gofmt to display errors in a new buffer instead of
clobbering the current buffer.

Add gofmt-before-save, which runs gofmt when in go-mode.  This
can be used with before-save-hook.  Add to your .emacs:
  (add-hook 'before-save-hook 'gofmt-before-save)

R=rsc, aclements, amdragon
CC=golang-dev
http://codereview.appspot.com/4276059

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b