Gnus -- remove inline HTML images

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Gnus -- remove inline HTML images

Phillip Lord-3


I would like to be able to delete inline HTML images in Gnus. People
keep on sending me pointless images, and it's breaking my long habit of
"inbox infinite". With mime attachments, I just ditch the big ones, but
I cannot do this with inline images in HTML.

I guess that most of these images are "cid", although I don't know
enough about email to know if there are other methods widely used.

Is there any mechanism in Gnus for achieving this?

Phil

Reply | Threaded
Open this post in threaded view
|

Re: Gnus -- remove inline HTML images

Lars Magne Ingebrigtsen-4
Phillip Lord <[hidden email]> writes:

> I would like to be able to delete inline HTML images in Gnus. People
> keep on sending me pointless images, and it's breaking my long habit of
> "inbox infinite". With mime attachments, I just ditch the big ones, but
> I cannot do this with inline images in HTML.
>
> I guess that most of these images are "cid", although I don't know
> enough about email to know if there are other methods widely used.
>
> Is there any mechanism in Gnus for achieving this?

If you hit `e', you can edit the message.  The embedded images will
appear as mml tags, like

  <\#part type=image/png name="mailphoto.png" id="<mailphoto.png>" buffer=" *mml*-862362">
  <\#/part>

and you can just delete those.

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

Reply | Threaded
Open this post in threaded view
|

Re: Gnus -- remove inline HTML images

Pankaj Jangid-2
Lars Magne Ingebrigtsen <[hidden email]> writes:

> Phillip Lord <[hidden email]> writes:
>> I would like to be able to delete inline HTML images in Gnus. People
>> keep on sending me pointless images, and it's breaking my long habit of
>> "inbox infinite". With mime attachments, I just ditch the big ones, but
>> I cannot do this with inline images in HTML.
>> I guess that most of these images are "cid", although I don't know
>> enough about email to know if there are other methods widely used.
>> Is there any mechanism in Gnus for achieving this?
> If you hit `e', you can edit the message.  The embedded images will
> appear as mml tags, like
>   <\#part type=image/png name="mailphoto.png" id="<mailphoto.png>" buffer=" *mml*-862362">
>   <\#/part>
> and you can just delete those.
This is great information. One more query, just to complete this thread
- how to come back to read-only mode after editing?

--
Pankaj Jangid


Reply | Threaded
Open this post in threaded view
|

Re: Gnus -- remove inline HTML images

Robert Pluim
>>>>> On Tue, 12 Nov 2019 12:53:08 +0530, Pankaj Jangid <[hidden email]> said:

    Pankaj> Lars Magne Ingebrigtsen <[hidden email]> writes:
    >> Phillip Lord <[hidden email]> writes:
    >>> I would like to be able to delete inline HTML images in Gnus. People
    >>> keep on sending me pointless images, and it's breaking my long habit of
    >>> "inbox infinite". With mime attachments, I just ditch the big ones, but
    >>> I cannot do this with inline images in HTML.
    >>> I guess that most of these images are "cid", although I don't know
    >>> enough about email to know if there are other methods widely used.
    >>> Is there any mechanism in Gnus for achieving this?
    >> If you hit `e', you can edit the message.  The embedded images will
    >> appear as mml tags, like
    >> <\#part type=image/png name="mailphoto.png" id="<mailphoto.png>" buffer=" *mml*-862362">
    >> <\#/part>
    >> and you can just delete those.
    Pankaj> This is great information. One more query, just to complete this thread
    Pankaj> - how to come back to read-only mode after editing?

"C-c C-c", which is shown in the echo area when you start editing the
message. And probably "C-c C-k" to abort the edits, but I haven't
checked. "C-h m" when youʼre editing should tell you.

Robert

Reply | Threaded
Open this post in threaded view
|

Re: Gnus -- remove inline HTML images

Pankaj Jangid-2
Robert Pluim <[hidden email]> writes:

>>>>>> On Tue, 12 Nov 2019 12:53:08 +0530, Pankaj Jangid <[hidden email]> said:
>
>     Pankaj> Lars Magne Ingebrigtsen <[hidden email]> writes:
>     >> Phillip Lord <[hidden email]> writes:
>     >>> I would like to be able to delete inline HTML images in Gnus. People
>     >>> keep on sending me pointless images, and it's breaking my long habit of
>     >>> "inbox infinite". With mime attachments, I just ditch the big ones, but
>     >>> I cannot do this with inline images in HTML.
>     >>> I guess that most of these images are "cid", although I don't know
>     >>> enough about email to know if there are other methods widely used.
>     >>> Is there any mechanism in Gnus for achieving this?
>     >> If you hit `e', you can edit the message.  The embedded images will
>     >> appear as mml tags, like
>     >> <\#part type=image/png name="mailphoto.png" id="<mailphoto.png>" buffer=" *mml*-862362">
>     >> <\#/part>
>     >> and you can just delete those.
>     Pankaj> This is great information. One more query, just to complete this thread
>     Pankaj> - how to come back to read-only mode after editing?
>
> "C-c C-c", which is shown in the echo area when you start editing the
> message. And probably "C-c C-k" to abort the edits, but I haven't
> checked. "C-h m" when youʼre editing should tell you.

