[email protected]
[Top] [All Lists]

Bug#287261: marked as forwarded (gettext-el: bad interaction with view-r

Subject: Bug#287261: marked as forwarded gettext-el: bad interaction with view-read-only
From: Debian Bug Tracking System
Date: Tue, 11 Jan 2005 09:03:53 -0800
Your message dated Tue, 11 Jan 2005 17:50:25 +0100 (CET)
with message-id <[email protected]>
has caused the Debian Bug report #287261,
regarding gettext-el: bad interaction with view-read-only
to be marked as having been forwarded to the upstream software
author(s) gettext bugs <[email protected]>.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at 287261-forwarded) by bugs.debian.org; 11 Jan 2005 16:50:32 +0000
>From [email protected] Tue Jan 11 08:50:31 2005
Return-path: <[email protected]>
Received: from pizarro.unex.es [] (postfix)
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1CoPDz-0001KK-00; Tue, 11 Jan 2005 08:50:31 -0800
Received: from localhost (almendralejo.unex.es [])
        by pizarro.unex.es (Postfix/MJ-1.08) with ESMTP
        id 073E1A1D3D; Tue, 11 Jan 2005 17:50:30 +0100 (CET)
Received: from pizarro.unex.es ([])
        by localhost (emilio []) (amavisd-new, port 10024)
        with ESMTP id 09028-02; Tue, 11 Jan 2005 17:51:03 +0100 (CET)
Received: from guadiana.unex.es (guadiana.unex.es [])
        by pizarro.unex.es (Postfix/MJ-1.08) with ESMTP
        id 022EBA1D2E; Tue, 11 Jan 2005 17:50:27 +0100 (CET)
Received: from guadiana.unex.es
        ([] helo=localhost ident=sanvila)
        by guadiana.unex.es with esmtp (Exim 3.35 #1 (Debian))
        id 1CoPDu-0005EN-00; Tue, 11 Jan 2005 17:50:26 +0100
Date: Tue, 11 Jan 2005 17:50:25 +0100 (CET)
From: Santiago Vila <[email protected]>
To: gettext bugs <[email protected]>
Cc: [email protected],
        Kalle Olavi Niemitalo <[email protected]>
Subject: Bug#287261: gettext-el: bad interaction with view-read-only (fwd)
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-ID: <[email protected]>
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at unex.es
Delivered-To: [email protected]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-11.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER,
        HAS_PACKAGE autolearn=ham version=2.60-bugs.debian.org_2005_01_02


Received this from the Debian bug system.
[ Please Cc: the submitter and [email protected] ].

---------- Forwarded message ----------
From: Kalle Olavi Niemitalo <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Date: Sun, 26 Dec 2004 15:57:51 +0200
Subject: Bug#287261: gettext-el: bad interaction with view-read-only

Package: gettext-el
Version: 0.14.1-5
Severity: minor
File: /usr/share/emacs/site-lisp/gettext/po-mode.el
Tags: patch

I have customized `view-read-only' to t, which generally results 
in useful behavior.  Now however, when I visit a *.po file, 
`after-find-file' calls `normal-mode', which calls `po-mode', 
which sets `buffer-read-only' to t, and `after-find-file' then 
enables View mode, which shadows the key bindings of PO mode: for 
example, RET scrolls the buffer rather than opens a translation 
for editing.  I then have to explicitly disable View mode before 
I can edit the translations.

I believe the right way to solve the problem is to add this form 
somewhere near (defun po-mode ...) in po-mode.el:

  (put 'po-mode 'mode-class 'special)

Then `after-find-file' will abstain from enabling View mode, even 
though the buffer is read only.  According to the Emacs Lisp 
Reference Manual, the setting will also affect two other aspects 
of PO mode:

- When the current buffer is in PO mode and `default-major-mode' 
is nil, visiting a new file (not listed in `auto-mode-alist') 
will not make the new buffer inherit PO mode from the current 

- Items specific to editing will not appear in the tool bar in PO 

I believe these effects are not harmful.

diff -u /usr/share/emacs/site-lisp/gettext/po-mode.el 
--- /usr/share/emacs/site-lisp/gettext/po-mode.el       2004-07-27 
00:21:24.000000000 +0300
+++ /home/kalle/share/emacs/site-lisp/po-mode.el        2004-12-26 
15:45:38.000000000 +0200
@@ -48,6 +48,11 @@
 ;; You may also adjust some variables, below, by defining them in your
 ;; '.emacs' file, either directly or through command 'M-x customize'.
+;;; Change Log:
+;; 2004-12-26  Kalle Olavi Niemitalo  <[email protected]>
+;;     (po-mode): Mark the major mode as special.
 ;;; Code:
 (defconst po-mode-version-string "2.01" "\
@@ -1015,6 +1020,10 @@
   "Keymap for PO mode.")
+;; PO mode makes the buffer read only but should not enable View mode
+;; even when `view-read-only' is t.
+(put 'po-mode 'mode-class 'special)
 (defun po-mode ()
   "Major mode for translators when they edit PO files.

To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

<Prev in Thread] Current Thread [Next in Thread>
  • Bug#287261: marked as forwarded (gettext-el: bad interaction with view-read-only), Debian Bug Tracking System <=