* bug#17059: bug 17059 still present
[not found] <5315.1413844526@ccs.covici.com>
@ 2014-10-22 7:28 ` Alexis
2014-10-22 13:13 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Alexis @ 2014-10-22 7:28 UTC (permalink / raw)
To: 17059
covici@ccs.covici.com writes:
> Hi. I am still having the problem of bug 17059 cannot view extracted
> text from pdf in at least 24.4-rc1. I wonder if someone could take a
> look at this?
>
> Thanks in advance for any ideas.
Initially, i was able to reproduce this, using -nw -Q with 24.4.1, on
Debian Wheezy x86_64 - in a console, and in an X terminal
(specifically, urxvt) as well.
i then instrumented the `doc-view-mode` function, stepping through it
line-by-line, and was still able to consistently reproduce the issue.
i then instrumented `doc-view-initiate-display` instead, and stepped
through it line-by-line .... and when it reached `(doc-view-open-text)`
and called it, the text was extracted and displayed in a buffer.
i'm now no longer able to reproduce the issue with -nw -Q.
What might cause this?
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#17059: bug 17059 still present
2014-10-22 7:28 ` bug#17059: bug 17059 still present Alexis
@ 2014-10-22 13:13 ` Stefan Monnier
2014-10-23 7:27 ` Alexis
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2014-10-22 13:13 UTC (permalink / raw)
To: Alexis; +Cc: 17059
> i then instrumented `doc-view-initiate-display` instead, and stepped
> through it line-by-line .... and when it reached `(doc-view-open-text)`
> and called it, the text was extracted and displayed in a buffer.
The step-by-step gave the process time to finish before it gets killed.
> i'm now no longer able to reproduce the issue with -nw -Q.
The process is not needed any more because we reuse the output from
earlier Emacs sessions (stashed in /tmp somewhere).
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#17059: bug 17059 still present
2014-10-22 13:13 ` Stefan Monnier
@ 2014-10-23 7:27 ` Alexis
2014-10-23 13:18 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Alexis @ 2014-10-23 7:27 UTC (permalink / raw)
To: 17059
Stefan Monnier writes:
>> i then instrumented `doc-view-initiate-display` instead, and stepped
>> through it line-by-line .... and when it reached `(doc-view-open-text)`
>> and called it, the text was extracted and displayed in a buffer.
>
> The step-by-step gave the process time to finish before it gets killed.
>
>> i'm now no longer able to reproduce the issue with -nw -Q.
>
> The process is not needed any more because we reuse the output from
> earlier Emacs sessions (stashed in /tmp somewhere).
Ah, okay. Thanks for explaining!
So: calling `sit-for` in `doc-view-start-process` solves the problem for
me:
(defun doc-view-start-process (name program args callback)
;; Make sure the process is started in an existing directory, (rather than
;; some file-name-handler-managed dir, for example).
(let* ((default-directory (or (unhandled-file-name-directory
default-directory)
(expand-file-name "~/")))
(proc (apply 'start-process name doc-view-conversion-buffer
program args)))
(push proc doc-view--current-converter-processes)
(setq mode-line-process (list (format ":%s" proc)))
(set-process-sentinel proc 'doc-view-sentinel)
(sit-for 1)
(process-put proc 'buffer (current-buffer))
(process-put proc 'callback callback)))
Is this a reasonable solution?
Alexis.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#17059: bug 17059 still present
2014-10-23 7:27 ` Alexis
@ 2014-10-23 13:18 ` Stefan Monnier
2014-10-23 22:12 ` Alexis
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2014-10-23 13:18 UTC (permalink / raw)
To: Alexis; +Cc: 17059
> So: calling `sit-for` in `doc-view-start-process` solves the problem for
> me:
[...]
> Is this a reasonable solution?
No, that just changes the odds of the race-condition, but is only an
ugly workaround. IIUC Tassilo installed an actual fix into trunk a few
days ago.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-23 22:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <5315.1413844526@ccs.covici.com>
2014-10-22 7:28 ` bug#17059: bug 17059 still present Alexis
2014-10-22 13:13 ` Stefan Monnier
2014-10-23 7:27 ` Alexis
2014-10-23 13:18 ` Stefan Monnier
2014-10-23 22:12 ` Alexis
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).