Thanks. C-c C-c is shown in the echo area. Actually, I looked up
quickhelp C-h m without entering into Article-Edit mode. That is why I
missed it there.

--
Pankaj Jangid


Reply | Threaded
Open this post in threaded view
|

Re: Gnus -- remove inline HTML images

Phillip Lord-3
In reply to this post by Lars Magne Ingebrigtsen-4
Lars Magne Ingebrigtsen <[hidden email]> writes:

> Phillip Lord <[hidden email]> writes:
>
>> I would like to be able to delete inline HTML images in Gnus. People
>> keep on sending me pointless images, and it's breaking my long habit of
>> "inbox infinite". With mime attachments, I just ditch the big ones, but
>> I cannot do this with inline images in HTML.
>>
>> I guess that most of these images are "cid", although I don't know
>> enough about email to know if there are other methods widely used.
>>
>> Is there any mechanism in Gnus for achieving this?
>
> If you hit `e', you can edit the message.  The embedded images will
> appear as mml tags, like
>
>   <\#part type=image/png name="mailphoto.png" id="<mailphoto.png>" buffer=" *mml*-862362">
>   <\#/part>
>
> and you can just delete those.

Okay, that's a way to do it, albeit rather clunky.

I guess you would have no objection to adding a new washing method or
something equivalent that would remove all of these?

Phil

Reply | Threaded
Open this post in threaded view
|

Re: Gnus -- remove inline HTML images

Robert Pluim
>>>>> On Mon, 18 Nov 2019 15:34:49 +0000, Phillip Lord <[hidden email]> said:

    Phillip> Lars Magne Ingebrigtsen <[hidden email]> writes:
    >> Phillip Lord <[hidden email]> writes:
    >>
    >>> I would like to be able to delete inline HTML images in Gnus. People
    >>> keep on sending me pointless images, and it's breaking my long habit of
    >>> "inbox infinite". With mime attachments, I just ditch the big ones, but
    >>> I cannot do this with inline images in HTML.
    >>>
    >>> I guess that most of these images are "cid", although I don't know
    >>> enough about email to know if there are other methods widely used.
    >>>
    >>> Is there any mechanism in Gnus for achieving this?
    >>
    >> If you hit `e', you can edit the message.  The embedded images will
    >> appear as mml tags, like
    >>
    >> <\#part type=image/png name="mailphoto.png" id="<mailphoto.png>" buffer=" *mml*-862362">
    >> <\#/part>
    >>
    >> and you can just delete those.

    Phillip> Okay, that's a way to do it, albeit rather clunky.

    Phillip> I guess you would have no objection to adding a new washing method or
    Phillip> something equivalent that would remove all of these?

You can probably use gnus-article-remove-images (bound to W-D-D) for
inspiration.

Robert

Reply | Threaded
Open this post in threaded view
|

Re: Gnus -- remove inline HTML images

Lars Magne Ingebrigtsen-4
In reply to this post by Phillip Lord-3
Phillip Lord <[hidden email]> writes:

> Okay, that's a way to do it, albeit rather clunky.

It'd be easy enough to write a command on top of `e' that just does `e',
search/replace, `C-c C-c'.

> I guess you would have no objection to adding a new washing method or
> something equivalent that would remove all of these?

Washing methods are for display only -- they don't alter the mails
themselves, which I thought was the point here.

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

Reply | Threaded
Open this post in threaded view
|

Re: Gnus -- remove inline HTML images

Robert Pluim
>>>>> On Tue, 19 Nov 2019 10:17:59 +0100, Lars Magne Ingebrigtsen <[hidden email]> said:

    Lars> Phillip Lord <[hidden email]> writes:
    >> Okay, that's a way to do it, albeit rather clunky.

    Lars> It'd be easy enough to write a command on top of `e' that just does `e',
    Lars> search/replace, `C-c C-c'.

    >> I guess you would have no objection to adding a new washing method or
    >> something equivalent that would remove all of these?

    Lars> Washing methods are for display only -- they don't alter the mails
    Lars> themselves, which I thought was the point here.

How about a 'wash-edit-mode', where all subsequent wash commands
actually change the article until you exit 'wash-edit-mode' ?

Robert