unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* saveplace and friends
@ 2016-08-09  7:51 Uwe Brauer
  2016-08-09 12:36 ` Narendra Joshi
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Uwe Brauer @ 2016-08-09  7:51 UTC (permalink / raw)
  To: help-gnu-emacs

Hi

I used such a functionality a long time ago and now again I think it
would come in handy:

Saveplace (or friends).


That is when I exit emacs I want it to save the
place of the cursor of the buffers which where open at that moment.

I thought that recentfiles provides such a functionality but it does not
at least not for GNU emacs 25.1.5.

I tried out

(require 'saveplace)
(setq-default save-place t)
 
But it did not work neither.

Anybody has a different suggestion?

thanks

Uwe Brauer 




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

* Re: saveplace and friends
  2016-08-09  7:51 saveplace and friends Uwe Brauer
@ 2016-08-09 12:36 ` Narendra Joshi
  2016-08-09 14:52   ` Uwe Brauer
  2016-08-09 13:31 ` Alexis
  2016-08-09 18:59 ` Jude DaShiell
  2 siblings, 1 reply; 14+ messages in thread
From: Narendra Joshi @ 2016-08-09 12:36 UTC (permalink / raw)
  To: help-gnu-emacs

Is desktop-save what you are looking for?

Narendra Joshi
On 9 Aug 2016 13:22, "Uwe Brauer" <oub@mat.ucm.es> wrote:

> Hi
>
> I used such a functionality a long time ago and now again I think it
> would come in handy:
>
> Saveplace (or friends).
>
>
> That is when I exit emacs I want it to save the
> place of the cursor of the buffers which where open at that moment.
>
> I thought that recentfiles provides such a functionality but it does not
> at least not for GNU emacs 25.1.5.
>
> I tried out
>
> (require 'saveplace)
> (setq-default save-place t)
>
> But it did not work neither.
>
> Anybody has a different suggestion?
>
> thanks
>
> Uwe Brauer
>
>
>


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

* Re: saveplace and friends
  2016-08-09  7:51 saveplace and friends Uwe Brauer
  2016-08-09 12:36 ` Narendra Joshi
@ 2016-08-09 13:31 ` Alexis
  2016-08-09 14:50   ` Uwe Brauer
  2016-08-09 15:03   ` Eli Zaretskii
  2016-08-09 18:59 ` Jude DaShiell
  2 siblings, 2 replies; 14+ messages in thread
From: Alexis @ 2016-08-09 13:31 UTC (permalink / raw)
  To: Uwe Brauer; +Cc: help-gnu-emacs


Uwe Brauer <oub@mat.ucm.es> writes:

