unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18413: Inline part displayed in the middle of its button
@ 2014-09-05 18:09 Stefan Monnier
  2014-10-31 14:26 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Monnier @ 2014-09-05 18:09 UTC (permalink / raw)
  To: 18413

Package: emacs,gnus
Version: 24.4.50


Here's what I do:
- start Gnus
- visit a message with an Elisp attachment (in my case I tested with
  a message from Tom <adatgyujto@gmail.com> on emacs-devel with subject
  "Re: History for query replace pairs" and with an attachment of type
  "application/emacs-lisp").
- place cursor in the middle of the attachment's button (using keyboard
commands).
- press E

Result: the attachment is shown inline, but right in the middle of the
button.  IOW I get "[4. applicati" (from the button's text before
point), followed by the attachment's content, followed by
"on/emacs-lisp; hist.el]".  The whole is in bold for me, because the
button is an overlay with `bold' face, so the face ends up covering the
inline attachment as well.

It seems to be the result of the hunk below.


        Stefan


revno: 117041
committer: Katsumi Yamaoka <yamaoka@jpl.org>
branch nick: trunk
timestamp: Fri 2014-05-02 09:44:34 +0000
message:
  Gnus: Make gnus-mime-inline-part and gnus-mime-inline-part work similarly
  
  * gnus-art.el (gnus-mime-inline-part): Redisplay a button so as to show
  the displaying state of a part.
  (gnus-mime-inline-part): Don't insert a newline in the beginning of
  a part like gnus-mime-inline-part doesn't; work for XEmacs.
  
  * mm-decode.el (mm-display-part): Don't insert a newline in the top.
  (mm-shr): Make undisplayer unbreakable.
  
  * mm-view.el (mm-inline-image-emacs, mm-inline-image-xemacs): Don't
  insert excessive newline.
  (mm-inline-text-html-render-with-w3m, mm-inline-text)
  (mm-insert-inline): Make undisplayer unbreakable.


--- lisp/gnus/mm-decode.el	2014-03-23 23:13:36 +0000
+++ lisp/gnus/mm-decode.el	2014-05-02 09:44:34 +0000
@@ -821,7 +821,6 @@
 	  'inline)
 	 ((and (mm-inlinable-p ehandle)
 	       (mm-inlined-p ehandle))
-	  (forward-line 1)
 	  (mm-display-inline handle)
 	  'inline)
 	 ((or method






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

* bug#18413: Inline part displayed in the middle of its button
  2014-09-05 18:09 bug#18413: Inline part displayed in the middle of its button Stefan Monnier
@ 2014-10-31 14:26 ` Stefan Monnier
  2015-02-14  4:31 ` Stefan Monnier
  2015-02-14  5:03 ` Lars Ingebrigtsen
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2014-10-31 14:26 UTC (permalink / raw)
  To: 18413

Ping?


        Stefan


>>>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Package: emacs,gnus
> Version: 24.4.50


> Here's what I do:
> - start Gnus
> - visit a message with an Elisp attachment (in my case I tested with
>   a message from Tom <adatgyujto@gmail.com> on emacs-devel with subject
>   "Re: History for query replace pairs" and with an attachment of type
>   "application/emacs-lisp").
> - place cursor in the middle of the attachment's button (using keyboard
> commands).
> - press E

> Result: the attachment is shown inline, but right in the middle of the
> button.  IOW I get "[4. applicati" (from the button's text before
> point), followed by the attachment's content, followed by
> "on/emacs-lisp; hist.el]".  The whole is in bold for me, because the
> button is an overlay with `bold' face, so the face ends up covering the
> inline attachment as well.

> It seems to be the result of the hunk below.


>         Stefan


> revno: 117041
> committer: Katsumi Yamaoka <yamaoka@jpl.org>
> branch nick: trunk
> timestamp: Fri 2014-05-02 09:44:34 +0000
> message:
>   Gnus: Make gnus-mime-inline-part and gnus-mime-inline-part work similarly
  
>   * gnus-art.el (gnus-mime-inline-part): Redisplay a button so as to show
>   the displaying state of a part.
>   (gnus-mime-inline-part): Don't insert a newline in the beginning of
>   a part like gnus-mime-inline-part doesn't; work for XEmacs.
  
>   * mm-decode.el (mm-display-part): Don't insert a newline in the top.
>   (mm-shr): Make undisplayer unbreakable.
  
>   * mm-view.el (mm-inline-image-emacs, mm-inline-image-xemacs): Don't
>   insert excessive newline.
>   (mm-inline-text-html-render-with-w3m, mm-inline-text)
>   (mm-insert-inline): Make undisplayer unbreakable.


> --- lisp/gnus/mm-decode.el	2014-03-23 23:13:36 +0000
> +++ lisp/gnus/mm-decode.el	2014-05-02 09:44:34 +0000
> @@ -821,7 +821,6 @@
>  	  'inline)
>  	 ((and (mm-inlinable-p ehandle)
>  	       (mm-inlined-p ehandle))
> -	  (forward-line 1)
>  	  (mm-display-inline handle)
>  	  'inline)
>  	 ((or method








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

* bug#18413: Inline part displayed in the middle of its button
  2014-09-05 18:09 bug#18413: Inline part displayed in the middle of its button Stefan Monnier
  2014-10-31 14:26 ` Stefan Monnier
@ 2015-02-14  4:31 ` Stefan Monnier
  2015-02-14  5:03 ` Lars Ingebrigtsen
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2015-02-14  4:31 UTC (permalink / raw)
  To: 18413

Ping?
This is still bugging me.


        Stefan





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

* bug#18413: Inline part displayed in the middle of its button
  2014-09-05 18:09 bug#18413: Inline part displayed in the middle of its button Stefan Monnier
  2014-10-31 14:26 ` Stefan Monnier
  2015-02-14  4:31 ` Stefan Monnier
@ 2015-02-14  5:03 ` Lars Ingebrigtsen
  2 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2015-02-14  5:03 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 18413

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> --- lisp/gnus/mm-decode.el	2014-03-23 23:13:36 +0000
> +++ lisp/gnus/mm-decode.el	2014-05-02 09:44:34 +0000
> @@ -821,7 +821,6 @@
>  	  'inline)
>  	 ((and (mm-inlinable-p ehandle)
>  	       (mm-inlined-p ehandle))
> -	  (forward-line 1)
>  	  (mm-display-inline handle)
>  	  'inline)
>  	 ((or method

I think the bug here is that this function is called during article
rendering as well as by the `E' command without any way of
differentiating.  I've now made `E' pass a `force' parameter to this
function, so that `E' can move point to the right place before inserting
inline.  (In git Gnus, soon to be in the Emacs trunk.)

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





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

end of thread, other threads:[~2015-02-14  5:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-05 18:09 bug#18413: Inline part displayed in the middle of its button Stefan Monnier
2014-10-31 14:26 ` Stefan Monnier
2015-02-14  4:31 ` Stefan Monnier
2015-02-14  5:03 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).