After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 533178 - Signature printed double when line needs to be wrapped
Signature printed double when line needs to be wrapped
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other Linux
: Normal minor
: ---
Assigned To: Charles Kerr
Pan QA Team
: 534139 534707 534738 547113 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-05-14 19:59 UTC by Tommy Bongaerts
Modified: 2012-05-26 17:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot of the behavior I get when hitting 'post' with the specified sig (51.99 KB, image/png)
2008-07-06 00:42 UTC, Charles Kerr
Details
Example of the bug in action. (45.83 KB, image/png)
2008-07-06 02:04 UTC, Joe Zeff
Details
News signature that causes the problem (135 bytes, text/plain)
2009-07-29 10:27 UTC, Phil Pemberton
Details

Description Tommy Bongaerts 2008-05-14 19:59:55 UTC
When using a text file as signature, it will be printed double on composing a message (new and reply) when at least one line of the signature text needs to be wrapped.

This behaviour is exhibited in Pan 0.132 "waxed in black".
Comment 1 Petr Kovar 2008-05-29 17:50:36 UTC
Confirming the bug & setting the correct version.
Comment 2 Petr Kovar 2008-05-29 17:52:02 UTC
*** Bug 534139 has been marked as a duplicate of this bug. ***
Comment 3 Petr Kovar 2008-05-29 17:54:20 UTC
*** Bug 534738 has been marked as a duplicate of this bug. ***
Comment 4 Petr Kovar 2008-05-29 18:02:51 UTC
*** Bug 534707 has been marked as a duplicate of this bug. ***
Comment 5 Joe Zeff 2008-05-29 18:15:59 UTC
Bug 534707 concerned getting a signature from a program generating random signatures.  In that case, the two were different.  I mention this as it shows that Pan is reading the file twice, not just inserting it into the message more than once.
Comment 6 Charles Kerr 2008-07-05 19:36:29 UTC
I can't reproduce this, and if I'm reading this right all I should need is a sig that's too wide, then press `post', so I can't imagine what I'm doing wrong. :)

Could someone attach a signature file that demonstrates this behavior, and if more is needed besides just pressing `post', walk me through the steps?
Comment 7 Joe Zeff 2008-07-05 19:54:05 UTC
I use a sigmonster that uses two files: one with the static part of the signature and another with the quotes to randomize.  Here's the original of the static part of my .sig that gave me the trouble:

Joe Zeff -- The Guy With The Sideburns: http://www.zeff.us http://www.lasfs.info

Use it as is, one line, and the bug triggers; break it before the urls and there's no problem.
Comment 8 Charles Kerr 2008-07-06 00:42:35 UTC
Created attachment 114040 [details]
screenshot of the behavior I get when hitting 'post' with the specified sig

I tried the signature you specified in Pan 0.132, but am not seeing the doubling described. (see attached image.)  

Am I doing it wrong?
Comment 9 Joe Zeff 2008-07-06 02:04:34 UTC
Created attachment 114043 [details]
Example of the bug in action.
Comment 10 Joe Zeff 2008-07-06 02:06:27 UTC
That's...strange.  As you can see by my screenshot, it works for me.  Did you put the text in a file as I did, or just put the line in to be entered?  It may not trigger the bug unless Pan has to read it in.
Comment 11 Tobias Mueller 2009-02-05 20:02:51 UTC
I am reopening as there is more information describing the problem available. Feel free to ask for further information or close if this is obsolete.
Comment 12 Phil Pemberton 2009-07-29 10:27:16 UTC
Created attachment 139457 [details]
News signature that causes the problem

I'm seeing the same issue with Pan 0.132, running on Ubuntu 9.04 (Pan installed from the Ubuntu repositories).

To reproduce:
  Edit -> Edit posting profiles
  New -> 0USENET
  Fill in details
  Use a signature -> CHECKED
  Signature type -> Text File
  Signature file -> /home/philpem/Mail Signatures/newssig.txt
  OK
  OK
  Try and post a message to a newsgroup. Signature will be pasted in twice.

newssig.txt is attached.
Comment 13 Petr Kovar 2009-07-29 12:15:03 UTC
Note that Pan 0.133 was released ca. year ago. Please try the most recent version and report back if there's still the problem or vice versa.
Comment 14 Petr Kovar 2009-07-29 12:58:56 UTC
*** Bug 547113 has been marked as a duplicate of this bug. ***
Comment 15 Phil Pemberton 2009-07-29 13:41:59 UTC
Re #13:
0.133 won't build on 9.04:

[...]
make[3]: Entering directory `/home/philpem/INSTALL/pan/pan-0.132/pan/general'
if g++ -DHAVE_CONFIG_H -I. -I. -I../..  -I../.. -D_LARGEFILE64_SOURCE -I/usr/include/gmime-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include       -g -O2 -MT file-util.o -MD -MP -MF ".deps/file-util.Tpo" -c -o file-util.o file-util.cc; \
	then mv -f ".deps/file-util.Tpo" ".deps/file-util.Po"; else rm -f ".deps/file-util.Tpo"; exit 1; fi
