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: Yet another doc-view patch Date: Fri, 19 Oct 2007 14:57:16 +0200 Message-ID: <877ilj45zn.fsf@baldur.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1192798669 11871 80.91.229.12 (19 Oct 2007 12:57:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Oct 2007 12:57:49 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 19 14:57:48 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 1IirQ3-0000fm-IN for ged-emacs-devel@m.gmane.org; Fri, 19 Oct 2007 14:57:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IirPv-00042J-NF for ged-emacs-devel@m.gmane.org; Fri, 19 Oct 2007 08:57:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IirPs-00040s-ND for emacs-devel@gnu.org; Fri, 19 Oct 2007 08:57:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IirPr-0003zH-0R for emacs-devel@gnu.org; Fri, 19 Oct 2007 08:57:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IirPq-0003z3-Sj for emacs-devel@gnu.org; Fri, 19 Oct 2007 08:57:26 -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 1IirPq-0000pX-IP for emacs-devel@gnu.org; Fri, 19 Oct 2007 08:57:26 -0400 Original-Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 627E9349A6 for ; Fri, 19 Oct 2007 08:57:19 -0400 (EDT) Original-Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 19 Oct 2007 08:57:19 -0400 X-Sasl-enc: qR52efXvJtK3XUQFZ/p80LWUm6QQ0RR+C96vsX7IGdhC 1192798638 Original-Received: from baldur.tsdh.de (dslb-084-063-027-031.pools.arcor-ip.net [84.63.27.31]) by mail.messagingengine.com (Postfix) with ESMTP id 9BAC53804 for ; Fri, 19 Oct 2007 08:57:18 -0400 (EDT) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwEAAAAAAi+XoYAAAACXBIWXMAAABIAAAASABGyWs+ AAAATnRFWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYACmV4aWYKICAgICAgMjAKNDU3ODY5NjYwMDAw NGQ0ZDAwMmEwMDAwMDAwODAwMDAwMDAwMDAwMAqJuBZbAAAACXZwQWcAAAAwAAAAMADO7oxXAAAB I0lEQVRYw+VX2w3DMAi87+zTFbr/IBmiqlTLjnkTLDmqrH5UMRzcQSA4X2sPpAfvYzFADoRagF6h x+NYsgG9OF73R94suzUB6M7v0jRCoLpqRvffH3qUFiWRXFiKZBc9gHZD16grwWhg1QitGE10BwBX thZE4/8HICvgcS5lMVEUi572y1zaSh94etpSYuoDniK9SrTbbCfPEXIu9K6QsoWU8uhAFlKGaE8h 13v85cxZgus/2T3HPe34ERq6Ays+DsAx0TSQ2H/nyy46Jo0Mqsa9Y+hnMph1QoXT0FZRC5jai6zC dJWpZehfacq3ir00iC8pz6XoJgC/mNgL2B9RpC+USwD8s3svijKjaF+Rr8tJIUCUJqyNPwVw/R5e KvLz+iBzPs4pHcCUQrRFAAAAKnpUWHRDb21tZW50AAB42vMKcHW3Ss8r1c1ITUzRyypIVzAyN6sw MjMEAGiaB6m0ORgZAAAAGnpUWHRqcGVnOmNvbG9yc3BhY2UAAHjaMwQAADIAMimkmokAAAAhelRY dGpwZWc6c2FtcGxpbmctZmFjdG9yAAB42jOqMAIAAbsA3XNgMqsAAAAASUVORK5CYII= Mail-Followup-To: emacs-devel@gnu.org User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: 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:81217 Archived-At: Hi all, this patch (below or from [1]) implements the following: - New minor mode: doc-view-minor-mode which has only one binding C-c C-c to switch to doc-view-mode. - New function: doc-view-mode-maybe. If there's another mode for this file type in auto-mode-alist (like ps-mode), then use that mode and enable doc-view-minor-mode, else enable doc-view-mode. - fixed some bugs. The results are, that opening a e?ps file opens it with ps-mode (as auto-mode-alist says) and toggles doc-view-minor-mode on. With C-c C-c you can toggle between the editing mode found in auto-mode-alist and doc-view-mode. If you edited a e?ps file and toggle to d-v-m you'll be asked to save your changes and the doc will be reconverted. Currently, C-c C-c for PDF and DVI files will re-open them with doc-view-mode again, because that's what auto-mode-alist tells. I suggest we take the doc-view-mode entries out of auto-mode-alist and replace them with the proper editing modes, e.g. ps-mode for PDF files (is that correct?) and fundamental-mode for DVI files. Then we can add autoload-cookies similar to the one for e?ps files to doc-view.el and everything behaves similar for all types of document files. If you agree, feel free to change that before committing. Bye, Tassilo __________ [1] http://www.tsdh.de/stuff/doc-view.patch