[ESS] GNU Emacs, ESS and point

Vitalie Spinu spinuvit at gmail.com
Wed Jul 18 17:57:15 CEST 2012


  >> Rodney Sparapani <rsparapa at mcw.edu>
  >> on Wed, 18 Jul 2012 10:26:27 -0500 wrote:

  > On 03/05/2012 01:12 PM, Rodney Sparapani wrote:
  >> 
  >> Ok, here is something that I don't understand. When you have
  >> a file opened in different frames, GNU Emacs doesn't remember
  >> point. I can see how this sort of makes sense (although, XEmacs
  >> somehow does it better; I'm not sure where this setting is). Someone
  >> must have dealt with this smartly on the GNU side, right? If you have
  >> a big file open (and a big file benefits the most from this
  >> multiple view scenario so this is pretty common), is there
  >> any way to smartly manage point? This type of point management
  >> is sort of what we have created in ess-revert-wisely. But,
  >> what if you don't want to revert? Thanks
  >> 

  > Actually, you don't need the same buffer open several times to get
  > bitten by this bug (v. 23.3.1).  Even if you only have it open once,
  > and you surf to another buffer; returning to your buffer will put
  > you at a different point?!?!  The workaround is to NEVER have the
  > same buffer open more than once; AND don't EVER surf away from it.
  > Peculiar to say the least.

If I understand correctly what you want is a separate point is different buffers
of the same file, right? Then this is what you are after:

M-x make-indirect-buffer RET


>From the (elisp)Indirect Buffers:

   
   An "indirect buffer" shares the text of some other buffer, which is
   called the "base buffer" of the indirect buffer.  In some ways it is
   the analogue, for buffers, of a symbolic link among files.  The base
   buffer may not itself be an indirect buffer.
   
      The text of the indirect buffer is always identical to the text of
   its base buffer; changes made by editing either one are visible
   immediately in the other.  This includes the text properties as well as
   the characters themselves.
   
      In all other respects, the indirect buffer and its base buffer are
   completely separate.  They have different names, independent values of
   point, independent narrowing, independent markers and overlays (though
   inserting or deleting text in either buffer relocates the markers and
   overlays for both), independent major modes, and independent
   buffer-local variable bindings.
   
Best,
Vitalie.



More information about the ESS-help mailing list