all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* file modified on opening
@ 2006-06-25 17:56 François Gannaz
  2006-06-26 10:50 ` François Gannaz
  2006-06-26 16:52 ` Ehud Karni
  0 siblings, 2 replies; 7+ messages in thread
From: François Gannaz @ 2006-06-25 17:56 UTC (permalink / raw)


Hi,

I'm using a mmm-mode for HTML and PHP files (mixing html-helper-mode,
php-mode, css-mode, etc.). When I open some files, they are marked as
modifed ("**" in status bar), even if I just view them from Dired. Of
course, the content isn't really modified.

There is no visible error, so I can't use debug-on-error. Does anyone
know how I could trace down this annoying behaviour?

I tried to hide the symptoms:
(add-hook 'mmm-mode-hook '(lambda () (set-buffer-modified-p nil)))
but it didn't work.

Thanks
--
François

GNU Emacs 22.0.50.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2006-06-16 on excelsior, modified by Debian

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

* Re: file modified on opening
  2006-06-25 17:56 file modified on opening François Gannaz
@ 2006-06-26 10:50 ` François Gannaz
  2006-06-26 16:52 ` Ehud Karni
  1 sibling, 0 replies; 7+ messages in thread
From: François Gannaz @ 2006-06-26 10:50 UTC (permalink / raw)


Le dim 25 jun 19:56, François Gannaz a écrit :
> Hi,
> 
> I'm using a mmm-mode for HTML and PHP files (mixing html-helper-mode,
> php-mode, css-mode, etc.). When I open some files, they are marked as
> modifed ("**" in status bar), even if I just view them from Dired. Of
> course, the content isn't really modified.
> 
> There is no visible error, so I can't use debug-on-error. Does anyone
> know how I could trace down this annoying behaviour?

BTW, this does not happen with Emacs 21, only with Emacs 22.

Should I post elsewhere, like on a mmm-mode list or an Emacs22 list?

--
François

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

* Re: file modified on opening
  2006-06-25 17:56 file modified on opening François Gannaz
  2006-06-26 10:50 ` François Gannaz
@ 2006-06-26 16:52 ` Ehud Karni
  2006-06-27  9:28   ` François Gannaz
  1 sibling, 1 reply; 7+ messages in thread
From: Ehud Karni @ 2006-06-26 16:52 UTC (permalink / raw)
  Cc: help-gnu-emacs

On Sun, 25 Jun 2006 19:56:15 +0200, Francois Gannaz wrote:
>
> I'm using a mmm-mode for HTML and PHP files (mixing html-helper-mode,
> php-mode, css-mode, etc.). When I open some files, they are marked as
> modifed ("**" in status bar), even if I just view them from Dired. Of
> course, the content isn't really modified.
>
> There is no visible error, so I can't use debug-on-error. Does anyone
> know how I could trace down this annoying behaviour?

You can debug it by doing: M-x debug-on-entry RET find-file
and then C-x C-f <your-problematic-file>

To end debugging, use M-x cancel-debug-on-entry .


Ehud.


--
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry

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

* Re: file modified on opening
  2006-06-26 16:52 ` Ehud Karni
@ 2006-06-27  9:28   ` François Gannaz
  0 siblings, 0 replies; 7+ messages in thread
From: François Gannaz @ 2006-06-27  9:28 UTC (permalink / raw)


Le lun 26 jun 19:52, Ehud Karni a écrit :
> You can debug it by doing: M-x debug-on-entry RET find-file
> and then C-x C-f <your-problematic-file>
> 
> To end debugging, use M-x cancel-debug-on-entry .

Thanks, that helps.

But loading a file with Emacs is a long process, I'll have to learn a
bit more about its debugger, I can't just "step" in the code until I
encounter something fishy. I guess I'll try to learn edebug.

--
François

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

* Re: file modified on opening
@ 2006-06-28 16:43 Mickey Ferguson
  2006-06-28 18:24 ` François Gannaz
  0 siblings, 1 reply; 7+ messages in thread
From: Mickey Ferguson @ 2006-06-28 16:43 UTC (permalink / raw)
  Cc: help-gnu-emacs

>I'm using a mmm-mode for HTML and PHP files (mixing html-helper-mode,
>php-mode, css-mode, etc.). When I open some files, they are marked as
>modifed ("**" in status bar), even if I just view them from Dired. Of
>course, the content isn't really modified.

Is there any chance that something that your .emacs is doing is causing
the butter to be modified?  One example I can think of is if you
automatically enter and exit picture-mode.  A buffer that has any
trailing spaces at the end of a line will then be modified by trimming
the trailing spaces.  Now this is only one possible example, but I would
comment out everything in your .emacs, and then add back in, piece by
piece, until you might find a cause that way.

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

