GNU bug report logs - #52175
27.2; stale marker left by `fill-region-as-paragraph'

Previous Next

Package: emacs;

Reported by: Ikumi Keita <ikumi <at> ikumi.que.jp>

Date: Mon, 29 Nov 2021 10:51:02 UTC

Severity: normal

Found in version 27.2

Fixed in version 29.1

Done: Lars 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 52175 in the body.
You can then email your comments to 52175 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#52175; Package emacs. (Mon, 29 Nov 2021 10:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ikumi Keita <ikumi <at> ikumi.que.jp>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 29 Nov 2021 10:51:02 GMT) Full text and rfc822 format available.

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

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.2; stale marker left by `fill-region-as-paragraph'
Date: Mon, 29 Nov 2021 19:49:53 +0900
[Message part 1 (text/plain, inline)]
The function `fill-region-as-paragraph' leaves a temporal marker which
isn't cleared in the buffer.

Here is the structure of `fill-region-as-paragraph':
----------------------------------------------------------------------
(defun fill-region-as-paragraph (from to &optional justify
				      nosqueeze squeeze-after)
[...]
    (setq to (copy-marker (point) t))
[...]
  (if (not (> to (point)))
      nil ;; There is no paragraph, only whitespace: exit now.
[...]
      (goto-char to)
      (unless (eobp) (forward-char 1))
      ;; Return the fill-prefix we used
      fill-prefix)))
----------------------------------------------------------------------
With this code, temporal marker bound to local variable `to' is left in
the buffer. According to elisp reference `(elisp) Overview of Markers',
it is recommended to clear such stale marker with suitable `(set-marker
MARKER nil)':
,----
|    Insertion and deletion in a buffer must check all the markers and
| relocate them if necessary.  This slows processing in a buffer with a
| large number of markers.  For this reason, it is a good idea to make a
| marker point nowhere if you are sure you don’t need it any more.
`----
I'd propose to apply the attached patch to accomplish that.

Regards,
Ikumi Keita

[patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]


In GNU Emacs 27.2 (build 1, x86_64-unknown-freebsd13.0, GTK+ Version 3.24.27, cairo version 1.16.0)
 of 2021-04-15 built on freebsd.vmware
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: 13.0-RELEASE-p5

Recent messages:
No current message
Scanning +outbox...done
No more undeleted messages
Processing deletes and refiles for +outbox...done
Making completion list...
C-x v ~ runs the command vc-revision-other-window
Type C-x 1 to delete the help window, C-M-v to scroll help.
Mark saved where search started
Mark set
Making completion list...

Configured using:
 'configure --with-canna --with-canna-includes=/usr/local/canna/include
--with-canna-libraries=/usr/local/canna/lib --without-xim
--disable-largefile --without-modules --with-sound=yes
--with-file-notification=yes --with-cairo=yes CFLAGS=-O3'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY KQUEUE
ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
XDBE XIM THREADS JSON PDUMPER LCMS2 GMP

Important settings:
  value of $EMACSLOADPATH: /home/keita/elisp:
  value of $LANG: ja_JP.eucJP
  locale-coding-system: japanese-iso-8bit-unix

Major mode: Info

Minor modes in effect:
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
~/elisp/reftex-parse hides /usr/local/share/emacs/27.2/lisp/textmodes/reftex-parse
/home/keita/.emacs.d/elpa/soap-client-3.2.0/soap-client hides /usr/local/share/emacs/27.2/lisp/net/soap-client
/home/keita/.emacs.d/elpa/soap-client-3.2.0/soap-inspect hides /usr/local/share/emacs/27.2/lisp/net/soap-inspect

Features:
(shadow emacsbug mule-util jka-compr misearch multi-isearch log-view vc
vc-dispatcher vc-hg bug-reference magit-gitignore face-remap
magit-submodule magit-obsolete magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs magit-status
magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode
diff git-commit rx log-edit pcvs-util add-log magit-core
magit-autorevert autorevert filenotify magit-margin magit-transient
magit-process with-editor shell pcomplete comint ring server ansi-color
magit-mode transient magit-git magit-section magit-utils dash mh-thread
boxquote rect supercite regi mh-identity mh-letter mh-comp sendmail
vc-git diff-mode easy-mmode conf-mode flow-fill cl-extra help-mode
shr-color color mh-search mh-alias multi-prompt crm smiley qp mm-archive
mail-extr mh-mime mh-gnus mh-show goto-addr thingatpt gnus-cite gnus-art
mm-uu mml2015 mm-view mml-smime smime dig gnus-sum url url-proxy
url-privacy url-expand url-methods url-history mailcap shr url-cookie
url-domsuf url-util svg xml dom gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601
gnus-spec gnus-int message rmc puny dired dired-loaddefs format-spec
rfc822 mml mml-sec epa derived epg epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 gmm-utils mailheader gnus-win gnus-range
gnus nnheader wid-edit mh-seq mh-inc hl-line mh-tool-bar mh-xface
mh-utils mh-folder which-func imenu gnus-util rmail rmail-loaddefs
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
text-property-search time-date mh-scan mh-e mh-compat mailabbrev
mh-buffers mh-loaddefs edmacro kmacro preview-latex auto-loads tex-site
canna-im info package easymenu browse-url url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib japan-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind kqueue lcms2 dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
x multi-tty make-network-process emacs)

