GNU bug report logs -
#5351
Rectangles of type `beer bellied'
Previous Next
Reported by: MON KEY <monkey <at> sandpframing.com>
Date: Mon, 11 Jan 2010 03:23:02 UTC
Severity: normal
Tags: wontfix
Merged with 1184
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5351 in the body.
You can then email your comments to 5351 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5351
; Package
emacs
.
(Mon, 11 Jan 2010 03:23:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
MON KEY <monkey <at> sandpframing.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 11 Jan 2010 03:23:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This bug report is apropos Emacs bug - #1184
of Thu, 16 Oct 2008 19:45:02 UTC
"document how to deal with beer belly rectangles"
Bug #1184 is Tagged: wontfix
As that bug report log contains one legit message and 44 bogus messages rather
than add to the fray I am starting a new bug report.
FWIW the following function handles the problem.
;;; ==============================
;;; :BUG #1184 of Thu, 16 Oct 2008 19:45:02 UTC
;;; "document how to deal with beer belly rectangles"
;;; :SEE (URL `http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1184')
;;; :CREATED <Timestamp: #{2010-01-10T21:26:28-05:00Z}#{10017} - by MON>
(defun kill-rectangle-w-beer-belly (belly-start belly-end)
"Like kill-rectangle but adds trailing whitespace when column at mark is less
than the longest line in rectangle."
(interactive "r\n")
(let ((max-len 0)
(fatter-belly))
(unwind-protect
(narrow-to-region belly-start belly-end)
(goto-char (point-min))
(while (eq (forward-line) 0)
(end-of-line)
(when (> (current-column) max-len)
(setq max-len (current-column))))
(when (= (current-column) max-len)
(setq fatter-belly t)
(kill-rectangle belly-start belly-end))
(unless fatter-belly
(setq fatter-belly (buffer-substring-no-properties belly-start
belly-end))
(goto-char belly-start)
(kill-line)
(while (eq (forward-line) 0) (kill-line))
(when (stringp fatter-belly)
(with-temp-buffer
(insert fatter-belly)
(goto-char (point-min))
(while (eq (forward-line) 0)
(let ((lebp `(,(line-beginning-position) . ,(line-end-position))))
(unless (= (- (car lebp) (cdr lebp)) max-len)
(end-of-line)
(insert (make-string (- max-len (- (cdr lebp) (car
lebp))) 32)))))
(kill-rectangle (buffer-end 0) (buffer-end 1)))))
(widen))))
/s_P\
Forcibly Merged 1184 5351.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 13 Jan 2010 17:40:03 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
1184 <at> debbugs.gnu.org and jidanni <at> jidanni.org
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 10 Jul 2011 12:51:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 08 Aug 2011 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 5 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.