Re: BUG in scroll-lock-mode?

2007-06-08 Thread Ralf Angeli
* Juri Linkov (2007-06-08) writes:

 ,[ http://mid.gmane.org/E1Dnaf1-0007am-Cg%40neutrino.iwi.uni-sb.de ]
 | An open issue is the key binding for toggling the mode.  If the minor
 | mode should be able to be activated in some major modes but not in
 | others, it doesn't make much sense to bind this to the Scroll Lock key
 | which in my understanding means to enable or disable it globally (not
 | just for Emacs but for other applications aware of it as well).
 `

 I see that Scroll_Lock does nothing special on X so it's safe to bind it
 to this key.

I doubt that this is the case for any X server.  There are likely people
or distributions using the key as a modifier or something else.

As far as I understand the Scroll Lock key was originally supposed to
toggle scroll lock globally, i.e. for the desktop as a whole, just like
Caps Lock or Num Lock.  There are even keyboards which provide an LED
for indicating if scroll lock is active.

I'm not sure if it is actually possible to configure an X server like
that.  (Some research on the interweb did not really reveal useful
results.)  But if this is the case, the behavior I'd expect would be
that Emacs recognizes a globally activated scroll lock (even when not
having focus) and activates Scroll Lock mode for all buffers.

But as mentioned before I'd find this behavior less useful as the
current one.  And while I am using the Scroll Lock key for toggling
Scroll Lock mode in specific buffers, I would be very careful in making
that the default.

-- 
Ralf


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: BUG in scroll-lock-mode?

2007-06-08 Thread Juri Linkov
 As far as I understand the Scroll Lock key was originally supposed to
 toggle scroll lock globally, i.e. for the desktop as a whole, just like
 Caps Lock or Num Lock.  There are even keyboards which provide an LED
 for indicating if scroll lock is active.

IIRC the Scroll Lock key was supposed to toggle scroll lock separately in
every window.  So when you turn the scroll on in one window (this activates
the LED indication), in all other windows Scroll mode is not active, and
switching to another window will deactivate the LED indication.

 I'm not sure if it is actually possible to configure an X server like
 that.  (Some research on the interweb did not really reveal useful
 results.)  But if this is the case, the behavior I'd expect would be
 that Emacs recognizes a globally activated scroll lock (even when not
 having focus) and activates Scroll Lock mode for all buffers.

I don't know how to recognize the globally activated scroll lock, but to
activate Scroll Lock mode for all buffers in Emacs requires a global
scroll-lock mode.  So we can't avoid creating it.

Is there any harm in binding the scroll lock key to the global-scroll-lock
mode?  Systems that handle the scroll lock key won't pass it to Emacs, so
there will be no conflict with them.  However, this key will be useful on
systems that pass this key to Emacs.

-- 
Juri Linkov
http://www.jurta.org/emacs/


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: BUG in scroll-lock-mode?

2007-06-07 Thread Ralf Angeli
* Leo (2007-06-07) writes:

 I put (scroll-lock-mode t) in ~/.emacs, but it is still disabled after
 restart emacs. Is this a bug in scroll-lock-mode?

Scroll Lock mode is a buffer-local minor mode, so your command will not
enable it globally.  You can enable it via a hook.  For example, if you
wanted the mode to be activated when browsing info files, you could do
this with something like (add-hook 'Info-mode-hook 'scroll-lock-mode).

-- 
Ralf


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: BUG in scroll-lock-mode?

2007-06-07 Thread Leo
Dear Ralf,

- Ralf Angeli (2007-06-07) wrote:-

 * Leo (2007-06-07) writes:

 I put (scroll-lock-mode t) in ~/.emacs, but it is still disabled after
 restart emacs. Is this a bug in scroll-lock-mode?

 Scroll Lock mode is a buffer-local minor mode, so your command will not
 enable it globally.  You can enable it via a hook.  For example, if you
 wanted the mode to be activated when browsing info files, you could do
 this with something like (add-hook 'Info-mode-hook 'scroll-lock-mode).

But looks like the doc string is not clear about this.

regards,
-- 
Leo sdl.web AT gmail.com (GPG Key: 9283AA3F)


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: BUG in scroll-lock-mode?

2007-06-07 Thread Ralf Angeli
* Leo (2007-06-07) writes:

 - Ralf Angeli (2007-06-07) wrote:-

 * Leo (2007-06-07) writes:

 I put (scroll-lock-mode t) in ~/.emacs, but it is still disabled after
 restart emacs. Is this a bug in scroll-lock-mode?

 Scroll Lock mode is a buffer-local minor mode, so your command will not
 enable it globally.  You can enable it via a hook.  For example, if you
 wanted the mode to be activated when browsing info files, you could do
 this with something like (add-hook 'Info-mode-hook 'scroll-lock-mode).

 But looks like the doc string is not clear about this.

Perhaps somebody can install the following change then.

2007-06-07  Ralf Angeli  [EMAIL PROTECTED]

* scroll-lock.el (scroll-lock-mode): Doc fix.

--- scroll-lock.el  24 Jan 2007 19:57:54 +0100  1.5
+++ scroll-lock.el  07 Jun 2007 11:57:17 +0200  
@@ -50,7 +50,7 @@
 
 ;;;###autoload
 (define-minor-mode scroll-lock-mode
-  Minor mode for pager-like scrolling.
+  Buffer-local minor mode for pager-like scrolling.
 Keys which normally move point by line or paragraph will scroll
 the buffer by the respective amount of lines instead and point
 will be kept vertically fixed relative to window boundaries


-- 
Ralf


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: BUG in scroll-lock-mode?

2007-06-07 Thread Leo
Dear Ralf,

- Ralf Angeli (2007-06-07) wrote:-

 * Leo (2007-06-07) writes:

 I put (scroll-lock-mode t) in ~/.emacs, but it is still disabled after
 restart emacs. Is this a bug in scroll-lock-mode?

 Scroll Lock mode is a buffer-local minor mode, so your command will not
 enable it globally.  You can enable it via a hook.  For example, if you
 wanted the mode to be activated when browsing info files, you could do
 this with something like (add-hook 'Info-mode-hook 'scroll-lock-mode).

Is it a good idea to make it a global minor mode?

regards,
-- 
Leo sdl.web AT gmail.com (GPG Key: 9283AA3F)


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: BUG in scroll-lock-mode?

2007-06-07 Thread Ralf Angeli
* Leo (2007-06-07) writes:

 - Ralf Angeli (2007-06-07) wrote:-

 Scroll Lock mode is a buffer-local minor mode, so your command will not
 enable it globally.  You can enable it via a hook.  For example, if you
 wanted the mode to be activated when browsing info files, you could do
 this with something like (add-hook 'Info-mode-hook 'scroll-lock-mode).

 Is it a good idea to make it a global minor mode?

Personally I would not find this useful, since I usually want to use
scroll locking only in specific buffers or a specific class of buffers,
e.g. in buffers with Info mode or View mode.  If people think a global
toggle would be useful, one could add something like
`global-scroll-lock-mode'.

-- 
Ralf


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: BUG in scroll-lock-mode?

2007-06-07 Thread Juri Linkov
 I put (scroll-lock-mode t) in ~/.emacs, but it is still disabled after
 restart emacs. Is this a bug in scroll-lock-mode?

 Scroll Lock mode is a buffer-local minor mode, so your command will not
 enable it globally.  You can enable it via a hook.  For example, if you
 wanted the mode to be activated when browsing info files, you could do
 this with something like (add-hook 'Info-mode-hook 'scroll-lock-mode).

Why scroll-lock-mode is not bound to scroll or Scroll_Lock key?
This would be much more useful than making a global mode.

-- 
Juri Linkov
http://www.jurta.org/emacs/


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: BUG in scroll-lock-mode?

2007-06-07 Thread Ralf Angeli
* Juri Linkov (2007-06-07) writes:

 I put (scroll-lock-mode t) in ~/.emacs, but it is still disabled after
 restart emacs. Is this a bug in scroll-lock-mode?

 Scroll Lock mode is a buffer-local minor mode, so your command will not
 enable it globally.  You can enable it via a hook.  For example, if you
 wanted the mode to be activated when browsing info files, you could do
 this with something like (add-hook 'Info-mode-hook 'scroll-lock-mode).

 Why scroll-lock-mode is not bound to scroll or Scroll_Lock key?
 This would be much more useful than making a global mode.

,[ http://mid.gmane.org/E1Dnaf1-0007am-Cg%40neutrino.iwi.uni-sb.de ]
| An open issue is the key binding for toggling the mode.  If the minor
| mode should be able to be activated in some major modes but not in
| others, it doesn't make much sense to bind this to the Scroll Lock key
| which in my understanding means to enable or disable it globally (not
| just for Emacs but for other applications aware of it as well).
`

Personally I have the following in my init file:

(let ((key (if (eq window-system 'w32) scroll Scroll_Lock)))
  (unless (lookup-key (current-global-map) (read-kbd-macro key))
(define-key (current-global-map) (read-kbd-macro key) 'scroll-lock-mode)))

-- 
Ralf


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: BUG in scroll-lock-mode?

2007-06-07 Thread Juri Linkov
 Why scroll-lock-mode is not bound to scroll or Scroll_Lock key?
 This would be much more useful than making a global mode.

 ,[ http://mid.gmane.org/E1Dnaf1-0007am-Cg%40neutrino.iwi.uni-sb.de ]
 | An open issue is the key binding for toggling the mode.  If the minor
 | mode should be able to be activated in some major modes but not in
 | others, it doesn't make much sense to bind this to the Scroll Lock key
 | which in my understanding means to enable or disable it globally (not
 | just for Emacs but for other applications aware of it as well).
 `

 Personally I have the following in my init file:

 (let ((key (if (eq window-system 'w32) scroll Scroll_Lock)))
   (unless (lookup-key (current-global-map) (read-kbd-macro key))
 (define-key (current-global-map) (read-kbd-macro key) 'scroll-lock-mode)))

I see that Scroll_Lock does nothing special on X so it's safe to bind it
to this key.  For other systems where scroll is application-modal we could
create a new global mode and bind scroll to it.  So activating scroll-lock
will affect only Emacs, and not other applications.

-- 
Juri Linkov
http://www.jurta.org/emacs/


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug