🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #88054

incomplete update of display after running function

#88054
From: Vivek Khera
Date: Sat, 06 Aug 1994 00:49
46 lines
2144 bytes
In GNU Emacs 19.25.1 of Thu Jun  2 1994 on norval.clark.net (i386-gateway-bsd386)


Given the following function defined in the file pr.el:

--cut here--
;;; Prefix region (for mail, in particular) -- robust.
;;; Christoph. North-Keys, 1989
;;; Thanks to John Robinson <jr@bbn.com> for rewriting for markers.
;;;
(defvar prefix-string-default "> "
  "*Default string for prefix-region function.")

(defun prefix-region (start end string)
  "Insert STRING, default prefix-string-default, at the start of each line
in or intersecting region while preserving indentation.
Called from a program, takes three arguments,START, END and STRING."
  (interactive "r\nsString:  ")
  (if (equal 0 (length string)) (setq string prefix-string-default))
  (let ((end-marker (make-marker)))
    (set-marker end-marker end)
	(goto-char start)
	(beginning-of-line)
	(insert-before-markers string)
	(while (search-forward "\n" (marker-position end-marker) 1)
	  (insert-before-markers string)
	  )))
--cut here--


and the following text file, called xxx

--cut here--
% aaa
% bbb
% ccc
--cut here--

running "emacs -q -l pr.el xxx" then typing the following sequence of
commands:

 C-@ C-n C-n M-x prefix-region RET %% RET

results in the proper prefix being applied to all three lines, except
the first line's display is not updated until the cursor is moved up
to the point position zero (M-<).
Technical Details
Message-ID: <199408052103.RAA01332@norval.clark.net>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!norval.clark.net!khera

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,647ac3f08ab258d0,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1994-08-06 18:41:30 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!norval.clark.net!khera
From: khera@norval.clark.net (Vivek Khera)
Newsgroups: gnu.emacs.bug
Subject: incomplete update of display after running function
Date: 5 Aug 1994 20:49:24 -0400
Organization: GNUs Not Usenet
Lines: 47
Sender: daemon@cis.ohio-state.edu
Approved: bug-gnu-emacs@prep.ai.mit.edu
Distribution: gnu
Message-ID: <199408052103.RAA01332@norval.clark.net>