[Reportbug-maint] Bug#367298: Bug#367298: reportbug --guns ignores already running emacs

Sandro Tosi morph at debian.org
Mon Jan 4 01:19:39 UTC 2010


Hello Håkon,
thanks you really much for your patch!!

2009/1/8 Håkon Stordahl <hakon at stordahl.org>:
> tags 367298 patch
> thanks
>
> Here's a suggestion how to get this to work, making reportbug attempt
> to use emacsclient so an existing instance of Emacs can be used to
> send the bug report. Since this involves a mix of Emacs Lisp, shell
> code and Python, it gets a bit messy, unfortunately. So, I've attached
> two patches; I'm not sure which one is preferable. The first patch
> is the most quick and dirty way to hack in support for this, while the
> other takes an object oriented approach, which perhaps is overkill.

Instead I decided to go with the OO approach: it will be helpful to
have something already in OO-style when we'll do a mayor code cleanup.

> Also, to get this to work I had to drop the use of an environment
> variable as the method to pass the name of the tempfile with the
> reportbug template to the Emacs Lisp code, because an existing Emacs
> process cannot see environment variables created by reportbug. Instead
> the filename will be passed as a parameter to the function
> tfheen-reportbug-insert-template in Emacs Lisp code.
>
> Note that this will only work with emacsclient for GNU Emacs version
> 22 and (hopefully) later, because earlier versions of emacsclient did
> not support the --eval option.

I'll add an entry in Suggests field and a note in an entry in the user
documentation about it

> Also note that users need to have
> (server-start) in their ~/.emacs file for this extension to be useful,
> or else will Emacs not listen for connections from emacsclient.

that will go into the doc too

> Though, if emacsclient won't work because of either of these issues,
> or another reason, reportbug will work as before, with a new instance
> of Emacs being started and used instead.

yep, verified :)

> While not related to this issue, I also took the opportunity to make
> another couple of slight modificatons to reportbug.el. First I
> substituted the calls to string-to-int, that were used in the patch I
> submitted for #227153, by calls to string-to-number instead, as
> string-to-int now seems to be considered obsolete since Emacs 22.1.
> Secondly, I changed the function tfheen-reportbug-insert-template such
> that, in the buffer that is created for the reportbug template, the
> point will be positioned where it is natural to start typing the text
> which is to be filled in by the user reporting the bug.
>
> The patches are for reportbug 3.99.0.

It took a bit to adapt it to the new code (a *lot* has changed from
3.99 to now) it has worth the time. This patch will be in the next
reportbug release.

Let me thank you again for the patch.

Cheers,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi





More information about the Reportbug-maint mailing list