From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#15466: 24.3.50; [PATCH] Add some keybindings for doc-view-mode Date: Thu, 26 Sep 2013 20:38:00 +0200 Message-ID: <87d2nv5szb.fsf@thinkpad.tsdh.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1380220765 11098 80.91.229.3 (26 Sep 2013 18:39:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Sep 2013 18:39:25 +0000 (UTC) Cc: Xue Fuqiao , 15466@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 26 20:39:27 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VPGTG-0007v1-2G for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Sep 2013 20:39:26 +0200 Original-Received: from localhost ([::1]:59403 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPGTF-00026N-NA for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Sep 2013 14:39:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPGT0-0001jj-4H for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2013 14:39:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPGSt-0006mU-2K for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2013 14:39:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPGSs-0006m6-Rc for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2013 14:39:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VPGSs-000680-Ed for bug-gnu-emacs@gnu.org; Thu, 26 Sep 2013 14:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Sep 2013 18:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15466 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 15466-submit@debbugs.gnu.org id=B15466.138022069423499 (code B ref 15466); Thu, 26 Sep 2013 18:39:02 +0000 Original-Received: (at 15466) by debbugs.gnu.org; 26 Sep 2013 18:38:14 +0000 Original-Received: from localhost ([127.0.0.1]:38521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VPGS2-00066n-O7 for submit@debbugs.gnu.org; Thu, 26 Sep 2013 14:38:14 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:55851) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VPGRw-00066G-HD for 15466@debbugs.gnu.org; Thu, 26 Sep 2013 14:38:08 -0400 Original-Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id D1C8321E9A; Thu, 26 Sep 2013 14:38:02 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 26 Sep 2013 14:38:02 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:cc:subject:references:date :in-reply-to:message-id:mime-version:content-type; s=smtpout; bh=ttH2iP27jfR3Hd0/l2HvMEaFGFM=; b=oXqrvzOfcuthTlefjVt8Djz2WTyL 6JReapXl0v8GqoWY+Ht1hsldKUawTAWY+M5rs5Q7r7cAo4AEXU5cHDFOeu3OP/CD PFVleNQN7Cf05Z7UfLIUYsX+7tps7gAaug+gXV8gIzxCDj26ufgNNJUEp0NPQGtd R3u3XlBqA8wYtDE= X-Sasl-enc: qegr7oooJuksAJNkLJb5uv0KoVwPcnMD1sR0imq7/rL4 1380220682 Original-Received: from thinkpad.tsdh.org (unknown [91.67.164.26]) by mail.messagingengine.com (Postfix) with ESMTPA id 0FD466800F7; Thu, 26 Sep 2013 14:38:01 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Thu, 26 Sep 2013 14:05:09 -0400") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78758 Archived-At: Stefan Monnier writes: >> (define-key map (kbd "RET") 'image-next-line) >> ;; Zoom in/out. >> (define-key map "+" 'doc-view-enlarge) >> + (define-key map "=" 'doc-view-enlarge) >> + (define-key map (kbd "C-x C-+") 'doc-view-enlarge) >> + (define-key map (kbd "C-x C-=") 'doc-view-enlarge) >> (define-key map "-" 'doc-view-shrink) >> + (define-key map (kbd "C-x C--") 'doc-view-shrink) >> ;; Fit the image to the window >> (define-key map "W" 'doc-view-fit-width-to-window) >> (define-key map "H" 'doc-view-fit-height-to-window) > > I think it's OK (unless Tassilo disagrees, obviously), No, it's fine with me. > Also, maybe instead of rebinding C-x C-+, we should remap > text-scale-adjust. Yeah (define-key map [remap text-scale-adjust] 'doc-view-enlarge) (define-key map (kbd "C-x C--") 'doc-view-shrink) should be equivalent. Well, except that C-x C-0 would also enlarge. It wouldn't be bad to have a command to reset to the original size. That shouldn't be hard to do. In the non-ImageMagick case, it's killing the buffer-local value of doc-view-resolution and reconverting, and in the ImageMagick case it's just killing the local value of doc-view-image-width and re-inserting the image with doc-view-insert-image. Bye, Tassilo