From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: Emacs and Read-Only Files Date: Thu, 19 Oct 2006 00:10:58 -0400 Organization: Symantec Message-ID: References: <12jcqsch3k6ms6d@corp.supernews.com> <12jcr9o4pa88oe1@corp.supernews.com> <453676C1.8020307@advantest-ard.com> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1161232866 12908 80.91.229.2 (19 Oct 2006 04:41:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Oct 2006 04:41:06 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 19 06:41:04 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GaPiG-0008Kq-KB for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Oct 2006 06:41:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GaPiG-00019u-5M for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Oct 2006 00:41:00 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Wed, 18 Oct 2006 23:10:58 -0500 Original-Newsgroups: gnu.emacs.help Mail-Copies-To: nobody User-Agent: MT-NewsWatcher/3.5.2 (PPC Mac OS X) X-Copies-To: never Original-Lines: 77 Original-NNTP-Posting-Host: 24.34.108.171 Original-X-Trace: sv3-avZdny2MkE3t2SyrEyR1Cd3cY4GK3UMbBVxBhsKWMluVCShWczFnvkSFxP6m15inaWnHHPOTYE4zUPF!PR2tssJUvCuflIOvZivb5kokak3KIgLXkfz8GiO/jleBQnhMbBBgvoPcAUaOu7ncJBHtwd9vA+wf!QGCoKUhEP5NW3gs6N6S09Tq6j3cRUQWO1g== Original-X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Original-Xref: shelby.stanford.edu gnu.emacs.help:142500 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38122 Archived-At: In article <453676C1.8020307@advantest-ard.com>, Mark Elston wrote: > OK. I bit the bullet and did a little debugging. > > I have the following in my .emacs file that seems to be causing > the problem. This worked in GNU Emacs 21 but seems to cause a problem > in version 22. > > (defun my-c-mode-hook () > (setq c-file-style "local") > (setq tab-width 4 > ;; this ought to make sure spaces are used instead of tabs > indent-tabs-mode nil) > ;; we like auto-newline and hungry-delete > (c-toggle-auto-hungry-state 1) > (define-key c-mode-base-map "\C-m" 'newline-and-indent) > (c-set-offset 'substatement-open 0) > ) > (add-hook 'c-mode-common-hook 'my-c-mode-hook) > > Any idea why this is causing a problem in 22 and 23? I'm not sure how that could be the problem. Nothing up there tries to modify the buffer. The *Messages* messages indicate that the error is occurring when semantic-c is loaded. I suggest you set debug-on-error to t, so you'll get a stack trace when the read-only error occurs. Then post the stack trace here. > > Mark > > * Mark Elston wrote (on 10/18/2006 11:11 AM): > > One other thing I noticed - when I look at the *Messages* > > buffer I get the following messages: > > > > Note: file is write protected > > Loading semantic-c...done > > byte-code: Buffer is read-only: # > > Loading semantic-edit...done > > Loading semanticdb-file...done > > Mark set > > > > However, I commented out the loading of the cedet code (and the > > ecb that requires it) and I still get the same issue. > > > > Mark > > > > * Mark Elston wrote (on 10/18/2006 11:03 AM): > >> I have GNU Emacs 23.0.0.1 and GNU Emacs 22.0.50.1 compiled for > >> Windows. Both versions behave strangely when loading files > >> that are Read-Only. > >> > >> In both cases the file gets loaded, I get a message saying > >> 'Mark Set' but the window doesn't switch to the newly loaded > >> file. This doesn't happen when I load a file with write permission. > >> > >> Unfortunately (or fortunately), when I start up emacs with > >> --no-init this behavior doesn't occur. > >> > >> I have a rather extensive .emacs file and would *really* hate to > >> go through the cycle of commenting out blocks and re-starting > >> necessary to track this down. > >> > >> So, does anyone have any ideas what could be happening? Obviously, > >> something I have loaded is interfering with the loading of these > >> read-only files, but I don't have a clue what it could be. > >> > >> Mark -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group ***