file-util.cc: In function ‘std::string pan::file::sanitize(const pan::StringView&)’:
file-util.cc:189: error: ‘replace’ is not a member of ‘std’
/usr/include/stdio.h: In function ‘bool pan::file::get_text_file_contents(const pan::StringView&, std::string&, const char*, const char*)’:
/usr/include/stdio.h:155: error: too many arguments to function ‘int remove(const char*)’
file-util.cc:301: error: at this point in file
file-util.cc:301: error: invalid operands of types ‘int’ and ‘char*’ to binary ‘operator-’
make[3]: *** [file-util.o] Error 1
make[3]: Leaving directory `/home/philpem/INSTALL/pan/pan-0.132/pan/general'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/philpem/INSTALL/pan/pan-0.132/pan'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/philpem/INSTALL/pan/pan-0.132'
make: *** [all] Error 2

$ gcc --version
gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Comment 16 Petr Kovar 2009-07-29 14:13:05 UTC
Try to build Pan 0.133+ from this updated repository:

git://github.com/lostcoder/pan2.git
Comment 17 Phil Pemberton 2009-07-29 14:32:12 UTC
OK, I got the Ubuntu development version of Pan (0.133 with patches to add the Debian packaging files and make it compile under GCC4.3+) backported from the current development branch. Same issue. If there isn't a linebreak at the end of the signature file, it's inserted twice. This applies to both "Followup to newsgroup" and "Post article".


I can't seem to get the git version to build at all...

philpem@cheetah:~/INSTALL/pan-git/pan2$ git clone git://github.com/lostcoder/pan2.git
Initialized empty Git repository in /home/philpem/INSTALL/pan-git/pan2/.git/
remote: Counting objects: 3156, done.
remote: Compressing objects: 100% (814/814), done.
remote: Total 3156 (delta 2434), reused 3030 (delta 2340)
Receiving objects: 100% (3156/3156), 2.39 MiB | 210 KiB/s, done.
Resolving deltas: 100% (2434/2434), done.

philpem@cheetah:~/INSTALL/pan-git/pan2$ cd pan2

philpem@cheetah:~/INSTALL/pan-git/pan2$ ./autogen.sh 
[lots of text here]

$ ./configure
[ ... more text ... ]
checking for pkg-config... (cached) /usr/bin/pkg-config
checking pkg-config is at least version 0.16... yes
checking for GLIB - version >= 2.12.0... yes (version 2.20.1)
checking for GMIME... configure: error: Package requirements (gmime-2.4    >= 2.4.0) were not met:

No package 'gmime-2.4' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GMIME_CFLAGS
and GMIME_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


While I have no problem with the idea of backporting gmime-2.4 (only Pan and Tomboy Notes appear to use it), I get the feeling that Pan is going to want other things as well, and I'd rather not end up in a situation where I have to backport half of GTK just to make this work...
Comment 18 Phil Pemberton 2009-07-29 15:34:19 UTC
OK, I'm wrong.

Adding a newline to the end of the signature does NOT help. Basically, if the text gets wrapped, Pan doubles it up.

My current workaround is to edit my sigfile to wrap the last line, which should serve for now, until I get a chance to look into this some more.
Comment 19 Heiko Adams 2012-04-10 22:20:17 UTC
Any progress on this nasty bug??
Comment 20 Heinrich Müller 2012-05-26 17:35:41 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.