Satyaki Das | 2 Mar 2003 03:52
Picon

CVS: src mh-speed.el,1.39,1.40 mh-e.el,1.273,1.274 mh-customize.el,1.47,1.48 ChangeLog,1.771,1.772

Update of /cvsroot/mh-e/src
In directory sc8-pr-cvs1:/tmp/cvs-serv32656

Modified Files:
	mh-speed.el mh-e.el mh-customize.el ChangeLog 
Log Message:
* mh-speed.el (mh-speed-flists): Avoid a potential race condition. When flists
is called manually, or when an unseen message is read, mh-speed-partial-line
was not reinitialized.

* mh-e.el (mh-visit-folder): If mh-visit-folder is used to visit the folder
currently being visited (effectively doing a rescan) then
mh-previous-window-config is erroneously set. The change fixes this.

* mh-customize.el (mh-index-show-hook): Remove unused variable.

Index: mh-speed.el
===================================================================
RCS file: /cvsroot/mh-e/src/mh-speed.el,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- mh-speed.el	16 Feb 2003 07:22:27 -0000	1.39
+++ mh-speed.el	2 Mar 2003 02:52:38 -0000	1.40
 <at>  <at>  -359,11 +359,13  <at>  <at> 
   (interactive (list t))
   (when force
     (when mh-speed-flists-timer
-      (cancel-timer mh-speed-flists-timer))
-    (setq mh-speed-flists-timer nil)
(Continue reading)

Satyaki Das | 2 Mar 2003 21:13
Picon

CVS: src mh-mime.el,1.110,1.111 ChangeLog,1.772,1.773

Update of /cvsroot/mh-e/src
In directory sc8-pr-cvs1:/tmp/cvs-serv2262

Modified Files:
	mh-mime.el ChangeLog 
Log Message:
(mh-push-button): Clicking on a MIME button used to cause the window with the
show buffer to be selected. With this change the selected window doesn't
change.

Index: mh-mime.el
===================================================================
RCS file: /cvsroot/mh-e/src/mh-mime.el,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- mh-mime.el	26 Feb 2003 02:58:26 -0000	1.110
+++ mh-mime.el	2 Mar 2003 20:13:05 -0000	1.111
 <at>  <at>  -1105,20 +1105,24  <at>  <at> 
 displayed. This function is called when the mouse is used to click the MIME
 button."
   (interactive "e")
-  (set-buffer (window-buffer (posn-window (event-start event))))
-  (select-window (posn-window (event-start event)))
-  (let* ((pos (posn-point (event-start event)))
-         (folder mh-show-folder-buffer)
-         (mm-inline-media-tests mh-mm-inline-media-tests)
-         (data (get-text-property pos 'mh-data))
-         (function (get-text-property pos 'mh-callback))
-         (buffer-read-only nil))
(Continue reading)

Jeffrey C Honig | 2 Mar 2003 23:07
Face

Re: CVS: src mh-mime.el,1.110,1.111 ChangeLog,1.772,1.773

Satyaki Das <satyaki <at> users.sourceforge.net> wrote:

> (mh-push-button): Clicking on a MIME button used to cause the window with the
> show buffer to be selected. With this change the selected window doesn't
> change.

Cool!

Can you do the same for a URL?

Thanks.

Jeff

Satyaki Das | 3 Mar 2003 00:54
Face
Picon
Favicon

Re: CVS: src mh-mime.el,1.110,1.111 ChangeLog,1.772,1.773

Jeffrey C Honig <jch <at> honig.net> writes:

> Satyaki Das <satyaki <at> users.sourceforge.net> wrote:
> 
> > (mh-push-button): Clicking on a MIME button used to cause the window with the
> > show buffer to be selected. With this change the selected window doesn't
> > change.
> 
> Cool!
> 
> Can you do the same for a URL?

Not from MH-E since we use goto-addr. However you could advice
the appropriate goto-addr function. The following might work but
I haven't tested it very much:

(defadvice goto-address-at-mouse (around sa2-restore-window activate)
  "Restore orignial selected window."
  (let ((old-window (selected-window)))
    (unwind-protect ad-do-it
      (select-window old-window))))

Satyaki

Jeffrey C Honig | 3 Mar 2003 20:29
Face

Re: CVS: src mh-mime.el,1.110,1.111 ChangeLog,1.772,1.773

Satyaki Das <satyakid <at> stanford.edu> wrote:

> Not from MH-E since we use goto-addr. However you could advice
> the appropriate goto-addr function. The following might work but
> I haven't tested it very much:

Thanks!

That seems to work.  It looks like total black magic.  What is
defadvice?

Thanks.

Jeff

Satyaki Das | 3 Mar 2003 21:46
Face
Picon
Favicon

Re: CVS: src mh-mime.el,1.110,1.111 ChangeLog,1.772,1.773

Jeffrey C Honig <jch <at> honig.net> writes:

> That seems to work.  It looks like total black magic.  What is
> defadvice?

It is a mechanism of adding extra code to an already existing
function. In the example I gave it is an "around" advice meaning
that we want to do something before executing the function, then
execute the function and do something more at the end. More info
can be found in the elisp manual.

Satyaki

Satyaki Das | 4 Mar 2003 09:11
Face
Picon
Favicon

Coming soon: X-Image-URL header field display

I found out about the X-Image-URL header tonight. It seems to be
quite popular with people who use Macs. The basic idea is that
there is a header field something like:

  X-Image-URL: http://chicory.stanford.edu/satyaki/satyaki3.jpg

is added. Then Mail.app, the builtin mail client on MacOS, fetches
and displays the image much like we display X-Face images. So I
wrote some code to implement this in MH-E. It does clever stuff
like caching the URL and running the wget in the background, so
that a slow or broken internet connection doesn't block MH-E. It
also scales the image, since some folks put up large images.

Then just as I was about to check it in, I realized that this
feature has some bad side effects. This is susceptible to web
bugs, that is I could put a unique image in each email that I send
out and find out by checking the server logs if my receivers have
viewed the mail. So I will add a option which will ask for user
confirmation before fetching the image. I will do that tomorrow
and check it in.

Satyaki

Mark D. Baushke | 4 Mar 2003 09:20
X-Face
Picon

Re: Coming soon: X-Image-URL header field display

Satyaki Das <satyakid <at> stanford.edu> writes:

> I found out about the X-Image-URL header tonight. It seems to be
> quite popular with people who use Macs. The basic idea is that
> there is a header field something like:
> 
>   X-Image-URL: http://chicory.stanford.edu/satyaki/satyaki3.jpg
> 
> is added. Then Mail.app, the builtin mail client on MacOS, fetches
> and displays the image much like we display X-Face images. So I
> wrote some code to implement this in MH-E. It does clever stuff
> like caching the URL and running the wget in the background, so
> that a slow or broken internet connection doesn't block MH-E. It
> also scales the image, since some folks put up large images.
> 
> Then just as I was about to check it in, I realized that this
> feature has some bad side effects. This is susceptible to web
> bugs, that is I could put a unique image in each email that I send
> out and find out by checking the server logs if my receivers have
> viewed the mail. So I will add a option which will ask for user
> confirmation before fetching the image. I will do that tomorrow
> and check it in.
> 
> Satyaki

The other big problem is that arbitrarily passing a URL to a command
line may open other security holes.

It is probably also a bad idea to assume that everyone has wget
installed. There may be other URL helpers like 'fetch', 'w3m',
(Continue reading)

Satyaki Das | 4 Mar 2003 10:02
Face
Picon
Favicon

Re: Coming soon: X-Image-URL header field display

Mark D. Baushke <mdb <at> gnu.org> writes:

> The other big problem is that arbitrarily passing a URL to a command
> line may open other security holes.

I didn't think that this would be a problem. All I do is:
  wget -O temp1 external-url
  convert -resize 96x48 temp1 temp2

The only thing I get from outside is external-url and we pass it
as a command line argument (and don't try to split it or parse
it in any way). Is this a problem?

> It is probably also a bad idea to assume that everyone has wget
> installed. There may be other URL helpers like 'fetch', 'w3m',
> 'lynx', 'links', that might work if wget is not available.

May be some other time. MH-E wouldn't die if wget isn't present,
just no image would be shown.

> It is good that you are putting in a switch to disable this feature. I
> suspect that I am too paranoid to ever let it be enabled on my system.

I feel it is more dangerous to use netscape to visit a website.

Satyaki

Lyndon Nerenberg | 4 Mar 2003 17:40
Picon
Picon

Re: Coming soon: X-Image-URL header field display

>Then just as I was about to check it in, I realized that this
>feature has some bad side effects. This is susceptible to web
>bugs, that is I could put a unique image in each email that I send
>out and find out by checking the server logs if my receivers have
>viewed the mail.

There must be a switch to completely disable processing of this header,
and it must default to off. Otherwise you're enabling a potential gross
invasion of peoples privacy.

Also, please ensure that hosts without a network connection (e.g.
laptops running standalone) don't get bombarded with diagnostics when
the URL fetch fails. For that matter, this thing should fail silently in
all cases.

--lyndon


Gmane