all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* customize messing up .emacs symlink?
@ 2004-03-02  2:00 Ed L Cashin
  2004-03-02  4:03 ` D. D. Brierton
  2004-03-02 18:52 ` Kevin Rodgers
  0 siblings, 2 replies; 10+ messages in thread
From: Ed L Cashin @ 2004-03-02  2:00 UTC (permalink / raw)


Hi.  I have a .emacs file under version control and symlinked into my
home directory.  Every once in a while, emacs replaces my symlink and
creates a regular file.

Just now I sent some usenet news and saw a message flash by:

  Wrote /home/ecashin/.emacs
  Sending news via news.gmane.org using nntp...
  Opening nnimap server on 127.0.0.1...

The difference between the old .emacs and the impostor is shown
below.  It leads me to suspect that the customize code of the two
emacs versions I use are competing.  

I wish they would leave .emacs alone, since I edit it myself and like
the symlink.


--- svnfiles/homedir/.emacs	Mon Mar  1 15:35:37 2004
+++ .emacs	Mon Mar  1 20:28:28 2004
@@ -838,7 +838,10 @@
   (error
    (message "Cannot initialize bbdb %s" (cdr err))))
 
-(custom-set-faces)
+(custom-set-faces
+  ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
+  ;; Your init file should contain only one such instance.
+ )
 
 ;;; auto-compression-mode means turn on automatic decompression of
 ;; visited files, e.g., *tar.gz files, so that tar-mode can work!