* Re: file modified on opening
  2006-06-28 16:43 Mickey Ferguson
@ 2006-06-28 18:24 ` François Gannaz
  2006-06-28 20:55   ` Kevin Rodgers
  0 siblings, 1 reply; 7+ messages in thread
From: François Gannaz @ 2006-06-28 18:24 UTC (permalink / raw)
  Cc: help-gnu-emacs

Le mer 28 jun 09:43, Mickey Ferguson a écrit :
> >I'm using a mmm-mode for HTML and PHP files (mixing html-helper-mode,
> >php-mode, css-mode, etc.). When I open some files, they are marked as
> >modifed ("**" in status bar), even if I just view them from Dired. Of
> >course, the content isn't really modified.
> 
> Is there any chance that something that your .emacs is doing is causing
> the butter to be modified?  One example I can think of is if you
> automatically enter and exit picture-mode.  A buffer that has any
> trailing spaces at the end of a line will then be modified by trimming
> the trailing spaces.  Now this is only one possible example, but I would
> comment out everything in your .emacs, and then add back in, piece by
> piece, until you might find a cause that way.

At first, I thought it was this, but I've already narrowed my .emacs to

(require 'mmm-mode)
(setq mmm-global-mode 'maybe)
(mmm-add-group
 'fancy-html
  '(
   (html-php-embedded
    :submode php-mode
    :face mmm-code-submode-face
    :front "<\\?\\(php\\)?"
    :back "\\?>")
   ))
(add-to-list 'mmm-mode-ext-classes-alist '(html-helper-mode nil fancy-html))

And with such a tiny config, my file is still tagged as modified (at
least with Emacs22, it's OK with Emacs 21). Maybe it's because of
Debian's initialization, but I doubt it.

I tried debugging the wole process, I even learned to use edebug as the plain
backtracing wasn't enough, but I can't find anything for now. I'll try
debugging once again as I can't think of anything better.

--
François

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

* Re: file modified on opening
  2006-06-28 18:24 ` François Gannaz
@ 2006-06-28 20:55   ` Kevin Rodgers
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin Rodgers @ 2006-06-28 20:55 UTC (permalink / raw)


François Gannaz wrote:
> Le mer 28 jun 09:43, Mickey Ferguson a écrit :
>>> I'm using a mmm-mode for HTML and PHP files (mixing html-helper-mode,
>>> php-mode, css-mode, etc.). When I open some files, they are marked as
>>> modifed ("**" in status bar), even if I just view them from Dired. Of
>>> course, the content isn't really modified.
>> Is there any chance that something that your .emacs is doing is causing
>> the butter to be modified?  One example I can think of is if you
>> automatically enter and exit picture-mode.  A buffer that has any
>> trailing spaces at the end of a line will then be modified by trimming
>> the trailing spaces.  Now this is only one possible example, but I would
>> comment out everything in your .emacs, and then add back in, piece by
>> piece, until you might find a cause that way.

I would suspect that text properties are being added.  Mickey could
find out with `M-: (goto-char (next-property-change (point-min)))'
followed by `C-u C-x ='.

> At first, I thought it was this, but I've already narrowed my .emacs to
> 
> (require 'mmm-mode)
> (setq mmm-global-mode 'maybe)
> (mmm-add-group
>  'fancy-html
>   '(
>    (html-php-embedded
>     :submode php-mode
>     :face mmm-code-submode-face
>     :front "<\\?\\(php\\)?"
>     :back "\\?>")
>    ))
> (add-to-list 'mmm-mode-ext-classes-alist '(html-helper-mode nil fancy-html))
> 
> And with such a tiny config, my file is still tagged as modified (at
> least with Emacs22, it's OK with Emacs 21). Maybe it's because of
> Debian's initialization, but I doubt it.

It's easy enough to check: Start Emacs 22 with the -Q option, then paste
that code into *scratch* and `M-x eval-buffer'.

> I tried debugging the wole process, I even learned to use edebug as the plain
> backtracing wasn't enough, but I can't find anything for now. I'll try
> debugging once again as I can't think of anything better.

-- 
Kevin

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

end of thread, other threads:[~2006-06-28 20:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-25 17:56 file modified on opening François Gannaz
2006-06-26 10:50 ` François Gannaz
2006-06-26 16:52 ` Ehud Karni
2006-06-27  9:28   ` François Gannaz
  -- strict thread matches above, loose matches on Subject: below --
2006-06-28 16:43 Mickey Ferguson
2006-06-28 18:24 ` François Gannaz
2006-06-28 20:55   ` Kevin Rodgers

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.