all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* default point ?
@ 2012-02-29  3:58 Muhali
  2012-02-29 14:32 ` Peter Dyballa
  2012-03-08  2:19 ` Muhali
  0 siblings, 2 replies; 10+ messages in thread
From: Muhali @ 2012-02-29  3:58 UTC (permalink / raw)
  To: Help-gnu-emacs


What controls the position of point when switching buffers?

Sometimes (e.g. at my office) point is put on a fixed position, sometimes
(e.g. at home) point is put at the position when the buffer was last
visited.

I have no idea what controls this.

M.

-- 
View this message in context: http://old.nabble.com/default-point---tp33411563p33411563.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: default point ?
  2012-02-29  3:58 default point ? Muhali
@ 2012-02-29 14:32 ` Peter Dyballa
  2012-02-29 17:08   ` Muhali
  2012-03-08  2:19 ` Muhali
  1 sibling, 1 reply; 10+ messages in thread
From: Peter Dyballa @ 2012-02-29 14:32 UTC (permalink / raw)
  To: Muhali; +Cc: Help-gnu-emacs


Am 29.2.2012 um 04:58 schrieb Muhali:

> Sometimes (e.g. at my office) point is put on a fixed position, sometimes
> (e.g. at home) point is put at the position when the buffer was last
> visited.

I'd say that point is saved at that point were the text cursor last was. When it was nowhere, i.e., you opened the buffer without "doing" anything, then it should be the beginning of the buffer. When you're using desktop.el and/or session.el, then the point in the buffer can be preserved between sessions. And sometimes I think GNU Emacs caches point and when I re-open the file the text cursor is at point where it was when I closed the before before...

--
Greetings

  Pete

Computers are good at following instructions, but not at reading your mind.
	- D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: default point ?
  2012-02-29 14:32 ` Peter Dyballa
@ 2012-02-29 17:08   ` Muhali
  2012-02-29 20:41     ` Tassilo Horn
  0 siblings, 1 reply; 10+ messages in thread
From: Muhali @ 2012-02-29 17:08 UTC (permalink / raw)
  To: Help-gnu-emacs


> I'd say that point is saved at that point were the text cursor last was.
When it was nowhere, i.e., you opened the buffer without "doing" anything,
then it should be the beginning of the buffer. When you're using desktop.el
and/or session.el, then the point in the buffer can be preserved between
sessions. And sometimes I think GNU Emacs caches point and when I re-open
the file the text cursor is at point where it was when I closed the before
before...

thanks. You are right, but interestingly the expected behavior - point
returning to the old position - was only re-activated after doing some
editing before switching. Before that, and here I am positive, it was as I
described.

M.

-- 
View this message in context: http://old.nabble.com/default-point---tp33411563p33415554.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: default point ?
  2012-02-29 17:08   ` Muhali
@ 2012-02-29 20:41     ` Tassilo Horn
  0 siblings, 0 replies; 10+ messages in thread
From: Tassilo Horn @ 2012-02-29 20:41 UTC (permalink / raw)
  To: help-gnu-emacs

Muhali <muhali@shaw.ca> writes:

> And sometimes I think GNU Emacs caches point and when I re-open the
> file the text cursor is at point where it was when I closed the before
> before...

I think, there's some confusion about files, buffers, and windows in
this thread.  But for the case of finding a file anew, i.e., there's no
buffer for that file already, the saveplace library might restore the
last point position if enabled.

