Re: [Daniel Burrows <[email protected]>] Bug#292886: Phantom spaces appearing in TeX documents; related to fill?

David Kastrup <[email protected]>
Newsgroups gmane.emacs.auc-tex
Message-ID <[email protected]>
Ralf Angeli <[email protected]> writes:

> * Frank Küster (2005-01-31) writes:
>
>> Ralf Angeli <[email protected]> wrote:
>>
>>> The problem with the code is that it uses internals of reporter.el.
>>> It is therefore likely to break once reporter.el gets updated.
>>> Unfortunately reporter.el doesn't provide a clean interface for doing
>>> such stuff.  Its functionality is more or less limited to the creation
>>> of a mail buffer with the whole bug report as its content.
>>
>> So does this mean you would not recommend to use this code in our bug
>> report scripts?
>
> reporter.el doesn't seem to be one of the libraries which change
> frequently.  But it would be advisable to check if the code still
> works with the next Emacs release once it is out.
>
> Also, I don't know how it behaves with various types of broken
> installations.  For example, in case some files are not found you'll
> get a message like "Cannot open load file: tex-site".  I don't think
> that the code will hang, but you cannot rely on it always producing
> the output you can see with intact installations.
>
> BTW, I just noticed that I forgot to include the version information
> in the command I posted earlier.  Here is an update:
>
> emacs -batch -eval "(progn (require 'tex-site) (require 'latex) (require 'reporter) (let ((reporter-status-count 0) (reporter-eval-buffer (current-buffer))) (reporter-dump-state (concat \"AUCTeX \" AUCTeX-version)'(window-system LaTeX-version TeX-style-path TeX-auto-save TeX-parse-self TeX-master) nil nil)) (message (buffer-string)))"
>
> Anyway, it is a hack.  But a hack you can use until (if ever) there
> will be a proper interface for dumping the state of an Elisp
> package.

I think it would be both more flexible and robust to just run the bug
reporting command itself (answering return to any possible prompt),
then dump the resulting mail buffer up to a possible signature.  Here
would be how to do that:

yes|emacs -batch --eval '(progn(TeX-submit-bug-report)(princ(buffer-substring (point)(or(search-forward "\n-- \n" nil t)(point-max)))))' 2>/dev/null

This also appears to work for preview-report-bug.  report-emacs-bug,
however, appears to get terribly confused when it tries to report the
(nonexisting) keystroke history.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.