Memory information:
((conses 16 244096 28812)
 (symbols 48 22813 1)
 (strings 32 77097 10106)
 (string-bytes 1 2539003)
 (vectors 16 43698)
 (vector-slots 8 1236535 74930)
 (floats 8 398 186)
 (intervals 56 4375 0)
 (buffers 1000 31))

bug marked as fixed in version 29.1, send any further explanations to 52175 <at> debbugs.gnu.org and Ikumi Keita <ikumi <at> ikumi.que.jp> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 29 Nov 2021 14:41:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52175; Package emacs. (Mon, 29 Nov 2021 14:42:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ikumi Keita <ikumi <at> ikumi.que.jp>
Cc: 52175 <at> debbugs.gnu.org
Subject: Re: bug#52175: 27.2; stale marker left by `fill-region-as-paragraph'
Date: Mon, 29 Nov 2021 15:40:41 +0100
Ikumi Keita <ikumi <at> ikumi.que.jp> writes:

> I'd propose to apply the attached patch to accomplish that.

Looks good to me, so I've applied it to Emacs 29.

This change was small enough to apply without assigning copyright to the
FSF, but for future patches you want to submit, it might make sense to
get the paperwork started now, so that subsequent patches can be applied
speedily. Would you be willing to sign such paperwork?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52175; Package emacs. (Mon, 29 Nov 2021 15:53:02 GMT) Full text and rfc822 format available.

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

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52175 <at> debbugs.gnu.org
Subject: Re: bug#52175: 27.2; stale marker left by `fill-region-as-paragraph'
Date: Tue, 30 Nov 2021 00:52:33 +0900
Hi Lars,

>>>>> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
>> I'd propose to apply the attached patch to accomplish that.

> Looks good to me, so I've applied it to Emacs 29.

Thanks.

> This change was small enough to apply without assigning copyright to the
> FSF, but for future patches you want to submit, it might make sense to
> get the paperwork started now, so that subsequent patches can be applied
> speedily. Would you be willing to sign such paperwork?

I've already signed copyright assignment with my former email address
ikumi <at> revery.net, but it might be for AUCTeX only (sorry, my memory
isn't clear enough with respect to its coverage.) If so, I'm willing to
sign for other projects including Emacs for FSF.

Regards,
Ikumi Keita




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52175; Package emacs. (Mon, 29 Nov 2021 16:24:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ikumi Keita <ikumi <at> ikumi.que.jp>
Cc: 52175 <at> debbugs.gnu.org
Subject: Re: bug#52175: 27.2; stale marker left by `fill-region-as-paragraph'
Date: Mon, 29 Nov 2021 17:22:57 +0100
Ikumi Keita <ikumi <at> ikumi.que.jp> writes:

> I've already signed copyright assignment with my former email address
> ikumi <at> revery.net, but it might be for AUCTeX only (sorry, my memory
> isn't clear enough with respect to its coverage.) If so, I'm willing to
> sign for other projects including Emacs for FSF.

Yup, I see the assignment for AUCTEX, but not for Emacs as a whole.

Here's the form to get started with the Emacs assignment process:

Please email the following information to assign <at> gnu.org, and we
will send you the assignment form for your past and future changes.

Please use your full legal name (in ASCII characters) as the subject
line of the message.
----------------------------------------------------------------------
REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES

[What is the name of the program or package you're contributing to?]
Emacs

[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]

[Do you have an employer who might have a basis to claim to own
your changes?  Do you attend a school which might make such a claim?]

[For the copyright registration, what country are you a citizen of?]

[What year were you born?]

[Please write your email address here.]

[Please write your postal address here.]

[Which files have you changed so far, and which new files have you written
so far?]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52175; Package emacs. (Mon, 29 Nov 2021 16:58:01 GMT) Full text and rfc822 format available.

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

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52175 <at> debbugs.gnu.org
Subject: Re: bug#52175: 27.2; stale marker left by `fill-region-as-paragraph'
Date: Tue, 30 Nov 2021 01:57:19 +0900
>>>>> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Yup, I see the assignment for AUCTEX, but not for Emacs as a whole.

I see, thanks.

> Here's the form to get started with the Emacs assignment process:

> Please email the following information to assign <at> gnu.org, and we
> will send you the assignment form for your past and future changes.

Done. :-)

Regards,
Ikumi Keita




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 28 Dec 2021 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 81 days ago.

Previous Next


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