emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* all org-buffers modified
@ 2012-08-07 13:54 Joost Helberg
  2012-08-07 14:07 ` Nick Dokos
  0 siblings, 1 reply; 3+ messages in thread
From: Joost Helberg @ 2012-08-07 13:54 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

upon startup of emacs (and load of desktop), all my freshly opened
org-buffers end up being modified. There's no undo information
available and debugging the org-mode function doesn't give me any clue
as (buffer-modified-p) returns false the whole time.

Once in a while (twice a month) I have to stop and start emacs and the
nuisance of answering `y' to all questions about modified buffers.

In my .emacs org-mode is treated very much the same way as txt or tex
buffers, but these don't end up being modified right after initial
load. Also org-startup-align-all-tables and
org-insert-mode-line-in-empty-file are set to off.

Has anyone any clue where to look for a solution as I obviously like
freshly loaded buffers to be not modified.

regards,

Joost

-- 
Snow B.V.        http://snow.nl

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

* Re: all org-buffers modified
  2012-08-07 13:54 all org-buffers modified Joost Helberg
@ 2012-08-07 14:07 ` Nick Dokos
  2012-08-07 14:28   ` Joost Helberg
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2012-08-07 14:07 UTC (permalink / raw)
  To: Joost Helberg; +Cc: emacs-orgmode

Joost Helberg <joost@snow.nl> wrote:

> Hi,
> 
> upon startup of emacs (and load of desktop), all my freshly opened
> org-buffers end up being modified. There's no undo information
> available and debugging the org-mode function doesn't give me any clue
> as (buffer-modified-p) returns false the whole time.
> 

That shouldn't happen (and it does *not* happen in my case): the files are
opened but the buffers are *not* modified. But I'm confused about what
you are saying: (buffer-modified-p) returns nil the whole time, so that meant
they are unmodified. When do they become modified?

> Once in a while (twice a month) I have to stop and start emacs and the
> nuisance of answering `y' to all questions about modified buffers.
> 
> In my .emacs org-mode is treated very much the same way as txt or tex
> buffers, but these don't end up being modified right after initial
> load. Also org-startup-align-all-tables and
> org-insert-mode-line-in-empty-file are set to off.
> 
> Has anyone any clue where to look for a solution as I obviously like
> freshly loaded buffers to be not modified.
> 

That's what I see in any case, so it must be an artifact of your setup.
Have you tried starting with emacs -q and a minimal org init file?
If that works, then bisecting your way through your .emacs seems like
the next step. In particular, starting without loading desktop seems
like a worthwhile experiment.

Nick

> regards,
> 
> Joost
> 
> -- 
> Snow B.V.        http://snow.nl
> 

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

* Re: all org-buffers modified
  2012-08-07 14:07 ` Nick Dokos
@ 2012-08-07 14:28   ` Joost Helberg
  0 siblings, 0 replies; 3+ messages in thread
From: Joost Helberg @ 2012-08-07 14:28 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

Nick,

I did that, but didn't quite get to covering all customizations. It
now turns out that the following makes the symptoms happen:

(add-hook 'org-mode-hook
                    (lambda () (set-buffer-file-coding-system 'utf-8)))

The documentation of set-buffer-file-coding-system clearly states
that it leaves the buffer modified _on purpose_. A third parameter
controls this behaviour.

Hence, my .emacs should contain:

(add-hook 'org-mode-hook
                    (lambda () (set-buffer-file-coding-system 'utf-8 nil t)))

Solved.

regards,

Joost

>>>>> "Nick" == Nick Dokos <nicholas.dokos@hp.com> writes:
 > Subject: Re: [O] all org-buffers modified
 > From: Nick Dokos <nicholas.dokos@hp.com>
 > To: Joost Helberg <joost@snow.nl>
 > cc: emacs-orgmode@gnu.org
 > Date: Tue, 07 Aug 2012 10:07:19 -0400

 > Joost Helberg <joost@snow.nl> wrote:

 >> Hi,
 >> 
 >> upon startup of emacs (and load of desktop), all my freshly opened
 >> org-buffers end up being modified. There's no undo information
 >> available and debugging the org-mode function doesn't give me any clue
 >> as (buffer-modified-p) returns false the whole time.
 >> 

 > That shouldn't happen (and it does *not* happen in my case): the files are
 > opened but the buffers are *not* modified. But I'm confused about what
 > you are saying: (buffer-modified-p) returns nil the whole time, so that meant
 > they are unmodified. When do they become modified?

 >> Once in a while (twice a month) I have to stop and start emacs and the
 >> nuisance of answering `y' to all questions about modified buffers.
 >> 
 >> In my .emacs org-mode is treated very much the same way as txt or tex
 >> buffers, but these don't end up being modified right after initial
 >> load. Also org-startup-align-all-tables and
 >> org-insert-mode-line-in-empty-file are set to off.
 >> 
 >> Has anyone any clue where to look for a solution as I obviously like
 >> freshly loaded buffers to be not modified.
 >> 

 > That's what I see in any case, so it must be an artifact of your setup.
 > Have you tried starting with emacs -q and a minimal org init file?
 > If that works, then bisecting your way through your .emacs seems like
 > the next step. In particular, starting without loading desktop seems
 > like a worthwhile experiment.

 > Nick

 >> regards,
 >> 
 >> Joost
 >> 
 >> -- 
 >> Snow B.V.        http://snow.nl
 >> 


-- 
Snow B.V.        http://snow.nl

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

end of thread, other threads:[~2012-08-07 14:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-07 13:54 all org-buffers modified Joost Helberg
2012-08-07 14:07 ` Nick Dokos
2012-08-07 14:28   ` Joost Helberg

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).