From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: Please install: Some improvements to doc-view.el Date: Tue, 09 Oct 2007 11:02:34 +0200 Message-ID: <87zlys8xud.fsf@baldur.tsdh.de> References: <87bqbhkhc6.fsf@baldur.tsdh.de> <58152.128.165.0.81.1191330286.squirrel@webmail.lanl.gov> <878x6ljwb4.fsf@baldur.tsdh.de> <87fy0r2u3z.fsf@baldur.tsdh.de> <87wsu1sear.fsf@baldur.tsdh.de> <878x6gqqfa.fsf@baldur.tsdh.de> <87ve9jhifi.fsf@jurta.org> <87d4vpwqo3.fsf@baldur.tsdh.de> <87ir5h4cz1.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1191920592 18067 80.91.229.12 (9 Oct 2007 09:03:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Oct 2007 09:03:12 +0000 (UTC) Cc: Richard Stallman To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 09 11:03:10 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IfAzP-0003SJ-PM for ged-emacs-devel@m.gmane.org; Tue, 09 Oct 2007 11:02:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfAzK-0005Sh-5w for ged-emacs-devel@m.gmane.org; Tue, 09 Oct 2007 05:02:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IfAzE-0005Qd-OJ for emacs-devel@gnu.org; Tue, 09 Oct 2007 05:02:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IfAzC-0005On-Sj for emacs-devel@gnu.org; Tue, 09 Oct 2007 05:02:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfAzC-0005Oh-Pu for emacs-devel@gnu.org; Tue, 09 Oct 2007 05:02:42 -0400 Original-Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IfAz8-00077q-F0; Tue, 09 Oct 2007 05:02:38 -0400 Original-Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 311B2311EB; Tue, 9 Oct 2007 05:02:38 -0400 (EDT) Original-Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 09 Oct 2007 05:02:38 -0400 X-Sasl-enc: ayByxRgaaiUYeEzRwp6OKn9YXS8yTJ4UISf+U7Rhhl+2 1191920557 Original-Received: from baldur.tsdh.de (dslb-084-063-063-130.pools.arcor-ip.net [84.63.63.130]) by mail.messagingengine.com (Postfix) with ESMTP id 1913315600; Tue, 9 Oct 2007 05:02:36 -0400 (EDT) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwEAIAAACI8LKTAAAACXBIWXMAAArrAAAK6wGCiw1a AAAATnRFWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYACmV4aWYKICAgICAgMjAKNDU3ODY5NjYwMDAw NGQ0ZDAwMmEwMDAwMDAwODAwMDAwMDAwMDAwMAqJuBZbAAAACXZwQWcAAAAwAAAAMADO7oxXAAAB mElEQVRo3u2byxHCMAxEVQpXekgPKYI2aIJGUwNXLmT02ZXkRBcfMkxsv2hXtmzkeBzPY5/2XyuD YAB1ArS9tvf26TlV39jE142+rcURH6Hw0GQi441KUN13llUEk0Q6WMtuwYCuhCYyLzMgbAb5fa55 P+rz6DEJG03cERjjCQH694qq/MJLEcURhJ08A1MZoHw01nEWe1AtIL3ZO7MYo2NrhrIi0087lObj 3+0chHUC+rGh4hcQQbzAPoeiXz0l7cWqNK9ZOsZjFrCbx8rK5zVxp4vnO8nZx+udxSoizRYkkpGF scHTTyyyz7LGUVLJ1eojvueMJV9SyZWxnEe9X7NKuiAgvc0z6lnCOzNAfcPa8xJhx4vGnq1Ol1nb FJ5wUPHi6wWFT6oCHhVNbElKjj2jfn8uW4b0pNsRsFVE7BOX1DSPkobeoS54uwNVY14SkHWDEi+/ LQnI50rWYtuNTDpfVi08yLewzL8r0AhQzws30vkORlXUNAKkL79NBO1WTDeVWB9xLelBc5G8WFAD aP6KMIAGUK/2C9wW05DKIbRCAAAAGnpUWHRqcGVnOmNvbG9yc3BhY2UAAHjaMwIAADMAM4k4IzUA AAAmelRYdGpwZWc6c2FtcGxpbmctZmFjdG9yAAB42jOqMNIxrDAEYQARgwLpPZcvTwAAAABJRU5E rkJggg== Mail-Followup-To: emacs-devel@gnu.org, Richard Stallman In-Reply-To: <87ir5h4cz1.fsf@jurta.org> (Juri Linkov's message of "Mon, 08 Oct 2007 22:34:42 +0300") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-Detected-Kernel: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:80459 Archived-At: Juri Linkov writes: >>>> Since doc-view-mode doesn't call an external viewer, but instead >>>> renders the file as an image inside the Emacs buffer, I think a >>>> good solution would be to use the same user interface as is >>>> implemented by image-mode: by default, visiting a pdf/dvi file >>>> could display a rendered image (which is more preferable for most >>>> users than editing them, I guess). But if the user still wants to >>>> edit the source file or to view it as text, then the user could >>>> type `C-c C-c'. >>> >>> +1 >> >> Would be ok for me, but I'll wait for a decision for the doc-view >> vs. Gnus mechanism before implementing it. > > I think Gnus mechanism is irrelevant to doc-view. Gnus uses mailcap > mechanisms to find the appropriate mailcap entry and run an external > program in a separate process. doc-view displays the rendered image > in the Emacs buffer. So it could work exactly as image-mode for > pdf/ps/dvi files. Ok, that sounds reasonable to me and I'm willing to implement it. If I understand correctly, I have to add entries to `auto-mode-alist' and change `doc-view-mode' so that it calls `doc-view' for the current `buffer-file-name' plus a binding `C-c C-c' to toggle between the rendered image presentation and the text representation. Is that correct? One problem I see: Should `doc-view' called with NO-CACHE set to t? Personally I prefer calling (doc-view nil file) and adding a binding to the mode to reconvert the document. > As for the mailcap feature, I recall there was a proposal to put > programs from the mailcap entry to the default value of the ! command > (`dired-do-shell-command'). I'd second that. Bye, Tassilo