Gnus development mailing list
 help / color / mirror / Atom feed
* Has `mm-inline-image-xemacs' changed recently?
@ 2001-05-25  4:53 Lloyd Zusman
  2001-05-25 11:28 ` Proposed patch to mm-view.el (was: Has `mm-inline-image-xemacs' changed recently?) Lloyd Zusman
  0 siblings, 1 reply; 7+ messages in thread
From: Lloyd Zusman @ 2001-05-25  4:53 UTC (permalink / raw)


I'm using the latest (as of May 25) CVS version of Gnus under
XEmacs-21.4.3.

Has the function `mm-inline-image-xemacs' in `mm-view.el' changed
within the past few days, or maybe the past week?  I don't have any
earlier version of Gnus handy to check this myself, and I'm pretty
rusty with CVS.

I think that the problem that I was reporting about inline images
always appearing at the end of of the article buffer is due to the way
that this function is written.  If this `mm-inline-image-emacs' was
indeed changed recently, I'd like to see if the older version of this
function might have been doing something different that would have
allowed proper image placement.

Thanks in advance.

-- 
 Lloyd Zusman
 ljz@asfast.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Proposed patch to mm-view.el (was: Has `mm-inline-image-xemacs' changed recently?)
  2001-05-25  4:53 Has `mm-inline-image-xemacs' changed recently? Lloyd Zusman
@ 2001-05-25 11:28 ` Lloyd Zusman
  2001-05-29 21:53   ` Kai Großjohann
  0 siblings, 1 reply; 7+ messages in thread
From: Lloyd Zusman @ 2001-05-25 11:28 UTC (permalink / raw)


Enclosed is a proposed patch to the `mm-inline-image-xemacs' function
in `mm-view.el'.  I'd like to know what you folks think of this
patch.

The reason for this patch is as follows:

If the point is at the end of the buffer at the moment that an inline
image is being inserted, the `(insert "\n")' in the
`mm-inline-image-xemacs' function cannot put the newline after the
glyph that is added by `make-annotation', and the newline ends up
being inserted before the glyph.

The reason for this is that `make-annotation' causes the glyph to not
take up any space within the logical buffer (in the XEmacs 21.4.3
documentation, see Info->Lispref->Annotation Basics).  Therefore,
there will be no way to insert any characters following the glyph if
it's been placed at the end of the buffer.

My change to `mm-inline-image-xemacs' inserts the "\n" and then moves
the point to the left of it, *before* `make-annotation' is called.
This ensures that the newline will always be positioned following the
glyph.  This, in turn, ensures that message parts that are to be
inserted after the inline image will actually be able to appear after
the glyph.

Here's my patch.  Comments?

Thank you very much.


*** mm-view.el.orig	Fri May 25 07:08:43 2001
--- mm-view.el	Fri May 25 07:09:37 2001
***************
*** 49,58 ****
       `(lambda () (remove-images ,b (1+ ,b))))))
  
  (defun mm-inline-image-xemacs (handle)
    (let ((b (point))
  	(annot (make-annotation (mm-get-image handle) nil 'text))
  	buffer-read-only)
-     (insert "\n")
      (mm-handle-set-undisplayer
       handle
       `(lambda ()
--- 49,59 ----
       `(lambda () (remove-images ,b (1+ ,b))))))
  
  (defun mm-inline-image-xemacs (handle)
+   (insert "\n")
+   (forward-char -1)
    (let ((b (point))
  	(annot (make-annotation (mm-get-image handle) nil 'text))
  	buffer-read-only)
      (mm-handle-set-undisplayer
       handle
       `(lambda ()


-- 
 Lloyd Zusman
 ljz@asfast.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Proposed patch to mm-view.el (was: Has `mm-inline-image-xemacs' changed recently?)
  2001-05-25 11:28 ` Proposed patch to mm-view.el (was: Has `mm-inline-image-xemacs' changed recently?) Lloyd Zusman
@ 2001-05-29 21:53   ` Kai Großjohann
  2001-05-29 23:43     ` Daniel Pittman
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2001-05-29 21:53 UTC (permalink / raw)


I wish some XEmacs user would look at it; I don't use XEmacs, so I
can't test it.
kai
-- 
~/.signature: No such file or directory


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Proposed patch to mm-view.el (was: Has `mm-inline-image-xemacs' changed recently?)
  2001-05-29 21:53   ` Kai Großjohann
@ 2001-05-29 23:43     ` Daniel Pittman
  2001-05-30  0:20       ` Lloyd Zusman
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Pittman @ 2001-05-29 23:43 UTC (permalink / raw)


On 29 May 2001, Kai Großjohann wrote:
> I wish some XEmacs user would look at it; I don't use XEmacs, so I
> can't test it.

The patch looks fine to me, with "21.5  (beta1) \"anise\" XEmacs Lucid"
        Daniel



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Proposed patch to mm-view.el (was: Has `mm-inline-image-xemacs' changed recently?)
  2001-05-29 23:43     ` Daniel Pittman
@ 2001-05-30  0:20       ` Lloyd Zusman
  2001-05-30  9:24         ` Kai Großjohann
  0 siblings, 1 reply; 7+ messages in thread
From: Lloyd Zusman @ 2001-05-30  0:20 UTC (permalink / raw)


Daniel Pittman <daniel@rimspace.net> writes:

> On 29 May 2001, Kai Großjohann wrote:
> > I wish some XEmacs user would look at it; I don't use XEmacs, so I
> > can't test it.

I already tested under XEmacs when I wrote it ... :)


> The patch looks fine to me, with "21.5  (beta1) \"anise\" XEmacs Lucid"
>         Daniel

Thank you very much.

-- 
 Lloyd Zusman
 ljz@asfast.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Proposed patch to mm-view.el (was: Has `mm-inline-image-xemacs' changed recently?)
  2001-05-30  0:20       ` Lloyd Zusman
@ 2001-05-30  9:24         ` Kai Großjohann
  2001-05-30 10:58           ` Lloyd Zusman
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2001-05-30  9:24 UTC (permalink / raw)
  Cc: ding

On 29 May 2001, Lloyd Zusman wrote:

> I already tested under XEmacs when I wrote it ... :)

Please don't feel offended; four eyes see more than two, an old German
saying goes.  I have now applied the patch.

kai
-- 
~/.signature: No such file or directory


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Proposed patch to mm-view.el (was: Has `mm-inline-image-xemacs' changed recently?)
  2001-05-30  9:24         ` Kai Großjohann
@ 2001-05-30 10:58           ` Lloyd Zusman
  0 siblings, 0 replies; 7+ messages in thread
From: Lloyd Zusman @ 2001-05-30 10:58 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> On 29 May 2001, Lloyd Zusman wrote:
> 
> > I already tested under XEmacs when I wrote it ... :)
> 
> Please don't feel offended; four eyes see more than two, an old German
> saying goes.  I have now applied the patch.

I was just joking.  I'm not offended, and I'm glad that more eyes
looked at it.

And thanks for applying the patch!


> kai
> -- 
> ~/.signature: No such file or directory

-- 
 Lloyd Zusman
 ljz@asfast.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-05-30 10:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-25  4:53 Has `mm-inline-image-xemacs' changed recently? Lloyd Zusman
2001-05-25 11:28 ` Proposed patch to mm-view.el (was: Has `mm-inline-image-xemacs' changed recently?) Lloyd Zusman
2001-05-29 21:53   ` Kai Großjohann
2001-05-29 23:43     ` Daniel Pittman
2001-05-30  0:20       ` Lloyd Zusman
2001-05-30  9:24         ` Kai Großjohann
2001-05-30 10:58           ` Lloyd Zusman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).