salimoha / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

Editing Docs adds unwanted additional newlines #301

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. google docs edit --title myDoc --editor vim
2. save document
3. google docs edit --title myDoc --editor vim

For every chunk of blank newlines, an additional newline is added.

For example iniitially:
paragraph 1

paragraph 2

paragraph 3

After saving:
paragraph 1

paragraph 2

paragraph 3

Every save continued to add a line to these chunks of newlines.

This problem occurs for me in both nano(2.0.6) and vim(7.2) on os x 10.6.4

gdata 2.0.12
googlecl 0.9.10

eric

Original issue reported on code.google.com by siegel.e...@gmail.com on 30 Sep 2010 at 7:01

GoogleCodeExporter commented 9 years ago
The problem is most likely Docs and vim/nano disagreeing what exactly 
constitutes a blank line. This is pretty obnoxious, but it might be a while 
before I can find what the problem is.

Original comment by thmil...@google.com on 4 Oct 2010 at 7:33

GoogleCodeExporter commented 9 years ago
I've got exactly the same problem uploading txt files.

Original comment by ferranb@gmail.com on 11 Oct 2010 at 9:35

GoogleCodeExporter commented 9 years ago
It seems that the problem is in the Docs side when converting text files. It 
also happens when uploading text files through docs.google.com with the 
"convert" option checked. The converter seems to do the following replacements:

\n  => \r\n 
\r\n => \r\n\r\n 
\r =>  \r\n

A simple testcase to reproduce in Ubuntu:

printf "a\r\nb" > test_rn.txt
hexdump -c test_rn.txt
# a\r\n b
google docs delete test_rn
google docs upload test_rn.txt
# Visit the link returned to see a new blank line
rm test_rn.txt
google docs get --title test_rn --dest .
hexdump -c test_rn.txt
# a\r\n\r\nb 
# And so on..

From here it's possible to avoid this issue converting all the \r\n occurrences 
to \n for text files before uploading/updating to Docs.

Original comment by ferranb@gmail.com on 11 Oct 2010 at 10:57

GoogleCodeExporter commented 9 years ago
Thanks for the detailed test, Ferran.

I can't reproduce this behavior anymore -- looks like the problem has been 
fixed on Docs's end.  Is anyone else having this problem?

Original comment by thmil...@google.com on 1 Nov 2010 at 9:53

GoogleCodeExporter commented 9 years ago
It works for me. That's great.

Original comment by ferranb@gmail.com on 16 Nov 2010 at 10:38

GoogleCodeExporter commented 9 years ago
As a side note: the opposite problem seems to occur now. See Issue 372.

Original comment by tom.h.mi...@gmail.com on 3 Mar 2011 at 2:17

GoogleCodeExporter commented 9 years ago
This problem is occurring for me on Ubuntu 11.04 using vim still

Original comment by mile...@gmail.com on 8 Sep 2011 at 3:34

GoogleCodeExporter commented 9 years ago
Still occurs for me. I"m using googlecl==0.9.13. OS X 10.6.6 and vim 7.3.

Original comment by tylerc...@gmail.com on 8 Sep 2011 at 5:14

GoogleCodeExporter commented 9 years ago
Still happens to me using PC-BSD with googlecl=0.9.13 using vim, vi, ee and nano

Original comment by dtbu...@gmail.com on 28 Sep 2011 at 8:28

GoogleCodeExporter commented 9 years ago
I'm also seeing this problem.  This is on Ubuntu 10.10 with googlecl 0.9.13-1 
and gdata-2.0.14.  A fix would be a great help.

Original comment by thick...@gmail.com on 5 Oct 2011 at 3:02

GoogleCodeExporter commented 9 years ago
I'm also seeing this problem.

Mac OS X 10.7.2
googlecl 0.9.13 (I tried .14, but it's broken for me)
gdata-2.0.14
vim 7.3

Original comment by duncan.m...@gmail.com on 8 Nov 2011 at 7:18

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r613.

Original comment by szy...@endpoint.com on 28 Dec 2012 at 8:23

GoogleCodeExporter commented 9 years ago
Would it be possible to reopen this?  I am still getting this issue on both 
Arch Linux and Fedora 19.

Arch versions:
googlecl 0.9.14
gdata 2.0.18
vim 7.4

Fedora versions:
googlecl 0.9.14
gdata 2.0.17
vim 7.4

This occurs both for editing an existing document and uploading a new document. 
 I am pretty sure this is happening on the Docs side when it converts the 
plain-text format to the Docs format.

Original comment by calid1...@gmail.com on 12 Nov 2013 at 8:59

GoogleCodeExporter commented 9 years ago
I should also note that if I select all -> clear formatting it removes the 
extra newlines.

Original comment by calid1...@gmail.com on 12 Nov 2013 at 9:05