> I tried out
>
> (require 'saveplace)
> (setq-default save-place t)
>
> But it did not work neither.

`saveplace` works for me .... Have you also set the value of the
variable `save-place-file`?


Alexis.



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

* Re: saveplace and friends
  2016-08-09 13:31 ` Alexis
@ 2016-08-09 14:50   ` Uwe Brauer
  2016-08-09 15:04     ` Kaushal Modi
  2016-08-09 15:05     ` Eli Zaretskii
  2016-08-09 15:03   ` Eli Zaretskii
  1 sibling, 2 replies; 14+ messages in thread
From: Uwe Brauer @ 2016-08-09 14:50 UTC (permalink / raw)
  To: help-gnu-emacs

>>> "Alexis" == Alexis  <flexibeast@gmail.com> writes:

    > Uwe Brauer <oub@mat.ucm.es> writes:

    >> I tried out
    >> 
    >> (require 'saveplace)
    >> (setq-default save-place t)
    >> 
    >> But it did not work neither.

    > `saveplace` works for me .... Have you also set the value of the
    > variable `save-place-file`?
I have this setting

(require 'saveplace)
(setq-default save-place t)
(setq save-place-file "~/.emacs.d/saved-places")

But it seems that nothing is saved in .emacs.d

Looks like a bug to me.

    > Alexis.






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

* Re: saveplace and friends
  2016-08-09 12:36 ` Narendra Joshi
@ 2016-08-09 14:52   ` Uwe Brauer
  0 siblings, 0 replies; 14+ messages in thread
From: Uwe Brauer @ 2016-08-09 14:52 UTC (permalink / raw)
  To: help-gnu-emacs


   > Is desktop-save what you are looking for?

Well I had that in my init file

(desktop-save-mode 1)

But it did not work neither. That is: I expect when I (restart emacs
and) reopen a file or to the cursor jump to my last change, but he does
not.




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

* Re: saveplace and friends
  2016-08-09 13:31 ` Alexis
  2016-08-09 14:50   ` Uwe Brauer
@ 2016-08-09 15:03   ` Eli Zaretskii
  2016-08-09 15:07     ` Stefan Monnier
  2016-08-09 15:11     ` Uwe Brauer
  1 sibling, 2 replies; 14+ messages in thread
From: Eli Zaretskii @ 2016-08-09 15:03 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Alexis <flexibeast@gmail.com>
> Date: Tue, 09 Aug 2016 23:31:55 +1000
> Cc: help-gnu-emacs@gnu.org
> 
> > I tried out
> >
> > (require 'saveplace)
> > (setq-default save-place t)
> >
> > But it did not work neither.
> 
> `saveplace` works for me .... Have you also set the value of the
> variable `save-place-file`?

The default should work just fine.  What Uwe needs is turn on the
mode:

  (require 'saveplace)
  (save-place-mode 1)

Emacs has long ago switched away from the policy of having a mode turn
on just by loading a file.  Nowadays, users need to actually turn on
the mode.



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

* Re: saveplace and friends
  2016-08-09 14:50   ` Uwe Brauer
@ 2016-08-09 15:04     ` Kaushal Modi
  2016-08-09 15:05     ` Eli Zaretskii
  1 sibling, 0 replies; 14+ messages in thread
From: Kaushal Modi @ 2016-08-09 15:04 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

save-place-mode enabling has changed in emacs 25.x

From the NEWS file:

** The way to turn on and off 'save-place' mode has changed.
It is no longer sufficient to load the saveplace library and set
'save-place' non-nil.  Instead, use the two new minor modes:
'save-place-mode' turns on saving last place in every file, and
'save-place-local-mode' does that only for the file in whose buffer it
is invoked.  The 'save-place' variable is now an obsolete alias for
'save-place-mode', which replaces it, and 'toggle-save-place' is an
obsolete alias for the new 'save-place-local-mode' command.


Here is how I enable it:

      (save-place-mode 1)






On Tue, Aug 9, 2016, 10:56 AM Uwe Brauer <oub@mat.ucm.es> wrote:

> >>> "Alexis" == Alexis  <flexibeast@gmail.com> writes:
>
>     > Uwe Brauer <oub@mat.ucm.es> writes:
>
>     >> I tried out
>     >>
>     >> (require 'saveplace)
>     >> (setq-default save-place t)
>     >>
>     >> But it did not work neither.
>
>     > `saveplace` works for me .... Have you also set the value of the
>     > variable `save-place-file`?
> I have this setting
>
> (require 'saveplace)
> (setq-default save-place t)
> (setq save-place-file "~/.emacs.d/saved-places")
>
> But it seems that nothing is saved in .emacs.d
>
> Looks like a bug to me.
>
>     > Alexis.
>
>
>
>
> --

Kaushal Modi


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

* Re: saveplace and friends
  2016-08-09 14:50   ` Uwe Brauer
  2016-08-09 15:04     ` Kaushal Modi
@ 2016-08-09 15:05     ` Eli Zaretskii
  1 sibling, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2016-08-09 15:05 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Uwe Brauer <oub@mat.ucm.es>
> Date: Tue, 09 Aug 2016 14:50:41 +0000
> 
> I have this setting
> 
> (require 'saveplace)
> (setq-default save-place t)
> (setq save-place-file "~/.emacs.d/saved-places")
> 
> But it seems that nothing is saved in .emacs.d
> 
> Looks like a bug to me.

No, it's a cockpit error: you didn't turn on the mode.

FWIW, save-place-mode works for me for a very long time.



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

* Re: saveplace and friends
  2016-08-09 15:03   ` Eli Zaretskii
@ 2016-08-09 15:07     ` Stefan Monnier
  2016-08-09 15:16       ` Uwe Brauer
  2016-08-09 15:11     ` Uwe Brauer
  1 sibling, 1 reply; 14+ messages in thread
From: Stefan Monnier @ 2016-08-09 15:07 UTC (permalink / raw)
  To: help-gnu-emacs

> The default should work just fine.  What Uwe needs is turn on the
> mode:

>   (require 'saveplace)
>   (save-place-mode 1)

And of course the `require' is unnecessary since save-place-mode
is autoloaded.


        Stefan




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

* Re: saveplace and friends
  2016-08-09 15:03   ` Eli Zaretskii
  2016-08-09 15:07     ` Stefan Monnier
@ 2016-08-09 15:11     ` Uwe Brauer
  1 sibling, 0 replies; 14+ messages in thread
From: Uwe Brauer @ 2016-08-09 15:11 UTC (permalink / raw)
  To: help-gnu-emacs



    > The default should work just fine.  What Uwe needs is turn on the
    > mode:

    >   (require 'saveplace)
    >   (save-place-mode 1)

    > Emacs has long ago switched away from the policy of having a mode turn
    > on just by loading a file.  Nowadays, users need to actually turn on
    > the mode.

Right, it seems that

(require 'saveplace)
(if (fboundp #'save-place-mode)
  (save-place-mode +1)
  (setq-default save-place t))

Does the trick, which is a more complicated version of what you
proposed. Sorry for the noise, but the emacswiki needs an upgrade.


https://www.emacswiki.org/emacs/SavePlace




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

* Re: saveplace and friends
  2016-08-09 15:07     ` Stefan Monnier
@ 2016-08-09 15:16       ` Uwe Brauer
  2016-08-09 16:57         ` Stefan Monnier
  0 siblings, 1 reply; 14+ messages in thread
From: Uwe Brauer @ 2016-08-09 15:16 UTC (permalink / raw)
  To: help-gnu-emacs

>>> "Stefan" == Stefan Monnier <monnier@iro.umontreal.ca> writes:

   >> The default should work just fine.  What Uwe needs is turn on the
   >> mode:

   >> (require 'saveplace)
   >> (save-place-mode 1)

   > And of course the `require' is unnecessary since save-place-mode
   > is autoloaded.

I think I have again to go over my init files for faster start up.
Does require slow down startup.
Are all official elpa and in official (melpa mermelade) packages
autoloaded?

Uwe 




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

* Re: saveplace and friends
  2016-08-09 15:16       ` Uwe Brauer
@ 2016-08-09 16:57         ` Stefan Monnier
  0 siblings, 0 replies; 14+ messages in thread
From: Stefan Monnier @ 2016-08-09 16:57 UTC (permalink / raw)
  To: help-gnu-emacs

> Does require slow down startup.

In general, yes.  In the case of save-place-mode, no, because the call
to save-place-mode will load the file anyway.

> Are all official elpa and in official (melpa mermelade) packages
> autoloaded?

They should be (i.e., if they aren't you should report it as a bug to
the package's authors).


        Stefan




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

* Re: saveplace and friends
  2016-08-09  7:51 saveplace and friends Uwe Brauer
  2016-08-09 12:36 ` Narendra Joshi
  2016-08-09 13:31 ` Alexis
@ 2016-08-09 18:59 ` Jude DaShiell
  2016-08-10 14:24   ` Eli Zaretskii
  2 siblings, 1 reply; 14+ messages in thread
From: Jude DaShiell @ 2016-08-09 18:59 UTC (permalink / raw)
  To: Uwe Brauer, help-gnu-emacs

save-place hasn't worked in 24.5 either.  I know I used that on earlier 
version of emacs and it saves your place in the file and when you open 
the file again you get put back on the save-place location.

On Tue, 9 Aug 2016, Uwe Brauer wrote:

> Date: Tue, 9 Aug 2016 03:51:28
> From: Uwe Brauer <oub@mat.ucm.es>
> To: help-gnu-emacs@gnu.org
> Subject: saveplace and friends
> 
> Hi
>
> I used such a functionality a long time ago and now again I think it
> would come in handy:
>
> Saveplace (or friends).
>
>
> That is when I exit emacs I want it to save the
> place of the cursor of the buffers which where open at that moment.
>
> I thought that recentfiles provides such a functionality but it does not
> at least not for GNU emacs 25.1.5.
>
> I tried out
>
> (require 'saveplace)
> (setq-default save-place t)
>
> But it did not work neither.
>
> Anybody has a different suggestion?
>
> thanks
>
> Uwe Brauer
>
>
>

-- 




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

* Re: saveplace and friends
  2016-08-09 18:59 ` Jude DaShiell
@ 2016-08-10 14:24   ` Eli Zaretskii
  0 siblings, 0 replies; 14+ messages in thread
From: Eli Zaretskii @ 2016-08-10 14:24 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Tue, 9 Aug 2016 14:59:55 -0400 (EDT)
> From: Jude DaShiell <jdashiel@panix.com>
> 
> save-place hasn't worked in 24.5 either.

It does for me.  Maybe you also forgot to turn on the mode.



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

end of thread, other threads:[~2016-08-10 14:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-09  7:51 saveplace and friends Uwe Brauer
2016-08-09 12:36 ` Narendra Joshi
2016-08-09 14:52   ` Uwe Brauer
2016-08-09 13:31 ` Alexis
2016-08-09 14:50   ` Uwe Brauer
2016-08-09 15:04     ` Kaushal Modi
2016-08-09 15:05     ` Eli Zaretskii
2016-08-09 15:03   ` Eli Zaretskii
2016-08-09 15:07     ` Stefan Monnier
2016-08-09 15:16       ` Uwe Brauer
2016-08-09 16:57         ` Stefan Monnier
2016-08-09 15:11     ` Uwe Brauer
2016-08-09 18:59 ` Jude DaShiell
2016-08-10 14:24   ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).