From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: "Staying in the same place" Date: Mon, 04 Apr 2016 14:36:59 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459795050 11002 80.91.229.3 (4 Apr 2016 18:37:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Apr 2016 18:37:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 04 20:37:23 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1an9NI-0000SV-DO for ged-emacs-devel@m.gmane.org; Mon, 04 Apr 2016 20:37:20 +0200 Original-Received: from localhost ([::1]:60504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an9NH-0008VQ-JG for ged-emacs-devel@m.gmane.org; Mon, 04 Apr 2016 14:37:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an9N4-0008VI-9O for emacs-devel@gnu.org; Mon, 04 Apr 2016 14:37:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1an9N1-00076C-1L for emacs-devel@gnu.org; Mon, 04 Apr 2016 14:37:06 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:38325) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an9N0-000760-SQ for emacs-devel@gnu.org; Mon, 04 Apr 2016 14:37:02 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u34IaxHD011215; Mon, 4 Apr 2016 14:37:00 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id BB5E9603DE; Mon, 4 Apr 2016 14:36:59 -0400 (EDT) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Mon, 04 Apr 2016 20:19:58 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5632=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5632> : inlines <4637> : streams <1614033> : uri <2179731> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202698 Archived-At: >> I think it'd good to think of such solutions in the context of bookmarks >> as well. > Hm... interesting... > I know next to nothing about Emacs bookmarking. How are bookmarks > stored (for special mode buffers)? For the current discussion the part that saves bookmarks is not important. The important part is that you can build a "bookmark object" which should contain enough data to reproduce the current buffer&position. > I'm trying to envision how this would work from a UX point of view. > Let's say you're trying to do some "-Wall" cleanups in emacs/src, and > you've gotten halfway down the list of things you're able to clean up, > so you set a bookmark there. Then the next time you compile something > in that directory, then point moves to around that point? You might be able to do that, but what I was proposing was not to let users use the bookmark functionality, but simply to have a default special-mode-revert-buffer function which would do something along the lines of: (defun special-mode-revert-function () (let ((here (funcall bookmark-make-record-function))) (erase-buffer) (bookmark-goback here))) -- Stefan