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


View this message in rfc822 format

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: ofv <at> wanadoo.es, jwiegley <at> gmail.com, 13949 <at> debbugs.gnu.org
Subject: bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified
Date: Sun, 27 Mar 2016 18:28:43 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> One could hack something together along the lines of
> compare_string_intervals and intervals_equal, I think.  That is,
> traverse the tree as they do, and compute the hash while at that.

*peruses code*

I see.  Looking at this, and looking at the sha1 reference for all of
two minutes, it looks like we could create a new C-level function called
something like hash_buffer that would look basically like

sha1_init_ctx
sha1_process_bytes(first_part_of_buffer, len)
sha1_process_bytes(last_part_of_buffer, len)
for iterate_over_all_intervals
  sha1_process_bytes(interval, len)
sha1_finish_ctx

and there you have it.  A hashing function that would not allocate
anything much, and it should be fast enough even in huge buffers for
`M-q'.  I think.

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




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

Previous Next


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