unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Fwd: [Aquamacs-bugs] C++ program auto-insertion fails with Aquamacs 1.3
       [not found] <3D25E31F-8897-4215-ACEA-F73492DCD2B8@rapidmind.com>
@ 2008-03-07 18:18 ` David Reitter
  2008-03-07 21:38   ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: David Reitter @ 2008-03-07 18:18 UTC (permalink / raw)
  To: emacs-pretest-bug

Is this a known bug with the 22 branch?
(Don't know enough about C++ mode to attempt to reproduce this.)

Begin forwarded message:

> From: Stefanus Du Toit <stefanus.dutoit@rapidmind.com>
> Date: 7 March 2008 17:48:44 GMT
> To: aquamacs-bugs@aquamacs.org
> Subject: [Aquamacs-bugs] C++ program auto-insertion fails with  
> Aquamacs 1.3
>
> With Aquamacs 1.3, when I create a new C++ header or source file, and
> I say yes to performing auto-insertion, the buffer fails to become the
> topmost buffer, and it gets as far as '#include "' or '#define ' (for
> a .cpp or a .hpp file respectively) in the buffer that is opened. It
> writes out "byte-code: End of buffer" in the messages. Afterwards C++
> parsing for font-lock-mode seems iffy until I close and reopen the  
> file.
>
> In GNU Emacs 22.1.91.2 (i386-apple-darwin8.11.1, Carbon Version 1.6.0)
>  of 2008-02-23 on plume.sr.unh.edu - Aquamacs Distribution 1.3a
> Windowing system distributor `Apple Inc.', version 10.5.2
> configured using `configure  '--without-x' '--prefix=/usr/local''
>
> Important settings:
>   value of $LC_ALL: nil
>   value of $LC_COLLATE: nil
>   value of $LC_CTYPE: en_US.UTF-8
>   value of $LC_MESSAGES: nil
>   value of $LC_MONETARY: nil
>   value of $LC_NUMERIC: nil
>   value of $LC_TIME: nil
>   value of $LANG: nil
>   locale-coding-system: iso-8859-1
>   default-enable-multibyte-characters: t
>
> Major mode: Fundamental
>
> Minor modes in effect:
>   shell-dirtrack-mode: t
>   savehist-mode: t
>   smart-frame-positioning-mode: t
>   recentf-mode: t
>   encoded-kbd-mode: t
>   osx-key-mode: t
>   show-paren-mode: t
>   delete-selection-mode: t
>   pc-selection-mode: t
>   cua-mode: t
>   tooltip-mode: t
>   mac-input-method-mode: t
>   mouse-wheel-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   blink-cursor-mode: t
>   unify-8859-on-encoding-mode: t
>   utf-translate-cjk-mode: t
>   auto-compression-mode: t
>   column-number-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
>
>
> Recent messages:
> Auto-saving...done
> Mark set [2 times]
> Wrote [censored].hpp
> Auto-saving...done
> Wrote [censored].hpp
> Quit [2 times]
> (New file)
> Perform C / C++ program auto-insertion? (y or n)
> byte-code: End of buffer
> Loading emacsbug...done
>
>
> --
> Stefanus Du Toit <stefanus.dutoit@rapidmind.com>
>   RapidMind Inc.
>   phone: +1 519 885 5455 x116 -- fax: +1 519 885 1463
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> __
> https://lists.sourceforge.net/lists/listinfo/aquamacs-bugs





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

* Re: Fwd: [Aquamacs-bugs] C++ program auto-insertion fails with Aquamacs 1.3
  2008-03-07 18:18 ` Fwd: [Aquamacs-bugs] C++ program auto-insertion fails with Aquamacs 1.3 David Reitter
@ 2008-03-07 21:38   ` Stefan Monnier
  2008-03-07 22:17     ` Stefanus Du Toit
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2008-03-07 21:38 UTC (permalink / raw)
  To: stefanus.dutoit; +Cc: emacs-pretest-bug

> Is this a known bug with the 22 branch?

No.

