From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 21 03:40:11 2014 Received: (at submit) by debbugs.gnu.org; 21 Dec 2014 08:40:11 +0000 Received: from localhost ([127.0.0.1]:53410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2c3d-00050W-Td for submit@debbugs.gnu.org; Sun, 21 Dec 2014 03:40:10 -0500 Received: from eggs.gnu.org ([208.118.235.92]:32936) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2c3b-00050O-Nh for submit@debbugs.gnu.org; Sun, 21 Dec 2014 03:40:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2c3U-0000NM-2S for submit@debbugs.gnu.org; Sun, 21 Dec 2014 03:40:07 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2c3T-0000NI-VO for submit@debbugs.gnu.org; Sun, 21 Dec 2014 03:39:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2c3N-0001mQ-9T for bug-gnu-emacs@gnu.org; Sun, 21 Dec 2014 03:39:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2c3G-0000Mi-Tx for bug-gnu-emacs@gnu.org; Sun, 21 Dec 2014 03:39:53 -0500 Received: from cobb.liquidweb.com ([50.28.13.150]:44191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2c3G-0000Mc-LM for bug-gnu-emacs@gnu.org; Sun, 21 Dec 2014 03:39:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date; bh=igpklnQMWhtb6yj73yqZDngsm9ganm8jlmR1NBvxWmQ=; b=qjy87m8xmAVEWv3jKBtf7FNwuxvZn6YbFhbTrgSeXFM7jkXT1lemP8ScUIR5diYcMzPqy9AUxUMIzi4Ix8wNpNs06VJ2T3uwEdQ/iyO49RrOFdBdLN7V8DOSjUg3AZga; Received: from cpe-104-173-54-60.socal.res.rr.com ([104.173.54.60]:56331 helo=MP.local) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1Y2c3E-0006k4-Np for bug-gnu-emacs@gnu.org; Sun, 21 Dec 2014 03:39:44 -0500 Date: Sun, 21 Dec 2014 00:39:44 -0800 Message-ID: From: Keith David Bershatsky To: bug-gnu-emacs@gnu.org Subject: 25.0.50; `remove-overlays` needs one additional `point` at end of narrowed region. MIME-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: lawlist|lawlist.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) The function `remove-overlays`, when used without any arguments, needs one additional `point` at the end of a narrowed region to effectively remove an overlay at the very end of said region. Here is something that I'm using for my own setup, which adds the missing `point`: (defun lawlist-remove-overlays (beg end name val) "Remove the overlays." ;; DEBUGGING ;; (unless (and beg end name val) ;; (message "ERROR -- beg: %s | end: %s | name: %s | val: %s" beg end name val)) (let* ( (point-max (point-max)) (point-min (point-min)) (narrowed-p (not (equal (- point-max point-min) (buffer-size)))) (beg (if beg beg point-min)) (end (cond ((and (not narrowed-p) end) end) ((and narrowed-p end) (1+ end)) ((and narrowed-p (null end)) (1+ point-max)) ((and (not narrowed-p) (null end)) point-max))) ) (when (and beg end name val) (overlay-recenter end) (dolist (o (overlays-in beg end)) (when (eq (overlay-get o name) val) (delete-overlay o)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; In GNU Emacs 25.0.50.1 (x86_64-apple-darwin10.8.0, NS appkit-1038.36 Version 10.6.8 (Build 10K549)) of 2014-10-01 on MP.local Repository revision: 117996 dmantipov@yandex.ru-20141001132108-zdsxru2390mqyjlu Windowing system distributor `Apple', version 10.3.1038 Configured using: `configure --with-ns' Configured features: ACL LIBXML2 ZLIB Important settings: locale-coding-system: utf-8-unix Major mode: ORG Minor modes in effect: sd-mode: t vr-mode: t sb-mode: t vl-mode: t ln-mode: t hl-mode: t parens-mode: t ws-mode: t tb-mode: t shell-dirtrack-mode: t cm-mode: t frame-bufs-mode: t bc-mode: t ds-mode: t ml-mode: t font-lock-mode: t buffer-read-only: t Recent input: x r e p o r t - e m a c s - b u g Recent messages: Loading /Users/HOME/.0.data/.0.emacs/.0.lisp/lawlist-test.el (source)...done Loading /Users/HOME/.0.data/.0.emacs/.0.lisp/init.el (source)...done Wrote /Users/HOME/.0.data/.0.emacs/.lock Load-path shadows: /Users/HOME/.0.data/.0.emacs/.0.wl/md4 hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/md4 /Users/HOME/.0.data/.0.emacs/.0.wl/hex-util hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/hex-util /Users/HOME/.0.data/.0.emacs/.0.wl/sasl hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/sasl /Users/HOME/.0.data/.0.emacs/.0.wl/sasl-ntlm hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/sasl-ntlm /Users/HOME/.0.data/.0.emacs/.0.wl/sasl-digest hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/sasl-digest /Users/HOME/.0.data/.0.emacs/.0.wl/sasl-cram hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/sasl-cram /Users/HOME/.0.data/.0.emacs/.0.wl/ntlm hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/ntlm /Users/HOME/.0.data/.0.emacs/.0.wl/hmac-md5 hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/hmac-md5 /Users/HOME/.0.data/.0.emacs/.0.wl/hmac-def hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/net/hmac-def /Users/HOME/.0.data/.0.emacs/.0.wl/rfc2368 hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/mail/rfc2368 /Users/HOME/.0.data/.0.emacs/.0.wl/utf7 hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/gnus/utf7 /Users/HOME/.0.data/.0.emacs/.0.wl/smime hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/gnus/smime /Users/HOME/.0.data/.0.emacs/.0.wl/pgg hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/obsolete/pgg /Users/HOME/.0.data/.0.emacs/.0.wl/pgg-pgp5 hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/obsolete/pgg-pgp5 /Users/HOME/.0.data/.0.emacs/.0.wl/pgg-pgp hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/obsolete/pgg-pgp /Users/HOME/.0.data/.0.emacs/.0.wl/pgg-parse hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/obsolete/pgg-parse /Users/HOME/.0.data/.0.emacs/.0.wl/pgg-gpg hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/obsolete/pgg-gpg /Users/HOME/.0.data/.0.emacs/.0.wl/pgg-def hides /Users/HOME/.0.data/.0.emacs/Emacs_10_01_2014.app/Contents/Resources/lisp/obsolete/pgg-def Features: (shadow mime-setup mail-mime-setup semi-setup mime-image modb-standard elmo-imap4 emacsbug lawlist-desktop frameset lawlist-arc lawlist-colors reporter load-theme-buffer-local lawlist-dv lawlist-mc rect lawlist-ztree lawlist-wl w3m-load mime-w3m w3m browse-url doc-view jka-compr image-mode w3m-hist w3m-fb bookmark-w3m w3m-ems mule-util w3m-ccl w3m-favicon w3m-image w3m-proc w3m-util elmo-nntp wl-demo rfc2368 wl-spam elmo-spam elsp-header elsp-generic wl-fldmgr wl-score smtp sasl sasl-anonymous sasl-login sasl-plain wl-news wl-address pldap wl-thread wl-action wl wl-e21 wl-draft wl-template wl-summary wl-refile wl-message wl-mime pgg mime-pgp mime-play filename mime-edit eword-encode pgg-parse pccl pccl-20 ccl pgg-def signature sendmail elmo-mime mmelmo-buffer mmelmo-imap mime-view mime-conf calist semi-def mmimap mime-parse mmbuffer wl-highlight elmo-filter elmo-multi wl-folder wl-util crm pp elmo-pop3 elmo-net elmo-cache elmo-map elmo-dop elmo-flag elmo-localdir wl-vars elmo elmo-signal elmo-msgdb modb modb-generic modb-entity mime mmgeneric elmo-util emu invisible inv-23 poem poem-e20 poem-e20_3 utf7 eword-decode mel mime-def alist std11 mcharset mcs-20 mcs-e20 pces pces-e20 pces-20 broken pcustom elmo-date elmo-vars path-util poe pym static product wl-version elmo-version apel-ver luna lawlist-dired tramp-sh ls-lisp lawlist-vr-hr eldoc lawlist-ws disp-table lawlist-calc lawlist-flyspell lawlist-yas lawlist-tex-mode skeleton compare-w lawlist-txt-mode lawlist-tabbar lawlist-github ido view vc-git vc vc-dispatcher tramp tramp-compat tramp-loaddefs trampver shell thingatpt time-stamp log-view log-edit message mml mml-sec mm-decode mm-bodies mm-encode gmm-utils mailheader pcvs-util add-log help-mode grep compile find-lisp epa epg epg-config ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff ert ewoc debug eieio-base diff-mode conf-mode autorevert filenotify lorg-calendar org-element lorg-search org-agenda context-menu dired-read-filename dired lawlist-toodledo url-http tls url-auth url-gw url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source eieio eieio-core password-cache url-vars mailcap json xml lawlist-org lawlist-calendar org byte-opt bytecomp byte-compile cconv org-macro org-footnote org-pcomplete pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs noutline outline format-spec lawlist-frame lawlist-cm lawlist-bbdb gnus gnus-ems nnheader gnus-util mail-utils wid-edit mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-extr rfc822 cl timezone lawlist-grep lawlist-compile rx comint ansi-color ring lawlist-frame-bufs advice derived lawlist-init pcase help-fns cl-macs gv easy-mmode edmacro kmacro cl-loaddefs cl-lib savehist server ps-print ps-def lpr find-func saveplace easymenu time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process cocoa ns multi-tty emacs) Memory information: ((conses 16 1313688 99661) (symbols 48 62352 0) (miscs 40 1189 1177) (strings 32 145107 28245) (string-bytes 1 4641259) (vectors 16 34814) (vector-slots 8 728642 19777) (floats 8 1043 228) (intervals 56 5059 53) (buffers 976 12)) From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 21 11:45:27 2014 Received: (at 19422) by debbugs.gnu.org; 21 Dec 2014 16:45:27 +0000 Received: from localhost ([127.0.0.1]:53970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2jdG-0001ZE-QR for submit@debbugs.gnu.org; Sun, 21 Dec 2014 11:45:27 -0500 Received: from mtaout24.012.net.il ([80.179.55.180]:58690) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2jdD-0001Z5-OE for 19422@debbugs.gnu.org; Sun, 21 Dec 2014 11:45:24 -0500 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NGX00700XWII600@mtaout24.012.net.il> for 19422@debbugs.gnu.org; Sun, 21 Dec 2014 18:37:30 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NGX003TUY6IJT40@mtaout24.012.net.il>; Sun, 21 Dec 2014 18:37:30 +0200 (IST) Date: Sun, 21 Dec 2014 18:45:06 +0200 From: Eli Zaretskii Subject: Re: bug#19422: 25.0.50; `remove-overlays` needs one additional `point` at end of narrowed region. In-reply-to: X-012-Sender: halo1@inter.net.il To: Keith David Bershatsky Message-id: <837fxlq7e5.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 19422 Cc: 19422@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 21 Dec 2014 00:39:44 -0800 > From: Keith David Bershatsky > > The function `remove-overlays`, when used without any arguments, needs one additional `point` at the end of a narrowed region to effectively remove an overlay at the very end of said region. Maybe I'm confused, but what do you mean by "overlay at the very end of region"? Overlay that starts at END is not part of the region, AFAIU. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 21 12:42:42 2014 Received: (at 19422) by debbugs.gnu.org; 21 Dec 2014 17:42:42 +0000 Received: from localhost ([127.0.0.1]:53997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2kWg-0002xp-9U for submit@debbugs.gnu.org; Sun, 21 Dec 2014 12:42:42 -0500 Received: from cobb.liquidweb.com ([50.28.13.150]:55692) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y2kWc-0002xf-9O for 19422@debbugs.gnu.org; Sun, 21 Dec 2014 12:42:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date; bh=asBD8zqBMGE7+cjlbs8jfDOttaaT66NI3HfqRYNZXV8=; b=L5EAnhRPvQlTNTt8/0dmk8ebDt3upSk9WvoSWvzS6t/4baeRq3h45MSq0wrvFfYb10eVLdlh0Kq5AZHfdxG1ev7FaRMcubZrMyQEYwp9HCrIAArJ+R0WGJtu62z4Go3g; Received: from cpe-104-173-54-60.socal.res.rr.com ([104.173.54.60]:49451 helo=MP.local) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1Y2kWZ-0000LT-RR; Sun, 21 Dec 2014 12:42:36 -0500 Date: Sun, 21 Dec 2014 09:42:36 -0800 Message-ID: From: Keith David Bershatsky To: Eli Zaretskii Subject: Re: bug#19422: 25.0.50; `remove-overlays` needs one additional `point` at end of narrowed region. MIME-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: lawlist|lawlist.com X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19422 Cc: 19422@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) In my particular use case, I am narrowing to a region and then inserting an `after-string` overlay at `point-max`: (overlay-put (make-overlay (point-max) (point-max)) 'after-string "|") I have a minor mode that draws a vertical line that tracks the cursor position and I extend that to window-end or point-max. The end of the buffer has a different color and a different character overlay depending upon where `point` is --- a leading cushion is used if the vertical column extends beyond the point at the end of the line. And here is the slightly revised function that I am using to remove it. It differs a little bit from the version in my initial bug report number 19422: (defun lawlist-remove-overlays (beg end name val) "Remove the overlays." ;; DEBUGGING ;; (unless (and beg end name val) ;; (message "ERROR -- beg: %s | end: %s | name: %s | val: %s" beg end name val)) (let* ( (point-max (point-max)) (point-min (point-min)) (narrowed-p (not (equal (- point-max point-min) (buffer-size)))) (beg (if beg beg point-min)) (end (cond ((and (not narrowed-p) end) end) ((and (not narrowed-p) (null end)) point-max) ((and narrowed-p end (< end point-max)) end) ((and narrowed-p end (= end point-max)) (1+ end)) ((and narrowed-p (null end)) (1+ point-max)) ))) (when (and beg end name val) (overlay-recenter end) (dolist (o (overlays-in beg end)) (when (eq (overlay-get o name) val) (delete-overlay o)))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; At Sun, 21 Dec 2014 18:45:06 +0200, Eli Zaretskii wrote: > > > Date: Sun, 21 Dec 2014 00:39:44 -0800 > > From: Keith David Bershatsky > > > > The function `remove-overlays`, when used without any arguments, needs one additional `point` at the end of a narrowed region to effectively remove an overlay at the very end of said region. > > Maybe I'm confused, but what do you mean by "overlay at the very end > of region"? Overlay that starts at END is not part of the region, > AFAIU. From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 22 11:32:19 2014 Received: (at 19422) by debbugs.gnu.org; 22 Dec 2014 16:32:19 +0000 Received: from localhost ([127.0.0.1]:55080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y35u6-0005o2-RQ for submit@debbugs.gnu.org; Mon, 22 Dec 2014 11:32:19 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]:43895) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y35u4-0005nr-AM for 19422@debbugs.gnu.org; Mon, 22 Dec 2014 11:32:17 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NGZ00D00SH4RB00@a-mtaout22.012.net.il> for 19422@debbugs.gnu.org; Mon, 22 Dec 2014 18:32:14 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NGZ00DARSLP8T80@a-mtaout22.012.net.il>; Mon, 22 Dec 2014 18:32:14 +0200 (IST) Date: Mon, 22 Dec 2014 18:32:01 +0200 From: Eli Zaretskii Subject: Re: bug#19422: 25.0.50; `remove-overlays` needs one additional `point` at end of narrowed region. In-reply-to: X-012-Sender: halo1@inter.net.il To: Keith David Bershatsky Message-id: <83r3vrprwe.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 19422 Cc: 19422@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Sun, 21 Dec 2014 09:42:36 -0800 > From: Keith David Bershatsky > Cc: 19422@debbugs.gnu.org > > In my particular use case, I am narrowing to a region and then inserting an `after-string` overlay at `point-max`: > > (overlay-put (make-overlay (point-max) (point-max)) 'after-string "|") > > I have a minor mode that draws a vertical line that tracks the cursor position and I extend that to window-end or point-max. The end of the buffer has a different color and a different character overlay depending upon where `point` is --- a leading cushion is used if the vertical column extends beyond the point at the end of the line. It looks like overlays-in treats EOB specially, and does not treat (point-max) in the same way. This is explicitly stated in the doc string of overlays-in. I don't know what are the reasons for such a special treatment, and why a narrowed region doesn't get the same treatment. I always thought that Emacs treats both the same. Perhaps all we need is to give both the same treatment, and that's it. Besides that, the doc string of remove-overlays is inaccurate and misleading; I will take care of that. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 16 09:41:30 2021 Received: (at 19422) by debbugs.gnu.org; 16 Aug 2021 13:41:30 +0000 Received: from localhost ([127.0.0.1]:49015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFcrq-0001X6-2Y for submit@debbugs.gnu.org; Mon, 16 Aug 2021 09:41:30 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFcrm-0001Wo-V0 for 19422@debbugs.gnu.org; Mon, 16 Aug 2021 09:41:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LNuJHfe3Qx27PLaHUZXXoRW44hho9SFdE+rhfnlIEJQ=; b=tbBFc9NbLEWrgzTxP3UOvraVDv U2qbSwzVZPZH91+N7ck+xN7c8y5Z9XOOc+XDGqpr9ZaOjYqruGNzEi8WBPjkOIT8Xo+X4NkLzwDfT WJATqfheeb6iKmdis6iMebspDTuoUg7D72RRn70zmLHpKQPJkKCh5xV8tjk75xeQG20o=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFcrb-0005Mj-7Q; Mon, 16 Aug 2021 15:41:19 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#19422: 25.0.50; `remove-overlays` needs one additional `point` at end of narrowed region. References: <83r3vrprwe.fsf@gnu.org> Date: Mon, 16 Aug 2021 15:41:14 +0200 In-Reply-To: <83r3vrprwe.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 22 Dec 2014 18:32:01 +0200") Message-ID: <87mtpha4n9.fsf_-_@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > I don't know what are the reasons for such a special treatment, and > why a narrowed region doesn't get the same treatment. I always > thought that Emacs treats both the same. Perhaps all we need is [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 19422 Cc: 19422@debbugs.gnu.org, Keith David Bershatsky X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > I don't know what are the reasons for such a special treatment, and > why a narrowed region doesn't get the same treatment. I always > thought that Emacs treats both the same. Perhaps all we need is to > give both the same treatment, and that's it. I've now done this in Emacs 28. It's a non-compatible change, so I've called it out in NEWS. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 16 09:41:36 2021 Received: (at control) by debbugs.gnu.org; 16 Aug 2021 13:41:36 +0000 Received: from localhost ([127.0.0.1]:49018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFcrw-0001XP-9h for submit@debbugs.gnu.org; Mon, 16 Aug 2021 09:41:36 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mFcru-0001X5-UC for control@debbugs.gnu.org; Mon, 16 Aug 2021 09:41:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9E2uNKHbxYtof3IYD3mQjZCF+8ZafLzmGAGRSPLQ0fI=; b=T/EXeRtP4GhlN1Va1JRfeI/2S1 L1FnqGoT3yrYdRPnlRCt/fx6Wu3nSBmhsEwWrXLnnX0SlcoEfxCwe+QvSN0P+q6X/sRcdvpAU7mAL 11Q2GbhnDA4pdheUPAgPeiJMLUANLA4L9MnBxbGaKM2LdrAvh54QIhYhm7J7FA4+W+Kc=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFcrn-0005Mr-21 for control@debbugs.gnu.org; Mon, 16 Aug 2021 15:41:29 +0200 Date: Mon, 16 Aug 2021 15:41:26 +0200 Message-Id: <87lf51a4mx.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #19422 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 19422 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 19422 28.1 quit From unknown Sat Jun 21 03:25:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 14 Sep 2021 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator