Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Changes in emacs.el
@ 2012-10-31 11:06 Cecil Westerhof
  2012-10-31 13:45 ` Michael Heerdegen
       [not found] ` <mailman.12055.1351691121.855.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Cecil Westerhof @ 2012-10-31 11:06 UTC (permalink / raw)
  To: info-gnus-english

I made an earlier comment about this, but I did some investigation
now.

Sometimes I get a message that .emacs is read-only. This is true,
because it is a link to an emacs.el file that is owned by root and
read-only for the user.
I get the question: do you want to write? If I say yes, it fails and
my message/article is not send. If I say no it is also not send.

I could live with it, because when I try to send it again, it
succeeds. But annoying it is.

When looking more closely I found that two things are changed.

I have a custom-set-variables section and beside changing the sequence
it adds (beside other things):
      ;; custom-set-variables was added by Custom.
      ;; If you edit it by hand, you could mess it up, so be careful.
      ;; Your init file should contain only one such instance.
      ;; If there is more than one, they won't work right.
     '(canlock-password "…")
     '(delete-selection-mode nil)
     '(mark-even-if-inactive t)

It also adds:
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

I do not have a custom-set-faces in the emacs.el.

Why does emacs tries to change .emacs and can I circumvebt this?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Changes in emacs.el
  2012-10-31 11:06 Changes in emacs.el Cecil Westerhof
@ 2012-10-31 13:45 ` Michael Heerdegen
       [not found] ` <mailman.12055.1351691121.855.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Heerdegen @ 2012-10-31 13:45 UTC (permalink / raw)
  To: info-gnus-english

Cecil Westerhof <Cecil@decebal.nl> writes:

> Sometimes I get a message that .emacs is read-only. This is true,
> because it is a link to an emacs.el file that is owned by root and
> read-only for the user.
> I get the question: do you want to write? If I say yes, it fails and
> my message/article is not send. If I say no it is also not send.
>
> I could live with it, because when I try to send it again, it
> succeeds. But annoying it is.
>
> When looking more closely I found that two things are changed.
>
> I have a custom-set-variables section and beside changing the sequence
> it adds (beside other things):
>       ;; custom-set-variables was added by Custom.
>       ;; If you edit it by hand, you could mess it up, so be careful.
>       ;; Your init file should contain only one such instance.
>       ;; If there is more than one, they won't work right.
>      '(canlock-password "…")
>      '(delete-selection-mode nil)
>      '(mark-even-if-inactive t)
>
> It also adds:
> (custom-set-faces
>   ;; custom-set-faces was added by Custom.
>   ;; If you edit it by hand, you could mess it up, so be careful.
>   ;; Your init file should contain only one such instance.
>   ;; If there is more than one, they won't work right.
>  )
>
> I do not have a custom-set-faces in the emacs.el.
>
> Why does emacs tries to change .emacs and can I circumvebt this?

I think you must only set `custom-file'.  From the doc:

| File used for storing customization information.
| The default is nil, which means to use your init file
| as specified by `user-init-file'.  If the value is not nil,
| it should be an absolute file name.


Regards,

Michael.

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Changes in emacs.el
       [not found] ` <mailman.12055.1351691121.855.info-gnus-english@gnu.org>
@ 2012-10-31 17:16   ` Cecil Westerhof
  2012-11-01 19:40     ` Michael Heerdegen
  2012-12-26 23:36     ` Cecil Westerhof
  0 siblings, 2 replies; 5+ messages in thread
From: Cecil Westerhof @ 2012-10-31 17:16 UTC (permalink / raw)
  To: info-gnus-english

Op woensdag 31 okt 2012 14:45 CET schreef Michael Heerdegen:

>> Sometimes I get a message that .emacs is read-only. This is true,
>> because it is a link to an emacs.el file that is owned by root and
>> read-only for the user.
>> I get the question: do you want to write? If I say yes, it fails and
>> my message/article is not send. If I say no it is also not send.
>>
>> I could live with it, because when I try to send it again, it
>> succeeds. But annoying it is.
>>
>> When looking more closely I found that two things are changed.
>>
>> I have a custom-set-variables section and beside changing the sequence
>> it adds (beside other things):
>> ;; custom-set-variables was added by Custom.
>> ;; If you edit it by hand, you could mess it up, so be careful.
>> ;; Your init file should contain only one such instance.
>> ;; If there is more than one, they won't work right.
>> '(canlock-password "…")
>> '(delete-selection-mode nil)
>> '(mark-even-if-inactive t)
>>
>> It also adds:
>> (custom-set-faces
>> ;; custom-set-faces was added by Custom.
>> ;; If you edit it by hand, you could mess it up, so be careful.
>> ;; Your init file should contain only one such instance.
>> ;; If there is more than one, they won't work right.
>> )
>>
>> I do not have a custom-set-faces in the emacs.el.
>>
>> Why does emacs tries to change .emacs and can I circumvebt this?
>
> I think you must only set `custom-file'.  From the doc:
>
> | File used for storing customization information.
> | The default is nil, which means to use your init file
> | as specified by `user-init-file'.  If the value is not nil,
> | it should be an absolute file name.

