[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Couple of useful (?) patches



on Tue Jul 05 2011, David Maus <dmaus-AT-ictsoc.de> wrote:

> At Tue, 05 Apr 2011 22:20:50 -0400,
> Vitaly Mayatskikh wrote:
>>
>> Hi!
>>
>> First issue is weird MIME buttons appear in quoted reply. I see no
>> reason to keep text representation of buttons in reply, do you? To
>> work that around I propose to turn on visibility of buttons using
>> relatively recent mime-view-buttons-visible patch (was it a year ago?
>> or two?) just before reply is going to be rendered. Solution is pretty
>> dumb: the whole pre-rendered cache is ripping out now, but... It
>> works, and who cares about cache? ;)
>
> Not sure, but couldn't we use the mime button's textproperties to
> identify and kill them before insert the draft?
>
> Just cobbled together this one
>
> (defun foo ()
>   (interactive)
>   (while (not (eobp))
>     (let ((plist (text-properties-at (point)))
> 	  (next-change
> 	   (or (next-single-char-property-change (point) 'mime-button-callback) (point-max))))
>       (unless (get-text-property next-change 'mime-button-callback)
> 	(kill-region (point) next-change))
>       (goto-char next-change))))
>
> And it removes mime buttons in a copy of a message body.

As you can probably guess, I'm +1 for anything that fixes this annoyance.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com