From: Mike Cox
Subject: Re: Supporting tilt-wheels at the OS level.
Date: 
Message-ID: <2qsetgF13gbi8U1@uni-berlin.de>
"M�ns Rullg�rd" <···@mru.ath.cx> wrote in message
·····················@mru.ath.cx...
> Jeff Relf <·········@JeffRelf.Cotse.NET> writes:
>
> > Last2Know wrote:
> >
> >> In order for that to work in a similar way on Linux with X11 apps,
> >> you need at least the following steps:
> >
> >> 1. A driver that separately reports the stream of horizontal tilt
> >> events from the mouse to the kernel.
> >
> >> 2. Data structures in the kernel that allow separate bookkeeping of
> >> two streams of scroll events for a mouse ( there is only allowance
> >> for one at present ).
> >
> > At the kernel level, or in the kernel itself ?
> >
> > I assume that the Intellimouse drivers on Win XP are simulating clicks
> > on any horizontal scroll bar that an app might already have...
> >
> > That must be done at the kernel level.
>
> The kernel does not and shall not have any knowledge whatsoever of
> scroll bars.  Hence this cannot be done by the kernel.
>
> > Further functionality would require modifications to each app.
>
> For applications using a widget kit, such as GTK+, QT, etc., it is
> sufficient to add handling of the extra mouse events to those
> libraries.
>
> To save my eyes and my sanity, due to the quoting and indentation
> style, when reading your posts, I have made this little function to be
> used with Gnus:
>
> (defun gnus-deuglify-jeff-relf ()
>   "Make posts by Jeff Relf readable by humans."
>   (interactive)
>   (save-excursion
>     (let ((inhibit-read-only t) (op "You") of)
>       (gnus-with-article-buffer
> (article-goto-body)
> (and (re-search-forward "^Hi \\(.*\\),\n" nil t)
>      (setq op (match-string 1))
>      (replace-match ""))
> (and (re-search-forward "^Re: .*\n" nil t)
>      (replace-match ""))
> (setq of (- (length op) 5))
> (while (re-search-forward
> "^\\(You wrote:\\) <<\n\\([^\0]*?\\)>>" nil t)
>   (replace-match (concat op " wrote:\n\\2\n"))
>   (save-restriction
>     (narrow-to-region (+ (match-beginning 2) of)
>       (+ (match-end 2) of))
>     (goto-char 0)
>     (while (re-search-forward "^  " nil t)
>       (replace-match "> "))
>     (goto-char (point-max))))
> (article-goto-body)
> (while (re-search-forward "^  " nil t)
>   (replace-match ""))
> (gnus-article-fill-cited-article)
> (gnus-article-highlight t)
> (gnus-treat-article nil)
> (gnus-run-hooks 'gnus-article-prepare-hook
> 'gnus-outlook-display-hook)))))

My goodness that is some ugly code.  I thought LISP was able to solve most
problems in a few lines.  Jeff Relf's posts required pages of LISP code to
fix his posting style.  I wonder if any LISPers can do better and write that
does this in less lines of code.

From: Måns Rullgård
Subject: Re: Supporting tilt-wheels at the OS level.
Date: 
Message-ID: <yw1xoek61u5q.fsf@mru.ath.cx>
"Mike Cox" <············@yahoo.com> writes:


[Lisp code]

> My goodness that is some ugly code.  I thought LISP was able to solve most
> problems in a few lines.  Jeff Relf's posts required pages of LISP code to
> fix his posting style.  I wonder if any LISPers can do better and write that
> does this in less lines of code.

I'll admit that I am no serious Lisp hacker.  A real one can probably
do a better job of it.

-- 
M�ns Rullg�rd
···@mru.ath.cx
From: David Steuber
Subject: Re: Supporting tilt-wheels at the OS level.
Date: 
Message-ID: <87r7p2nsek.fsf@david-steuber.com>
Måns Rullgård <···@mru.ath.cx> writes:

> "Mike Cox" <············@yahoo.com> writes:
> 
> [Lisp code]
> 
> > My goodness that is some ugly code.  I thought LISP was able to
> > solve most problems in a few lines.  Jeff Relf's posts required
> > pages of LISP code to fix his posting style.  I wonder if any
> > LISPers can do better and write that does this in less lines of
> > code.
> 
> I'll admit that I am no serious Lisp hacker.  A real one can
> probably do a better job of it.

A more appropriate question would be, can you write a function for
some other newsreader that gets loaded at runtime to reformat
someone's post so that it is readable?  Will that function be fewer
lines of code and take less time to think about?

The code posted is also Emacs Lisp for GNUS.  So why post it to c.l.l
when gnu.emacs.gnus would be more appropriate?

-- 
An ideal world is left as an excercise to the reader.
   --- Paul Graham, On Lisp 8.1