Subject: bug#48837: closed (Re: bug#48837: Interaction between completion-moide and cc-mode new in 27.2)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 27 Jun 2021 13:37:02 +0000

Your bug report

#48837: Interaction between completion-moide and cc-mode new in 27.2

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
48837: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48837
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#48837: Interaction between completion-moide and cc-mode new in 27.2
From: Alan Mackenzie <[email-masked]>
To: "John C. Ruttenberg" <[email-masked]>
Cc: [email-masked]
Date: Sun, 27 Jun 2021 13:36:03 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello, John.

On Sat, Jun 26, 2021 at 16:17:41 -0400, John C. Ruttenberg wrote:
> Thanks.  The patch succeeded and the bug seems to be fixed.

Thanks!  I've committed the patch to the emacs-27 branch at savannah,
from where it should reach the master branch in a few days, and to stand
alone CC Mode and XEmacs.  I'm closing the bug with this post.

> I just submitted another bug but it says it needs moderation.  Did you
> see it?

By submitted, do you mean to [email-masked]?  If so, the "needs
moderation" sounds very strange indeed.  I don't know why this has
happened, and I didn't see your new bug last time I looked at the online
list (this morning, European time).  Can I suggest you try submitting it
again?

> Here is the text of the email, if not:

> Here is my C++ file:

> class __attribute__((packed)) y : z {

> Typing a new line after the  "{" indents to under the "z":

> class __attribute__((packed)) y : z {
>                                   ^ here

> I think it should indent the same as if "__attribute__((packed))" were not
> present.

This bug seems already to be fixed in the upcoming Emacs 28.1 and the
head of the standalone CC Mode.  The bug is present in Emacs 27.2.  With
a bit of bisection, I should be able to find the patch which fixed it.
With any luck, I'll be able to send you a patch for Emacs 27.2.

> This appears to be fragile in surprising ways.  If I spell "__attribute__"
> wrong (like __attribute), it does not reproduce.

> It also does not reproduce if the source file is:

> {
>   class __attribute__((packed)) y : z {

> But if the source file is:

> {
>   class __attribute__((packed)) y : z {

> then it does reproduce.

[ .... ]

-- 
Alan Mackenzie (Nuremberg, Germany).

Subject: Interaction between completion-moide and cc-mode new in 27.2
From: "John C. Ruttenberg" <[email-masked]>
To: [email-masked]
Date: Fri, 4 Jun 2021 16:13:47 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

This bug occurs in 27.2 but not in 26.3

In a clean emacs "emacs -q --no-site-file":
1. Enable dynamic completion "(dynamic-completion-mode)"
2. Open a c++ source file
3. Text should be:

foo() {
  std::cerr <
  int i = static_cast<unsigned>(z);
}

   4. Position the cursor directly after the "<" and type "< " (two
characters "<" " "
   5. I get this error message: "Scan error: containing expression ends
prematurely, 22, 22"

In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)
 of 2021-06-02 built on catb
Windowing system distributor 'AT&T Laboratories Cambridge', version
11.0.3332
System Description: Ubuntu 20.04.2 LTS

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading completions from file /home/ruttenberg/.emacs.d/completions . . .
Loading completions from file /home/ruttenberg/.emacs.d/completions . . .
Done.
You can run the command â€˜dynamic-completion-modeâ€™ with M-x dy-m RET
Loading completions from file /home/ruttenberg/.emacs.d/completions . . .
Done.
Error in pre-command-hook (completion-before-command): (scan-error
"Containing expression ends prematurely" 16 16)
symbol-before-point: Scan error: "Containing expression ends prematurely",
17, 17
Configured using:
 'configure --prefix=/opt/emacs-27.2'

Configured features:
XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY
LIBSELINUX GNUTLS FREETYPE HARFBUZZ XFT ZLIB TOOLKIT_SCROLL_BARS GTK3
X11 XDBE XIM MODULES THREADS PDUMPER GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: C++//l

Minor modes in effect:
  dynamic-completion-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq
byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils cc-mode cc-fonts
easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs cl-loaddefs cl-lib cus-start cus-load completion tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 76735 9686)
 (symbols 48 9655 1)
 (strings 32 23478 2066)
 (string-bytes 1 843632)
 (vectors 16 13035)
 (vector-slots 8 166467 11092)
 (floats 8 22 45)
 (intervals 56 208 3)
 (buffers 1000 14))