GNU bug report logs - #13949
24.3.50; `fill-paragraph' should not always put the buffer as modified

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Wed, 13 Mar 2013 22:11:01 UTC

Severity: wishlist

Tags: fixed

Merged with 21155

Found in versions 24.3.50, 24.4.1, 25.0.50

Fixed in version 26.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #188 received at 13949 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Óscar Fuentes <ofv <at> wanadoo.es>,
 John Wiegley <jwiegley <at> gmail.com>, Jaakov <j_k_v <at> ro.ru>, 13949 <at> debbugs.gnu.org
Subject: Re: bug#13949: 24.4.1;
 `fill-paragraph' should not always put the buffer as modified
Date: Sun, 27 Mar 2016 17:35:25 +0200
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> On 03/27/2016 06:31 AM, Óscar Fuentes wrote:
>
>> +  (when (and (not (string= h ""))
>> +             (string= h (secure-hash 'md5 (current-buffer))))
>> +    (set-buffer-modified-p nil)))
>
> Hashes have collisions (and md5 is a bit famous for them). So in
> principle, I don't think using a hash is a good choice in this case.

md5 is famous for enabling attackers to construct strings with the same
hash, not for arbitrarily making strings hash to the same result.

It's less likely that the before/after `M-q' strings hash to the same
md5 than cosmic rays reprogramming your Emacs into vi, so:

> Either way, you'd have to keep the original string around, to compare
> against if the hashes match.

Not really.

(Ok, I'm exaggerating.  Slightly!)

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




This bug report was last modified 8 years and 166 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.