,----[ C-h v save-place RET ]
| save-place is a variable defined in `saveplace.el'.
| Its value is t
| Original value was nil
| 
|   Automatically becomes buffer-local when set in any fashion.
| 
| Documentation:
| Non-nil means automatically save place in each file.
| This means when you visit a file, point goes to the last place
| where it was when you previously visited the same file.
| This variable is automatically buffer-local.
| 
| If you wish your place in any file to always be automatically saved,
| simply put this in your `~/.emacs' file:
| 
| (setq-default save-place t)
| (require 'saveplace)
| 
| or else use the Custom facility to set this option.
`----

Bye,
Tassilo




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: default point ?
  2012-02-29  3:58 default point ? Muhali
  2012-02-29 14:32 ` Peter Dyballa
@ 2012-03-08  2:19 ` Muhali
  2012-03-08 10:13   ` Peter Dyballa
  1 sibling, 1 reply; 10+ messages in thread
From: Muhali @ 2012-03-08  2:19 UTC (permalink / raw)
  To: Help-gnu-emacs


Now it happened again:

Switch to buffer A; point is at position X. Then move point to some position
Y, do some editing if you want, then switch to buffer B and back to buffer
A. Point is back at X.

What controls the behavior of A and the position X??

M.

-- 
View this message in context: http://old.nabble.com/default-point---tp33411563p33462470.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: default point ?
  2012-03-08  2:19 ` Muhali
@ 2012-03-08 10:13   ` Peter Dyballa
  2012-03-08 17:07     ` Muhali
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Dyballa @ 2012-03-08 10:13 UTC (permalink / raw)
  To: Muhali; +Cc: Help-gnu-emacs


Am 8.3.2012 um 03:19 schrieb Muhali:

> Switch to buffer A; point is at position X. Then move point to some position
> Y, do some editing if you want, then switch to buffer B and back to buffer
> A. Point is back at X.

Does this also happen when you're using an Emacs without all customisation applied, i.e., when launched with -Q?

If this happens in that setup as well then some bug is likely and you should report it. Help menu -> Send Bug Report... And a good description how to reproduce it.

If this does not happen without customisation, then it's likely that some of your (and your system's) customisation is the culprit.


I can't remember having encountered this effect. But this can be de to bad habits: when I switch between windows I often use the mouse instead of C-x o... Then the point is automatically moved away. Maybe I expect every time the same behaviour. I'll try to keep my eyes open (though when trying to develop software in many windows and more than one frame the attention is not on these subtleties).

You could also check your init file. Is there something you don't understand, looks suspicious or obsolete? Commenting it and saving the file you could launch a new instance and see how work goes. When desktop.el and/or session.el are used you don't lose much and can easily correct when having commented the wrong Elisp code.

--
Greetings

  Pete

Email is a wonderful thing for people whose role in life is to be on top of things. But not for me; my role is to be on the bottom of things. What I do takes long hours of studying and uninterruptible concentration.
				– Donald Knuth




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: default point ?
  2012-03-08 10:13   ` Peter Dyballa
@ 2012-03-08 17:07     ` Muhali
  2012-03-08 18:30       ` Peter Dyballa
  0 siblings, 1 reply; 10+ messages in thread
From: Muhali @ 2012-03-08 17:07 UTC (permalink / raw)
  To: Help-gnu-emacs


if it were reproducible that's probably easy. I see this behavior quite
randomly. Apparently I get into a different editing mode once I've hit some
strange keyboard combination (and I do everything with the keyboard).

M.


Peter Dyballa wrote:
> 
> 
> Am 8.3.2012 um 03:19 schrieb Muhali:
> 
>> Switch to buffer A; point is at position X. Then move point to some
>> position
>> Y, do some editing if you want, then switch to buffer B and back to
>> buffer
>> A. Point is back at X.
> 
> Does this also happen when you're using an Emacs without all customisation
> applied, i.e., when launched with -Q?
> 
> If this happens in that setup as well then some bug is likely and you
> should report it. Help menu -> Send Bug Report... And a good description
> how to reproduce it.
> 
> If this does not happen without customisation, then it's likely that some
> of your (and your system's) customisation is the culprit.
> 
> 
> I can't remember having encountered this effect. But this can be de to bad
> habits: when I switch between windows I often use the mouse instead of C-x
> o... Then the point is automatically moved away. Maybe I expect every time
> the same behaviour. I'll try to keep my eyes open (though when trying to
> develop software in many windows and more than one frame the attention is
> not on these subtleties).
> 
> You could also check your init file. Is there something you don't
> understand, looks suspicious or obsolete? Commenting it and saving the
> file you could launch a new instance and see how work goes. When
> desktop.el and/or session.el are used you don't lose much and can easily
> correct when having commented the wrong Elisp code.
> 
> --
> Greetings
> 
>   Pete
> 
> Email is a wonderful thing for people whose role in life is to be on top
> of things. But not for me; my role is to be on the bottom of things. What
> I do takes long hours of studying and uninterruptible concentration.
> 				– Donald Knuth
> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/default-point---tp33411563p33466343.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: default point ?
  2012-03-08 17:07     ` Muhali
@ 2012-03-08 18:30       ` Peter Dyballa
  2012-03-26 23:53         ` Muhali
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Dyballa @ 2012-03-08 18:30 UTC (permalink / raw)
  To: Muhali; +Cc: Help-gnu-emacs


Am 8.3.2012 um 18:07 schrieb Muhali:

> Apparently I get into a different editing mode once I've hit some
> strange keyboard combination (and I do everything with the keyboard).

When this happens again and the "default" point was lost, type C-h l!
--
Greetings

  Pete       (:
        _    / __    -    -
      _/ \__/_/        -     -
     (´`)      (´`)   -    -
      `´        `´




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: default point ?
  2012-03-08 18:30       ` Peter Dyballa
@ 2012-03-26 23:53         ` Muhali
  2012-03-27  8:48           ` Peter Dyballa
  0 siblings, 1 reply; 10+ messages in thread
From: Muhali @ 2012-03-26 23:53 UTC (permalink / raw)
  To: Help-gnu-emacs


> When this happens again and the "default" point was lost, type C-h l!

Just for completeness. It happended again and here is the 'C-h l' output:

<down> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<left> <left> C-w C-_ <backspace> <backspace> <backspace>
<backspace> <backspace> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> C-x C-s <up> <right>
<up> <up> <down> C-x C-s C-x k <return> C-x C-b <down>
<down> <return> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <up>
C-SPC <down> <down> <right> C-x r k <up> <up> <up>
<right> <down> <down> <down> <up> <up> <up> C-x C-s
C-x C-b <down> <down> <down> <down> <return> <backspace>
<left> <left> <left> <left> <left> <left> <left> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> <right> <right> <right> <right>
<right> <right> <right> C-x C-s <left> <left> <left>
<left> <left> <left> <up> <up> <up> <right> <up> C-x
C-b <down> <down> <down> <return> <C-home> C-c TAB
C-k <up> <return> <C-return> C-SPC <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <kp-enter> <next> <next> <next>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <up> <up> C-x C-b <down> <down>
<down> <down> <return> <down> <down> <up> <up> C-x
C-b <down> <return> <C-home> C-x b <return> C-x b <return>


If it helps, I am in octave-mode.

M.

-- 
View this message in context: http://old.nabble.com/default-point---tp33411563p33544770.html
Sent from the Emacs - Help mailing list archive at Nabble.com.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: default point ?
  2012-03-26 23:53         ` Muhali
@ 2012-03-27  8:48           ` Peter Dyballa
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Dyballa @ 2012-03-27  8:48 UTC (permalink / raw)
  To: Muhali; +Cc: Help-gnu-emacs


Am 27.3.2012 um 01:53 schrieb Muhali:

> C-x C-b <down> <down>
> <down> <down> <return> <down> <down> <up> <up> C-x
> C-b <down> <return> <C-home> C-x b <return> C-x b <return>
> 
> 
> If it helps, I am in octave-mode.

I don't know octave-mode. The record seems to be incomplete: the final C-h l is missing.

C-x C-b is list-buffers: a new buffer opens and displays which buffers you have open. Maybe you change with the mouse into that buffer and then step down until you've found the desired buffer. You select it with RET. You step down and up in that buffer, list the buffers again, maybe go to the other buffer with the mouse, step down and select that buffer. <C-home> moves the point to the first position in the buffer. Then you change to the other buffer and then back. You should be at the beginning of the buffer, (1,0). Did you find yourself elsewhere?

--
Greetings

  Pete

Our enemies are innovative and resourceful, and so are we. They never stop thinking about new ways to harm our country and our people, and neither do we.
				– Georges W. Bush




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-27  8:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-29  3:58 default point ? Muhali
2012-02-29 14:32 ` Peter Dyballa
2012-02-29 17:08   ` Muhali
2012-02-29 20:41     ` Tassilo Horn
2012-03-08  2:19 ` Muhali
2012-03-08 10:13   ` Peter Dyballa
2012-03-08 17:07     ` Muhali
2012-03-08 18:30       ` Peter Dyballa
2012-03-26 23:53         ` Muhali
2012-03-27  8:48           ` Peter Dyballa

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.