* desktop-files-not-to-save ignored for tramp files
@ 2009-02-20 15:09 Nurullah Akkaya
2009-02-20 16:05 ` Juanma Barranquero
2009-02-20 17:27 ` Thierry Volpiatto
0 siblings, 2 replies; 7+ messages in thread
From: Nurullah Akkaya @ 2009-02-20 15:09 UTC (permalink / raw)
To: Emacs Help List
[-- Attachment #1: Type: text/plain, Size: 686 bytes --]
I edit various files using tramp, i am on a slow connection thus want to
avoid saving remote files while exiting.
the default value for desktop-files-not-to-save is "^/[^/:]*:" when i check
the regex using list buffers it does match tramp files
but they are still saved when i exit emacs. is there another way to make
desktop-mode skip tramp files?
i have the following in my .emacs for loading desktop.
;;destop mode
(load "desktop")
(desktop-load-default)
;(desktop-read)
;; automatically save the desktop on exit.
(setq desktop-enable t)
;;save where we left cursor in file on kill
(require 'saveplace)
(setq-default save-place t)
thanks...
--
Nurullah Akkaya
http://nakkaya.com
[-- Attachment #2: Type: text/html, Size: 823 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: desktop-files-not-to-save ignored for tramp files
2009-02-20 15:09 desktop-files-not-to-save ignored for tramp files Nurullah Akkaya
@ 2009-02-20 16:05 ` Juanma Barranquero
2009-02-20 16:18 ` Nurullah Akkaya
2009-02-20 17:27 ` Thierry Volpiatto
1 sibling, 1 reply; 7+ messages in thread
From: Juanma Barranquero @ 2009-02-20 16:05 UTC (permalink / raw)
To: Nurullah Akkaya; +Cc: Emacs Help List
On Fri, Feb 20, 2009 at 16:09, Nurullah Akkaya
<nurullah.akkaya@blooby.com> wrote:
> I edit various files using tramp, i am on a slow connection thus want to
> avoid saving remote files while exiting.
> the default value for desktop-files-not-to-save is "^/[^/:]*:" when i check
> the regex using list buffers it does match tramp files
> but they are still saved when i exit emacs. is there another way to make
> desktop-mode skip tramp files?
Which version of Emacs are you using?
Are you using a single .emacs.desktop (perhaps in ~/), or
directory-specific ones?
Could you show us the contents of .emacs.desktop? (Assuming it does
not contain sensitive information, of course :-)
> i have the following in my .emacs for loading desktop.
>
> ;;destop mode
> (load "desktop")
> (desktop-load-default)
> ;(desktop-read)
> ;; automatically save the desktop on exit.
> (setq desktop-enable t)
If you're using Emacs 22.1 or newer, you could replace all the above with:
;; desktop mode
(desktop-save-mode 1)
> ;;save where we left cursor in file on kill
> (require 'saveplace)
> (setq-default save-place t)
This is, at least in theory, unrelated.
Juanma
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: desktop-files-not-to-save ignored for tramp files
2009-02-20 16:05 ` Juanma Barranquero
@ 2009-02-20 16:18 ` Nurullah Akkaya
2009-02-20 17:02 ` Peter Dyballa
0 siblings, 1 reply; 7+ messages in thread
From: Nurullah Akkaya @ 2009-02-20 16:18 UTC (permalink / raw)
Cc: Emacs Help List
[-- Attachment #1.1: Type: text/plain, Size: 1469 bytes --]
On Fri, Feb 20, 2009 at 6:05 PM, Juanma Barranquero <lekktu@gmail.com>wrote:
> On Fri, Feb 20, 2009 at 16:09, Nurullah Akkaya
> <nurullah.akkaya@blooby.com> wrote:
>
> > I edit various files using tramp, i am on a slow connection thus want to
> > avoid saving remote files while exiting.
> > the default value for desktop-files-not-to-save is "^/[^/:]*:" when i
> check
> > the regex using list buffers it does match tramp files
> > but they are still saved when i exit emacs. is there another way to make
> > desktop-mode skip tramp files?
>
> Which version of Emacs are you using?
> Are you using a single .emacs.desktop (perhaps in ~/), or
> directory-specific ones?
> Could you show us the contents of .emacs.desktop? (Assuming it does
> not contain sensitive information, of course :-)
>
> > i have the following in my .emacs for loading desktop.
> >
> > ;;destop mode
> > (load "desktop")
> > (desktop-load-default)
> > ;(desktop-read)
> > ;; automatically save the desktop on exit.
> > (setq desktop-enable t)
>
> If you're using Emacs 22.1 or newer, you could replace all the above with:
>
> ;; desktop mode
> (desktop-save-mode 1)
>
> > ;;save where we left cursor in file on kill
> > (require 'saveplace)
> > (setq-default save-place t)
>
> This is, at least in theory, unrelated.
>
> Juanma
>
i am using emacs 20.0.60.1 on OS X.
i am using a single .emacs.desktop file under ~/
i have attached the desktop file.
--
Nurullah Akkaya
http://nakkaya.com
[-- Attachment #1.2: Type: text/html, Size: 2164 bytes --]
[-- Attachment #2: emacs.desktop --]
[-- Type: application/octet-stream, Size: 2420 bytes --]
;; -*- mode: emacs-lisp; coding: emacs-mule; -*-
;; --------------------------------------------------------------------------
;; Desktop File for Emacs
;; --------------------------------------------------------------------------
;; Created Fri Feb 20 18:11:52 2009
;; Desktop file format version 206
;; Emacs version 23.0.60.1
;; Global section:
(setq desktop-missing-file-warning nil)
(setq tags-file-name "/Users/nurullahakkaya/Projects/lacrone/trunk/TAGS")
(setq tags-table-list '("/Users/nurullahakkaya/Projects/lacrone/trunk/TAGS"))
(setq search-ring nil)
(setq regexp-search-ring nil)
(setq register-alist nil)
;; Buffer section -- buffers listed in same order as in buffer list:
(desktop-create-buffer 206
nil
"www"
'dired-mode
nil
206
'(nil nil)
t
'("/scp:nakkaya@nakkaya.com:/")
nil)
(desktop-create-buffer 206
"/Users/nurullahakkaya/.emacs.desktop"
".emacs.desktop"
'emacs-lisp-mode
'(abbrev-mode flyspell-mode)
1
'(nil nil)
nil
nil
'((buffer-file-coding-system . emacs-mule-unix)))
(desktop-create-buffer 206
"/Users/nurullahakkaya/Desktop/Book/book/HeadFirstDesignPatterns.pdf"
"HeadFirstDesignPatterns.pdf"
'doc-view-mode
nil
1
'(nil nil)
t
nil
'((buffer-file-coding-system . no-conversion)))
(desktop-create-buffer 206
"/Users/nurullahakkaya/.emacs"
".emacs"
'emacs-lisp-mode
'(abbrev-mode flyspell-mode)
16311
'(16289 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))
(desktop-create-buffer 206
"/Users/nurullahakkaya/.emacs.d/my-projects.el"
"my-projects.el"
'emacs-lisp-mode
'(abbrev-mode flyspell-mode)
442
'(316 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))
(desktop-create-buffer 206
"/Users/nurullahakkaya/Projects/mocha/trunk/mocha.java"
"mocha.java"
'java-mode
'(abbrev-mode flyspell-mode)
609
'(623 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))
(desktop-create-buffer 206
"/Users/nurullahakkaya/Projects/aristo/trunk/aristo/aristo.java"
"aristo.java"
'java-mode
'(abbrev-mode flyspell-mode)
689
'(8857 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))
(desktop-create-buffer 206
"/Users/nurullahakkaya/Projects/lacrone/trunk/com/lacrone/cluster/Manager.java"
"Manager.java"
'java-mode
'(abbrev-mode flyspell-mode)
1
'(644 nil)
nil
nil
'((buffer-file-coding-system . undecided-unix)))
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: desktop-files-not-to-save ignored for tramp files
2009-02-20 15:09 desktop-files-not-to-save ignored for tramp files Nurullah Akkaya
2009-02-20 16:05 ` Juanma Barranquero
@ 2009-02-20 17:27 ` Thierry Volpiatto
2009-02-21 10:57 ` Michael Albinus
1 sibling, 1 reply; 7+ messages in thread
From: Thierry Volpiatto @ 2009-02-20 17:27 UTC (permalink / raw)
To: help-gnu-emacs
Hi, i send the code i use for that here, i sent it also
to the tramp mailing list yesterday i think.
`desktop-files-not-to-save' never work for me
so i use this code:
,----
| (defun tv-list-tramp-buffer-file-name ()
| (let* ((desktop-info-list (mapcar #'desktop-buffer-info (buffer-list)))
| (tramp-buf-list (loop for i in desktop-info-list
| if (and (listp i)
| (stringp (car (nth 8 i)))
| (string-match "^/su:.*\\|^/sudo:.*\\|^/ssh:.*" (car (nth 8 i))))
| collect (nth 2 i))))
| tramp-buf-list))
|
| (add-hook 'desktop-save-hook #'(lambda ()
| (let ((del-buf-list
| (tv-list-tramp-buffer-file-name)))
| (dolist (i del-buf-list)
| (kill-buffer i)))))
`----
Nurullah Akkaya <nurullah.akkaya@blooby.com> writes:
> I edit various files using tramp, i am on a slow connection thus want to
> avoid saving remote files while exiting.
> the default value for desktop-files-not-to-save is "^/[^/:]*:" when i check
> the regex using list buffers it does match tramp files
> but they are still saved when i exit emacs. is there another way to make
> desktop-mode skip tramp files?
>
> i have the following in my .emacs for loading desktop.
>
> ;;destop mode
> (load "desktop")
> (desktop-load-default)
> ;(desktop-read)
> ;; automatically save the desktop on exit.
> (setq desktop-enable t)
> ;;save where we left cursor in file on kill
> (require 'saveplace)
> (setq-default save-place t)
>
> thanks...
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: desktop-files-not-to-save ignored for tramp files
2009-02-20 17:27 ` Thierry Volpiatto
@ 2009-02-21 10:57 ` Michael Albinus
2009-02-21 11:10 ` Thierry Volpiatto
0 siblings, 1 reply; 7+ messages in thread
From: Michael Albinus @ 2009-02-21 10:57 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: help-gnu-emacs, tramp-devel
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> Hi, i send the code i use for that here, i sent it also
> to the tramp mailing list yesterday i think.
>
> `desktop-files-not-to-save' never work for me
> so i use this code:
Have you tried to debug `desktop-save-buffer-p'?
Best regards, Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: desktop-files-not-to-save ignored for tramp files
2009-02-21 10:57 ` Michael Albinus
@ 2009-02-21 11:10 ` Thierry Volpiatto
0 siblings, 0 replies; 7+ messages in thread
From: Thierry Volpiatto @ 2009-02-21 11:10 UTC (permalink / raw)
To: Michael Albinus; +Cc: help-gnu-emacs, tramp-devel
Michael Albinus <michael.albinus@gmx.de> writes:
> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>
>> Hi, i send the code i use for that here, i sent it also
>> to the tramp mailing list yesterday i think.
>>
>> `desktop-files-not-to-save' never work for me
>> so i use this code:
>
> Have you tried to debug `desktop-save-buffer-p'?
No never, i just did this quick hack for my need, i will have a look to
desktop.el as soon as possible.
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-02-21 11:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20 15:09 desktop-files-not-to-save ignored for tramp files Nurullah Akkaya
2009-02-20 16:05 ` Juanma Barranquero
2009-02-20 16:18 ` Nurullah Akkaya
2009-02-20 17:02 ` Peter Dyballa
2009-02-20 17:27 ` Thierry Volpiatto
2009-02-21 10:57 ` Michael Albinus
2009-02-21 11:10 ` Thierry Volpiatto
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).