> (Don't know enough about C++ mode to attempt to reproduce this.)

Ask him to give a recipe,


        Stefan




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

* Re: [Aquamacs-bugs] C++ program auto-insertion fails with Aquamacs 1.3
  2008-03-07 21:38   ` Stefan Monnier
@ 2008-03-07 22:17     ` Stefanus Du Toit
  2008-03-07 22:39       ` Stefan Monnier
  2008-03-07 22:55       ` Stefan Monnier
  0 siblings, 2 replies; 10+ messages in thread
From: Stefanus Du Toit @ 2008-03-07 22:17 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, David Reitter

On 7-Mar-08, at 4:38 PM, Stefan Monnier wrote:
>> (Don't know enough about C++ mode to attempt to reproduce this.)
>
> Ask him to give a recipe,

Assuming you mean steps to reproduce, here's an attempt at that. I  
haven't tried to do this in isolation with an empty .emacs yet. Sorry.

*** To reproduce:

Evaluate (from my .emacs):
(add-hook 'find-file-hooks 'auto-insert)

Enter:
C-x C-f ~/foo.hpp RET
y (when prompted to "Perform C / C++ header auto-insertion")

*** Expected behaviour:

The newly created buffer, visible, with the following contents:
===
#ifndef FOO_HPP
#define FOO_HPP

<cursor here>

#endif
===

*** Actual behaviour:

Same buffer that was visible before is visible. When switching to the  
newly created buffer, it contains:
===
#ifndef <cursor here>
===

And the *Messages* buffer contains:
===
(New file)
Perform C / C++ header auto-insertion? (y or n)
byte-code: End of buffer
===

--
Stefanus Du Toit






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

* Re: [Aquamacs-bugs] C++ program auto-insertion fails with Aquamacs 1.3
  2008-03-07 22:17     ` Stefanus Du Toit
@ 2008-03-07 22:39       ` Stefan Monnier
  2008-03-07 22:44         ` Stefanus Du Toit
  2008-03-07 22:55       ` Stefan Monnier
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2008-03-07 22:39 UTC (permalink / raw)
  To: Stefanus Du Toit; +Cc: emacs-pretest-bug, David Reitter

> Assuming you mean steps to reproduce, here's an attempt at that. I haven't
> tried to do this in isolation with an empty .emacs yet. Sorry.

We need the staeps to start from a clean slate.  I.e. "emacs -Q".


        Stefan




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

* Re: [Aquamacs-bugs] C++ program auto-insertion fails with Aquamacs 1.3
  2008-03-07 22:39       ` Stefan Monnier
@ 2008-03-07 22:44         ` Stefanus Du Toit
  0 siblings, 0 replies; 10+ messages in thread
From: Stefanus Du Toit @ 2008-03-07 22:44 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, David Reitter

On 7-Mar-08, at 5:39 PM, Stefan Monnier wrote:
>> Assuming you mean steps to reproduce, here's an attempt at that. I  
>> haven't
>> tried to do this in isolation with an empty .emacs yet. Sorry.
>
> We need the staeps to start from a clean slate.  I.e. "emacs -Q".

OK. I've verified that those same steps I described, starting aquamacs  
with -Q, cause the same problem.

--
Stefanus Du Toit






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

* Re: [Aquamacs-bugs] C++ program auto-insertion fails with Aquamacs 1.3
  2008-03-07 22:17     ` Stefanus Du Toit
  2008-03-07 22:39       ` Stefan Monnier
@ 2008-03-07 22:55       ` Stefan Monnier
  2008-03-07 22:56         ` Stefanus Du Toit
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2008-03-07 22:55 UTC (permalink / raw)
  To: Stefanus Du Toit; +Cc: emacs-pretest-bug, David Reitter

> *** To reproduce:

> Evaluate (from my .emacs):
> (add-hook 'find-file-hooks 'auto-insert)

> Enter:
> C-x C-f ~/foo.hpp RET
> y (when prompted to "Perform C / C++ header auto-insertion")

> *** Expected behaviour:

> The newly created buffer, visible, with the following contents:
> ===
> #ifndef FOO_HPP
> #define FOO_HPP

> <cursor here>

> #endif
> ===

> *** Actual behaviour:

> Same buffer that was visible before is visible. When switching to the newly
> created buffer, it contains:
> ===
> #ifndef <cursor here>
> ===

> And the *Messages* buffer contains:
> ===
> (New file)
> Perform C / C++ header auto-insertion? (y or n)
> byte-code: End of buffer
> ===

Can't reproduce it here with Emacs-22.1.92.
Please set Options => Enter Debugger on Error
and then reproduce the problem.  You'll then hopefully get a backtrace
which will be informative.


        Stefan




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

* Re: [Aquamacs-bugs] C++ program auto-insertion fails with Aquamacs 1.3
  2008-03-07 22:55       ` Stefan Monnier
@ 2008-03-07 22:56         ` Stefanus Du Toit
  2008-03-08  1:26           ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Stefanus Du Toit @ 2008-03-07 22:56 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, David Reitter

On 7-Mar-08, at 5:55 PM, Stefan Monnier wrote:
> Can't reproduce it here with Emacs-22.1.92.
> Please set Options => Enter Debugger on Error
> and then reproduce the problem.  You'll then hopefully get a backtrace
> which will be informative.

No such luck; no debugger pops up.

--
Stefanus Du Toit






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

* Re: [Aquamacs-bugs] C++ program auto-insertion fails with Aquamacs 1.3
  2008-03-07 22:56         ` Stefanus Du Toit
@ 2008-03-08  1:26           ` Stefan Monnier
  2008-03-08 10:39             ` David Reitter
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2008-03-08  1:26 UTC (permalink / raw)
  To: Stefanus Du Toit; +Cc: emacs-pretest-bug, David Reitter

>> Can't reproduce it here with Emacs-22.1.92.
>> Please set Options => Enter Debugger on Error
>> and then reproduce the problem.  You'll then hopefully get a backtrace
>> which will be informative.

> No such luck; no debugger pops up.

Try additionally to enabling the debugger, to also do

  M-: (setq debug-ignored-errors nil) RET

and re-trigger the bug.  Hopefully you'll get a backtrace this time.


        Stefan





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

* Re: [Aquamacs-bugs] C++ program auto-insertion fails with Aquamacs 1.3
  2008-03-08  1:26           ` Stefan Monnier
@ 2008-03-08 10:39             ` David Reitter
  2008-03-08 16:24               ` Stefanus Du Toit
  0 siblings, 1 reply; 10+ messages in thread
From: David Reitter @ 2008-03-08 10:39 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-pretest-bug, Stefanus Du Toit

[-- Attachment #1: Type: text/plain, Size: 1843 bytes --]

On 8 Mar 2008, at 01:26, Stefan Monnier wrote:

>  (setq debug-ignored-errors nil)

Okay, I managed to reproduce this with Aquamacs 1.3a (compiled from 22  
branch CVS, 2008-02-23), but not with the current nightly build.

The stack trace is below. I suspect the following check-in fixed the  
bug.

----------------------------
revision 1.69
date: 2008-03-04 22:15:39 +0000;  author: acmacm;  state: Exp;  lines:  
+8 -9;  commitid: XH8Xc2hh7pI2fRTs;
(c-neutralize-syntax-in-CPP): Fix coding bug.





Debugger entered--Lisp error: (end-of-buffer)
   c-neutralize-syntax-in-CPP(1 9 0)
   c-after-change(1 9 0)
   skeleton-internal-1("#ifndef " nil nil)
   byte-code("...	#‡" [skeleton recursive skeleton-internal-1 nil] 4)
   skeleton-internal-list(((upcase (concat ... "_" ...)) "#ifndef "  
str n "#define " str "\n\n" _ "\n\n#endif") nil)
   (let nil (skeleton-internal-list skeleton str))
   eval((let nil (skeleton-internal-list skeleton str)))
   skeleton-insert(((upcase (concat ... "_" ...)) "#ifndef " str n  
"#define " str "\n\n" _ "\n\n#endif"))
   byte-code(...)
   mapcar(#[(action) "\b...ؤ‹‡" [action auto-insert-directory file- 
readable-p insert-file-contents (...)] 3] [((upcase ...) "#ifndef "  
str n "#define " str "\n\n" _ "\n\n#endif")])
   auto-insert()
   run-hooks(find-file-hook)
   after-find-file(t t)
   find-file-noselect-1(#<buffer test2.hpp> "~/Temp/test2.hpp" nil nil  
"~/Temp/test2.hpp" nil)
   find-file-noselect("~/Temp/test2.hpp" nil nil t)
   find-file("~/Temp/test2.hpp" t)
   call-interactively(find-file)
   (if (or (not one-buffer-one-frame) (< ... 2)) (call-interactively  
(quote find-file)) (let (...) (new-frame-with-new-scratch nil)) (let  
(...) (unwind-protect ... ...)))
   aquamacs-find-file()
   call-interactively(aquamacs-find-file)


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]

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

