* TODO item: the mark and overlay in revert-buffer
@ 2007-12-05 16:54 Yoni Rabkin Katzenell
2007-12-09 23:18 ` Richard Stallman
0 siblings, 1 reply; 3+ messages in thread
From: Yoni Rabkin Katzenell @ 2007-12-05 16:54 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 463 bytes --]
Hello, I am using GNU Emacs 23.0.50.1 (i686-pc-linux-gnu, X toolkit,
Xaw3d scroll bars) of 2007-12-05
/etc/TODO says: revert-buffer should eliminate overlays and the mark.
This patch should do that. It removes the mark, mark-ring and all
overlays after `before-revert-hook' is run and before
`after-revert-hook' is run.
Additionally, the patch changes the doc-string to be more explicit about
how other modes use revert-buffer via 'revert-buffer-function'.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: revert-buffer patch --]
[-- Type: text/x-diff, Size: 2092 bytes --]
*** old/files.el 2007-12-05 18:03:59.000000000 +0200
--- new/files.el 2007-12-05 18:03:54.000000000 +0200
***************
*** 4204,4213 ****
With a prefix argument, offer to revert from latest auto-save file, if
that is more recent than the visited file.
! This command also works for special buffers that contain text which
! doesn't come from a file, but reflects some other data base instead:
! for example, Dired buffers and `buffer-list' buffers. In these cases,
! it reconstructs the buffer contents from the appropriate data base.
When called from Lisp, the first argument is IGNORE-AUTO; only offer
to revert from the auto-save file when this is nil. Note that the
--- 4204,4215 ----
With a prefix argument, offer to revert from latest auto-save file, if
that is more recent than the visited file.
! This command also implements an interface for special buffers
! that contain text which doesn't come from a file, but reflects
! some other data instead (e.g. Dired buffers, `buffer-list'
! buffers). This is done via the variable
! `revert-buffer-function'. In these cases, it should reconstruct
! the buffer contents from the appropriate data.
When called from Lisp, the first argument is IGNORE-AUTO; only offer
to revert from the auto-save file when this is nil. Note that the
***************
*** 4323,4329 ****
(insert-file-contents file-name (not auto-save-p)
nil nil t))
(insert-file-contents file-name (not auto-save-p)
! nil nil t)))))
;; Recompute the truename in case changes in symlinks
;; have changed the truename.
(setq buffer-file-truename
--- 4325,4335 ----
(insert-file-contents file-name (not auto-save-p)
nil nil t))
(insert-file-contents file-name (not auto-save-p)
! nil nil t))
! ;; Reset the mark and remove all overlays.
! (setq mark-active nil
! mark-ring nil)
! (remove-overlays))))
;; Recompute the truename in case changes in symlinks
;; have changed the truename.
(setq buffer-file-truename
[-- Attachment #3: Type: text/plain, Size: 55 bytes --]
--
"Cut your own wood and it will warm you twice"
[-- Attachment #4: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: TODO item: the mark and overlay in revert-buffer
2007-12-05 16:54 TODO item: the mark and overlay in revert-buffer Yoni Rabkin Katzenell
@ 2007-12-09 23:18 ` Richard Stallman
2007-12-11 1:31 ` Vinicius Jose Latorre
0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2007-12-09 23:18 UTC (permalink / raw)
To: emacs-devel
Would someone please install this, then ack?
(And thank him.)
From: Yoni Rabkin Katzenell <yoni-r@actcom.com>
To: emacs-devel@gnu.org
Date: Wed, 05 Dec 2007 18:54:32 +0200
Message-ID: <871wa16q0n.fsf@actcom.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Subject: TODO item: the mark and overlay in revert-buffer
--=-=-=
Hello, I am using GNU Emacs 23.0.50.1 (i686-pc-linux-gnu, X toolkit,
Xaw3d scroll bars) of 2007-12-05
/etc/TODO says: revert-buffer should eliminate overlays and the mark.
This patch should do that. It removes the mark, mark-ring and all
overlays after `before-revert-hook' is run and before
`after-revert-hook' is run.
Additionally, the patch changes the doc-string to be more explicit about
how other modes use revert-buffer via 'revert-buffer-function'.
--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=2007-12-05-revert.patch
Content-Description: revert-buffer patch
*** old/files.el 2007-12-05 18:03:59.000000000 +0200
--- new/files.el 2007-12-05 18:03:54.000000000 +0200
***************
*** 4204,4213 ****
With a prefix argument, offer to revert from latest auto-save file, if
that is more recent than the visited file.
! This command also works for special buffers that contain text which
! doesn't come from a file, but reflects some other data base instead:
! for example, Dired buffers and `buffer-list' buffers. In these cases,
! it reconstructs the buffer contents from the appropriate data base.
When called from Lisp, the first argument is IGNORE-AUTO; only offer
to revert from the auto-save file when this is nil. Note that the
--- 4204,4215 ----
With a prefix argument, offer to revert from latest auto-save file, if
that is more recent than the visited file.
! This command also implements an interface for special buffers
! that contain text which doesn't come from a file, but reflects
! some other data instead (e.g. Dired buffers, `buffer-list'
! buffers). This is done via the variable
! `revert-buffer-function'. In these cases, it should reconstruct
! the buffer contents from the appropriate data.
When called from Lisp, the first argument is IGNORE-AUTO; only offer
to revert from the auto-save file when this is nil. Note that the
***************
*** 4323,4329 ****
(insert-file-contents file-name (not auto-save-p)
nil nil t))
(insert-file-contents file-name (not auto-save-p)
! nil nil t)))))
;; Recompute the truename in case changes in symlinks
;; have changed the truename.
(setq buffer-file-truename
--- 4325,4335 ----
(insert-file-contents file-name (not auto-save-p)
nil nil t))
(insert-file-contents file-name (not auto-save-p)
! nil nil t))
! ;; Reset the mark and remove all overlays.
! (setq mark-active nil
! mark-ring nil)
! (remove-overlays))))
;; Recompute the truename in case changes in symlinks
;; have changed the truename.
(setq buffer-file-truename
--=-=-=
--
"Cut your own wood and it will warm you twice"
--=-=-=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
--=-=-=--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: TODO item: the mark and overlay in revert-buffer
2007-12-09 23:18 ` Richard Stallman
@ 2007-12-11 1:31 ` Vinicius Jose Latorre
0 siblings, 0 replies; 3+ messages in thread
From: Vinicius Jose Latorre @ 2007-12-11 1:31 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
> Would someone please install this, then ack?
> (And thank him.)
>
Done in CVS trunk.
> From: Yoni Rabkin Katzenell <yoni-r@actcom.com>
> To: emacs-devel@gnu.org
> Date: Wed, 05 Dec 2007 18:54:32 +0200
> Message-ID: <871wa16q0n.fsf@actcom.com>
> MIME-Version: 1.0
> Content-Type: multipart/mixed; boundary="=-=-="
> Subject: TODO item: the mark and overlay in revert-buffer
>
> --=-=-=
>
>
> Hello, I am using GNU Emacs 23.0.50.1 (i686-pc-linux-gnu, X toolkit,
> Xaw3d scroll bars) of 2007-12-05
>
> /etc/TODO says: revert-buffer should eliminate overlays and the mark.
>
> This patch should do that. It removes the mark, mark-ring and all
> overlays after `before-revert-hook' is run and before
> `after-revert-hook' is run.
>
> Additionally, the patch changes the doc-string to be more explicit about
> how other modes use revert-buffer via 'revert-buffer-function'.
>
>
> --=-=-=
> Content-Type: text/x-diff
> Content-Disposition: inline; filename=2007-12-05-revert.patch
> Content-Description: revert-buffer patch
>
> *** old/files.el 2007-12-05 18:03:59.000000000 +0200
> --- new/files.el 2007-12-05 18:03:54.000000000 +0200
> ***************
> *** 4204,4213 ****
> With a prefix argument, offer to revert from latest auto-save file, if
> that is more recent than the visited file.
>
> ! This command also works for special buffers that contain text which
> ! doesn't come from a file, but reflects some other data base instead:
> ! for example, Dired buffers and `buffer-list' buffers. In these cases,
> ! it reconstructs the buffer contents from the appropriate data base.
>
> When called from Lisp, the first argument is IGNORE-AUTO; only offer
> to revert from the auto-save file when this is nil. Note that the
> --- 4204,4215 ----
> With a prefix argument, offer to revert from latest auto-save file, if
> that is more recent than the visited file.
>
> ! This command also implements an interface for special buffers
> ! that contain text which doesn't come from a file, but reflects
> ! some other data instead (e.g. Dired buffers, `buffer-list'
> ! buffers). This is done via the variable
> ! `revert-buffer-function'. In these cases, it should reconstruct
> ! the buffer contents from the appropriate data.
>
> When called from Lisp, the first argument is IGNORE-AUTO; only offer
> to revert from the auto-save file when this is nil. Note that the
> ***************
> *** 4323,4329 ****
> (insert-file-contents file-name (not auto-save-p)
> nil nil t))
> (insert-file-contents file-name (not auto-save-p)
> ! nil nil t)))))
> ;; Recompute the truename in case changes in symlinks
> ;; have changed the truename.
> (setq buffer-file-truename
> --- 4325,4335 ----
> (insert-file-contents file-name (not auto-save-p)
> nil nil t))
> (insert-file-contents file-name (not auto-save-p)
> ! nil nil t))
> ! ;; Reset the mark and remove all overlays.
> ! (setq mark-active nil
> ! mark-ring nil)
> ! (remove-overlays))))
> ;; Recompute the truename in case changes in symlinks
> ;; have changed the truename.
> (setq buffer-file-truename
>
> --=-=-=
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-11 1:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-05 16:54 TODO item: the mark and overlay in revert-buffer Yoni Rabkin Katzenell
2007-12-09 23:18 ` Richard Stallman
2007-12-11 1:31 ` Vinicius Jose Latorre
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.