unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alexis <flexibeast@gmail.com>
To: 17059@debbugs.gnu.org
Subject: bug#17059: bug 17059 still present
Date: Thu, 23 Oct 2014 18:27:29 +1100	[thread overview]
Message-ID: <87oat3z1i7.fsf@gmail.com> (raw)
In-Reply-To: <jwvoat4z1sa.fsf-monnier+emacsbugs@gnu.org>


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.





  reply	other threads:[~2014-10-23  7:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]
2014-10-23 13:18       ` Stefan Monnier
2014-10-23 22:12         ` Alexis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oat3z1i7.fsf@gmail.com \
    --to=flexibeast@gmail.com \
    --cc=17059@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).