* Re: [Aquamacs-bugs] C++ program auto-insertion fails with Aquamacs 1.3
  2008-03-08 10:39             ` David Reitter
@ 2008-03-08 16:24               ` Stefanus Du Toit
  0 siblings, 0 replies; 10+ messages in thread
From: Stefanus Du Toit @ 2008-03-08 16:24 UTC (permalink / raw)
  To: David Reitter; +Cc: emacs-pretest-bug, Stefan Monnier

On 8-Mar-08, at 5:39 AM, David Reitter wrote:
> On 8 Mar 2008, at 01:26, Stefan Monnier wrote:
>
>> (setq debug-ignored-errors nil)
>
> Okay, I managed to reproduce this with Aquamacs 1.3a (compiled from  
> 22 branch CVS, 2008-02-23), but not with the current nightly build.

Thanks David, I've confirmed that this bug doesn't appear with the  
latest nightly build.

Stefanus





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

end of thread, other threads:[~2008-03-08 16:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <3D25E31F-8897-4215-ACEA-F73492DCD2B8@rapidmind.com>
2008-03-07 18:18 ` Fwd: [Aquamacs-bugs] C++ program auto-insertion fails with Aquamacs 1.3 David Reitter
2008-03-07 21:38   ` Stefan Monnier
2008-03-07 22:17     ` Stefanus Du Toit
2008-03-07 22:39       ` Stefan Monnier
2008-03-07 22:44         ` Stefanus Du Toit
2008-03-07 22:55       ` Stefan Monnier
2008-03-07 22:56         ` Stefanus Du Toit
2008-03-08  1:26           ` Stefan Monnier
2008-03-08 10:39             ` David Reitter
2008-03-08 16:24               ` Stefanus Du Toit

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

	https://git.savannah.gnu.org/cgit/emacs.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).