@@ -1001,8 +1004,11 @@
   (add-to-list 'auto-mode-alist '("\\.goo$" . goo-mode))
   (setq goo-program-name "/inst/bin/goo"))
 (custom-set-variables
- '(load-home-init-file t t)
- '(gnuserv-program (concat exec-directory "/gnuserv")))
+  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
+  ;; Your init file should contain only one such instance.
+ '(canlock-password "b386d1cc17f438e9c8bc963815439d94adbd6244")
+ '(gnuserv-program (concat exec-directory "/gnuserv"))
+ '(load-home-init-file t t))
 
 (defun mips-asm-mode ()
   "asm mode with adjusted defaults for use MIPS asm."


-- 
--Ed L Cashin     PGP public key: http://noserose.net/e/pgp/

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

* Re: customize messing up .emacs symlink?
  2004-03-02  2:00 customize messing up .emacs symlink? Ed L Cashin
@ 2004-03-02  4:03 ` D. D. Brierton
  2004-03-02 15:09   ` Ed L Cashin
  2004-03-02 18:52 ` Kevin Rodgers
  1 sibling, 1 reply; 10+ messages in thread
From: D. D. Brierton @ 2004-03-02  4:03 UTC (permalink / raw)


On Mon, 01 Mar 2004 21:00:51 -0500, Ed L Cashin wrote:

> Hi.  I have a .emacs file under version control and symlinked into my
> home directory.  Every once in a while, emacs replaces my symlink and
> creates a regular file.
> 
> Just now I sent some usenet news and saw a message flash by:
> 
>   Wrote /home/ecashin/.emacs
>   Sending news via news.gmane.org using nntp...
>   Opening nnimap server on 127.0.0.1...
> 
> The difference between the old .emacs and the impostor is shown
> below.  It leads me to suspect that the customize code of the two
> emacs versions I use are competing.  

Put your (two) customizations in (two) separate filesto .emacs. I don't
know which two versions of emacs you use. But assuming its Xemacs vs.
Emacs, put at the end of your .emacs something like (excuse my probably
crappy and very-unlisp-like lisp):

(if (string-match "XEmacs" emacs-version)
    (load "~/.xemacs.customize.el")
  (load "~/.emacs.customize.el"))

Each separate customize file will need to have a customization for
custom-file in it:

(custom-set-variables
  ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
  ;; Your init file should contain only one such instance.
  [...]
  '(custom-file "<thisfilename>")
  [...]

Presumably you don't want to keep your customizations in CVS, or do you?

Best, Darren

-- 
======================================================================
D. D. Brierton            darren@dzr-web.com           www.dzr-web.com
       Trying is the first step towards failure (Homer Simpson)
======================================================================

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

* Re: customize messing up .emacs symlink?
  2004-03-02  4:03 ` D. D. Brierton
@ 2004-03-02 15:09   ` Ed L Cashin
  2004-03-02 15:36     ` D. D. Brierton
  2004-03-02 16:24     ` Floyd L. Davidson
  0 siblings, 2 replies; 10+ messages in thread
From: Ed L Cashin @ 2004-03-02 15:09 UTC (permalink / raw)


"D. D. Brierton" <darren@dzr-web.com> writes:

> On Mon, 01 Mar 2004 21:00:51 -0500, Ed L Cashin wrote:
>
>> Hi.  I have a .emacs file under version control and symlinked into my
>> home directory.  Every once in a while, emacs replaces my symlink and
>> creates a regular file.
>> 
>> Just now I sent some usenet news and saw a message flash by:
>> 
>>   Wrote /home/ecashin/.emacs
>>   Sending news via news.gmane.org using nntp...
>>   Opening nnimap server on 127.0.0.1...
>> 
>> The difference between the old .emacs and the impostor is shown
>> below.  It leads me to suspect that the customize code of the two
>> emacs versions I use are competing.  
>
> Put your (two) customizations in (two) separate filesto .emacs. I don't
> know which two versions of emacs you use. 

They are (with formatting addeded) ...

  GNU Emacs 21.2.1
  (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars) 
  of 2002-\03-22 on raven, modified by Debian

and

  GNU Emacs 21.2.1
  (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars) 
  of 2002-03-22 on raven, modified by Debian

Maybe it's some add-on that is on one machine and not the other.  I
ought to do a little more digging and create a bug report.  

To me it seems wrong for the default behavior of customize to be like
this, replacing a symlinked .emacs file with a modified regular file.
Does anyone know if this feature has been discussed to death already,
or would it be good to submit a bug report?

> But assuming its Xemacs vs.
> Emacs, put at the end of your .emacs something like (excuse my probably
> crappy and very-unlisp-like lisp):
>
> (if (string-match "XEmacs" emacs-version)
>     (load "~/.xemacs.customize.el")
>   (load "~/.emacs.customize.el"))

Looks like a good solution for me.

> Each separate customize file will need to have a customization for
> custom-file in it:
>
> (custom-set-variables
>   ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
>   ;; Your init file should contain only one such instance.
>   [...]
>   '(custom-file "<thisfilename>")
>   [...]

I think it's mildly offensive that the comment says "don't edit this".

> Presumably you don't want to keep your customizations in CVS, or do you?

I'm using svn, the successor to cvs.  It's great.

To be honest, I have always tried to avoid customize entirely, since I
can get far with an apropos search, reading docs, and putting some
lisp in .emacs.  So I don't know whether I'd want different
customizations on different machines.  I already set things up
differently in .emacs based on host name.

-- 
--Ed L Cashin     PGP public key: http://noserose.net/e/pgp/

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

* Re: customize messing up .emacs symlink?
  2004-03-02 15:09   ` Ed L Cashin
@ 2004-03-02 15:36     ` D. D. Brierton
  2004-03-02 18:06       ` Ed L Cashin
  2004-03-02 16:24     ` Floyd L. Davidson
  1 sibling, 1 reply; 10+ messages in thread
From: D. D. Brierton @ 2004-03-02 15:36 UTC (permalink / raw)


On Tue, 02 Mar 2004 10:09:07 -0500, Ed L Cashin wrote:

> They are (with formatting addeded) ...
> 
>   GNU Emacs 21.2.1
>   (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars) 
>   of 2002-\03-22 on raven, modified by Debian
> 
> and
> 
>   GNU Emacs 21.2.1
>   (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars) 
>   of 2002-03-22 on raven, modified by Debian
> 
> Maybe it's some add-on that is on one machine and not the other.  I
> ought to do a little more digging and create a bug report.  

Ahhh. I'd misunderstood you. I thought you meant that you were running two
different emacsen on the same box, but rather the problem seems to be with
two identical emacsen on different boxes.

> To me it seems wrong for the default behavior of customize to be like
> this, replacing a symlinked .emacs file with a modified regular file.

Yes, I'd agree, although I suppose it depends on what the symlink is to --
is it something very exotic, like a pointer via a virtual-file-system
directly into your version constrol repository? (Perhaps that's not
possible. Perhaps it is possible and not at all exotic.)

> Does anyone know if this feature has been discussed to death already,
> or would it be good to submit a bug report?

I haven't seen it mentioned before, and I lurk here a lot, and regular
browse the web archive of the developers' list.

>> But assuming its Xemacs vs.
>> Emacs, put at the end of your .emacs something like (excuse my probably
>> crappy and very-unlisp-like lisp):
>>
>> (if (string-match "XEmacs" emacs-version)
>>     (load "~/.xemacs.customize.el")
>>   (load "~/.emacs.customize.el"))
> 
> Looks like a good solution for me.
> 
>> Each separate customize file will need to have a customization for
>> custom-file in it:
>>
>> (custom-set-variables
>>   ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
>>   ;; Your init file should contain only one such instance.
>>   [...]
>>   '(custom-file "<thisfilename>")
>>   [...]
> 
> I think it's mildly offensive that the comment says "don't edit this".

Yes -- I deliberately left that part in! :-)

>> Presumably you don't want to keep your customizations in CVS, or do you?
> 
> I'm using svn, the successor to cvs.  It's great.
> 
> To be honest, I have always tried to avoid customize entirely, since I
> can get far with an apropos search, reading docs, and putting some
> lisp in .emacs.  So I don't know whether I'd want different
> customizations on different machines.  I already set things up
> differently in .emacs based on host name.

But I though you said in your original post that it was customize which
was causing the problem. I don't know of anything else which attempts to
write stuff directly into your .emacs, although I don't use GNUS.

Best, Darren

-- 
======================================================================
D. D. Brierton            darren@dzr-web.com           www.dzr-web.com
       Trying is the first step towards failure (Homer Simpson)
======================================================================

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

* Re: customize messing up .emacs symlink?
  2004-03-02 15:09   ` Ed L Cashin
  2004-03-02 15:36     ` D. D. Brierton
@ 2004-03-02 16:24     ` Floyd L. Davidson
  2004-03-03  0:55       ` Ed L Cashin
  1 sibling, 1 reply; 10+ messages in thread
From: Floyd L. Davidson @ 2004-03-02 16:24 UTC (permalink / raw)


Ed L Cashin <ecashin@uga.edu> wrote:
>"D. D. Brierton" <darren@dzr-web.com> writes:
>> On Mon, 01 Mar 2004 21:00:51 -0500, Ed L Cashin wrote:
>>
>>> Hi.  I have a .emacs file under version control and symlinked into my
>>> home directory.  Every once in a while, emacs replaces my symlink and
>>> creates a regular file.
>>>
>>> Just now I sent some usenet news and saw a message flash by:
>>>
>>>   Wrote /home/ecashin/.emacs
>>>   Sending news via news.gmane.org using nntp...
>>>   Opening nnimap server on 127.0.0.1...
>>>
>>> The difference between the old .emacs and the impostor is shown
>>> below.  It leads me to suspect that the customize code of the two
>>> emacs versions I use are competing.
>>
>> Put your (two) customizations in (two) separate filesto .emacs. I don't
>> know which two versions of emacs you use.
>
>They are (with formatting addeded) ...
>
>  GNU Emacs 21.2.1
>  (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars)
>  of 2002-\03-22 on raven, modified by Debian
>
>and
>
>  GNU Emacs 21.2.1
>  (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars)
>  of 2002-03-22 on raven, modified by Debian

Apparently (unless that is an editing error) the two are the
same.  It appears there is more to this...  as in, you are
talking about two separate machines (but not really two versions
of Emacs) that might be (?) sharing a filesystem which is
network mounted for /home ?  Or else the ~/.emacs is symlinked
to a network mounted file system?

>Maybe it's some add-on that is on one machine and not the other.  I
>ought to do a little more digging and create a bug report.
>
>To me it seems wrong for the default behavior of customize to be like
>this, replacing a symlinked .emacs file with a modified regular file.
>Does anyone know if this feature has been discussed to death already,
>or would it be good to submit a bug report?
>
>> But assuming its Xemacs vs.
>> Emacs, put at the end of your .emacs something like (excuse my probably
>> crappy and very-unlisp-like lisp):
>>
>> (if (string-match "XEmacs" emacs-version)
>>     (load "~/.xemacs.customize.el")
>>   (load "~/.emacs.customize.el"))

That can also be based on finer parts of the version than just
the base name too.  However, it appears that what you need is
something based on the host your process is running on.

  (if (string-match "foo.a" (system-name))
      (load "~/.fooa.custom.el")
     (if  (string-match "foo.b" (system-name))
         (load "~/.foob.custom.el")
        (if  (string-match "foo.c" (system-name))
            (load "~/.fooc.custom.el")
           (if  (string-match "foo.d" (system-name))
               (load "~/.food.custom.el")
              ;; otherwise, this is the default
              (load "~/.fooe.custom.el")))))

Obviously that can be extended or trimmed to match however
large your network happens to be.  It can also be based on
virtually any environment or shell variable you might wish
to use, even one you locally define.

  (if (string-match "foo.a" (getenv "HOSTNAME")))
      (load "~/.fooa.custom.el")
   ...

is essentially the same as using (system-name), and you could
use (getenv "USER") or whatever is needed.

Note that (string-match) is looking for a substring, and is not
concerned with the entire string, so searching for "foo" will
return true in both "foo.com" and "foo.bar.com".  But the
pattern is a regular expression, so you could search for
"^bar.com$" and it would not return true for "foo.bar.com".

>Looks like a good solution for me.
>
>> Each separate customize file will need to have a customization for
>> custom-file in it:
>>
>> (custom-set-variables
>>   ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
>>   ;; Your init file should contain only one such instance.
>>   [...]
>>   '(custom-file "<thisfilename>")
>>   [...]
>
>I think it's mildly offensive that the comment says "don't edit this".

Hmmm... maybe that's what is causing ..., nah, couldn't be,
right?  :-)

--
Floyd L. Davidson           <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com

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

* Re: customize messing up .emacs symlink?
  2004-03-02 15:36     ` D. D. Brierton
@ 2004-03-02 18:06       ` Ed L Cashin
  0 siblings, 0 replies; 10+ messages in thread
From: Ed L Cashin @ 2004-03-02 18:06 UTC (permalink / raw)


"D. D. Brierton" <darren@dzr-web.com> writes:

...
> Ahhh. I'd misunderstood you. I thought you meant that you were running two
> different emacsen on the same box, but rather the problem seems to be with
> two identical emacsen on different boxes.

Re-reading my original post, I now realize that I was not at all clear
about that.  I use svn to keep track of some files that are the same
across all the machines I use.  My .emacs file is one such file.

>> To me it seems wrong for the default behavior of customize to be like
>> this, replacing a symlinked .emacs file with a modified regular file.
>
> Yes, I'd agree, although I suppose it depends on what the symlink is to --
> is it something very exotic, like a pointer via a virtual-file-system
> directly into your version constrol repository? (Perhaps that's not
> possible. Perhaps it is possible and not at all exotic.)

No, it points to a regular file in a working copy of a directory in
the repository. 

>> Does anyone know if this feature has been discussed to death already,
>> or would it be good to submit a bug report?
>
> I haven't seen it mentioned before, and I lurk here a lot, and regular
> browse the web archive of the developers' list.

I'd say it's a bug, but it's kind of a trivial matter, and if it isn't
bothering others, I'll just work around it.

>>> But assuming its Xemacs vs.
>>> Emacs, put at the end of your .emacs something like (excuse my probably
>>> crappy and very-unlisp-like lisp):
>>>
>>> (if (string-match "XEmacs" emacs-version)
>>>     (load "~/.xemacs.customize.el")
>>>   (load "~/.emacs.customize.el"))
>> 
>> Looks like a good solution for me.

Something even more simple is the .emacs file below, a regular file on
both machines, changable by customize without problem:

  ;;;; .emacs
  (load "~/svnfiles/homedir/.emacs")
 
-- 
--Ed L Cashin     PGP public key: http://noserose.net/e/pgp/

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

* Re: customize messing up .emacs symlink?
  2004-03-02  2:00 customize messing up .emacs symlink? Ed L Cashin
  2004-03-02  4:03 ` D. D. Brierton
@ 2004-03-02 18:52 ` Kevin Rodgers
  2004-03-03  0:59   ` Ed L Cashin
  1 sibling, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2004-03-02 18:52 UTC (permalink / raw)


Ed L Cashin wrote:

> Hi.  I have a .emacs file under version control and symlinked into my
> home directory.  Every once in a while, emacs replaces my symlink and
> creates a regular file.
> 
> Just now I sent some usenet news and saw a message flash by:
> 
>   Wrote /home/ecashin/.emacs
>   Sending news via news.gmane.org using nntp...
>   Opening nnimap server on 127.0.0.1...
> 
> The difference between the old .emacs and the impostor is shown
> below.  It leads me to suspect that the customize code of the two
> emacs versions I use are competing.  
> 
> I wish they would leave .emacs alone, since I edit it myself and like
> the symlink.

(setq custom-file "~/emacs.custom")

-- 
Kevin Rodgers

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

* Re: customize messing up .emacs symlink?
  2004-03-02 16:24     ` Floyd L. Davidson
@ 2004-03-03  0:55       ` Ed L Cashin
  2004-03-03  1:02         ` Jesper Harder
  0 siblings, 1 reply; 10+ messages in thread
From: Ed L Cashin @ 2004-03-03  0:55 UTC (permalink / raw)


floyd@barrow.com (Floyd L. Davidson) writes:

...
>   (if (string-match "foo.a" (system-name))
>       (load "~/.fooa.custom.el")
>      (if  (string-match "foo.b" (system-name))
>          (load "~/.foob.custom.el")
>         (if  (string-match "foo.c" (system-name))
>             (load "~/.fooc.custom.el")
>            (if  (string-match "foo.d" (system-name))
>                (load "~/.food.custom.el")
>               ;; otherwise, this is the default
>               (load "~/.fooe.custom.el")))))

Thanks.  Something nice for that kind of lisp is "cond".

;;; host-specific configuration
(let ((host (system-name)))
  (if host
      (cond ((equal host "nilda")
	     (set-background-color "SteelBlue4"))
	    ((equal host "tougas")
	     (progn
	       (set-background-color "ivory4")
	       (set-cursor-color "plum")))
	    ((equal host "marblerye.cs.uga.edu")
	     (progn
	       (set-background-color "DarkSlateGray")
	       (set-cursor-color "Orchid")))
	    ((equal host "tornado")
	     (progn
	       (set-background-color "SlateGray")
	       (set-foreground-color "wheat")
	       (set-cursor-color "magenta")))
	    (t
	     (if (getenv "GNUS_EMACS")
		 (set-background-color "DarkSlateGray")
		 (set-background-color "SlateGray"))))))


-- 
--Ed L Cashin     PGP public key: http://noserose.net/e/pgp/

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

* Re: customize messing up .emacs symlink?
  2004-03-02 18:52 ` Kevin Rodgers
@ 2004-03-03  0:59   ` Ed L Cashin
  0 siblings, 0 replies; 10+ messages in thread
From: Ed L Cashin @ 2004-03-03  0:59 UTC (permalink / raw)


Kevin Rodgers <ihs_4664@yahoo.com> writes:

> Ed L Cashin wrote:
>
>> Hi.  I have a .emacs file under version control and symlinked into my
>> home directory.  Every once in a while, emacs replaces my symlink and
>> creates a regular file.
>> Just now I sent some usenet news and saw a message flash by:
>>   Wrote /home/ecashin/.emacs
>>   Sending news via news.gmane.org using nntp...
>>   Opening nnimap server on 127.0.0.1...
>> The difference between the old .emacs and the impostor is shown
>> below.  It leads me to suspect that the customize code of the two
>> emacs versions I use are competing.  I wish they would leave .emacs
>> alone, since I edit it myself and like
>> the symlink.
>
> (setq custom-file "~/emacs.custom")

Thanks much!  I think that should be the default, though.

-- 
--Ed L Cashin     PGP public key: http://noserose.net/e/pgp/

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

* Re: customize messing up .emacs symlink?
  2004-03-03  0:55       ` Ed L Cashin
@ 2004-03-03  1:02         ` Jesper Harder
  0 siblings, 0 replies; 10+ messages in thread
From: Jesper Harder @ 2004-03-03  1:02 UTC (permalink / raw)


Ed L Cashin <ecashin@uga.edu> writes:

> Something nice for that kind of lisp is "cond".
>
>       (cond ((equal host "nilda")
> 	     (set-background-color "SteelBlue4"))
> 	    ((equal host "tougas")
> 	     (progn
> 	       (set-background-color "ivory4")
> 	       (set-cursor-color "plum")))
>               ...)))

You can dispense with the progns to make even nicer:

(cond ((equal host "nilda")
       (set-background-color "SteelBlue4"))
      ((equal host "tougas")
	 (set-background-color "ivory4")
	 (set-cursor-color "plum")))
      ...)

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

end of thread, other threads:[~2004-03-03  1:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-02  2:00 customize messing up .emacs symlink? Ed L Cashin
2004-03-02  4:03 ` D. D. Brierton
2004-03-02 15:09   ` Ed L Cashin
2004-03-02 15:36     ` D. D. Brierton
2004-03-02 18:06       ` Ed L Cashin
2004-03-02 16:24     ` Floyd L. Davidson
2004-03-03  0:55       ` Ed L Cashin
2004-03-03  1:02         ` Jesper Harder
2004-03-02 18:52 ` Kevin Rodgers
2004-03-03  0:59   ` Ed L Cashin

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.