I now added:
    (setq custom-file "~/.emacs.d/.emacs-custom.el")
    (load custom-file t nil t t)

There is only one problem:
    ;; Your init file should contain only one such instance.

Now there will be two. I will see if this is going to give problems.


Also: why does Emacs do this? I never do anything with custom.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Changes in emacs.el
  2012-10-31 17:16   ` Cecil Westerhof
@ 2012-11-01 19:40     ` Michael Heerdegen
  2012-12-26 23:36     ` Cecil Westerhof
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Heerdegen @ 2012-11-01 19:40 UTC (permalink / raw)
  To: info-gnus-english; +Cc: Cecil

Cecil Westerhof <Cecil@decebal.nl> writes:

> I now added:
>     (setq custom-file "~/.emacs.d/.emacs-custom.el")
>     (load custom-file t nil t t)
>
> There is only one problem:
>     ;; Your init file should contain only one such instance.
>
> Now there will be two. I will see if this is going to give problems.

If you have a separate custom file, your init file can contain as much
`custom-set-variables' or `custom-set-faces' as you want, AFAIK.  The
limitation only exists so that Emacs can automatically edit it and can
be sure it doesn't miss anything.  If you have a separate custom file,
you can do what you want in your init file, because it's then not
subject to automatic editing.

Of course, it would be better style to avoid `custom-set-variables' in
your init file and use standard Elisp instead (I mean `setq',
`setq-default' etc.).

> Also: why does Emacs do this? I never do anything with custom.

I know that some code in vanilla Emacs or third party packages use the
customization file for storing settings.  You need not use the
customization interface for this to happen.  It is arguable if this is
always necessary, but I can live with it.

In your case, this was the apparently the cause:

  Gnus supports Cancel Locks in News.
 
  This means a header `Cancel-Lock' is inserted in news
  posting.  It is used to determine if you wrote an article or
  not (for canceling and superseding).  Gnus generates a random
  password string the first time you post a message, and saves
  it in your `~/.emacs' using the Custom system.  While the
  variable is called `canlock-password', it is not security
  sensitive data.  Publishing your canlock string on the web
  will not allow anyone to be able to anything she could not
  already do.  The behavior can be changed by customizing
  `message-insert-canlock'.



Regards,

Michael.

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

* Re: Changes in emacs.el
  2012-10-31 17:16   ` Cecil Westerhof
  2012-11-01 19:40     ` Michael Heerdegen
@ 2012-12-26 23:36     ` Cecil Westerhof
  1 sibling, 0 replies; 5+ messages in thread
From: Cecil Westerhof @ 2012-12-26 23:36 UTC (permalink / raw)
  To: info-gnus-english

Op woensdag 31 okt 2012 18:16 CET schreef Cecil Westerhof:

>>> Why does emacs tries to change .emacs and can I circumvebt this?
>>
>> I think you must only set `custom-file'.  From the doc:
>>
>> | File used for storing customization information.
>> | The default is nil, which means to use your init file
>> | as specified by `user-init-file'.  If the value is not nil,
>> | it should be an absolute file name.
>
> I now added:
> (setq custom-file "~/.emacs.d/.emacs-custom.el")
> (load custom-file t nil t t)

It looks like my problem is solved. I did not get the error anymore.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

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

end of thread, other threads:[~2012-12-26 23:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-31 11:06 Changes in emacs.el Cecil Westerhof
2012-10-31 13:45 ` Michael Heerdegen
     [not found] ` <mailman.12055.1351691121.855.info-gnus-english@gnu.org>
2012-10-31 17:16   ` Cecil Westerhof
2012-11-01 19:40     ` Michael Heerdegen
2012-12-26 23:36     ` Cecil Westerhof

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 NNTP newsgroup(s).