GNU bug report logs - #16653
24.3.50; unexpected results and errors with semantic completion in c-mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Thierry Volpiatto <thierry.volpiatto@HIDDEN>; dated Wed, 5 Feb 2014 10:01:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at>

Received: (at submit) by; 5 Feb 2014 10:00:46 +0000
From debbugs-submit-bounces <at> Wed Feb 05 05:00:46 2014
Received: from localhost ([]:50187
	by with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at>>)
	id 1WAzHg-00079R-3f
	for submit <at>; Wed, 05 Feb 2014 05:00:46 -0500
Received: from ([]:55419)
 by with esmtp (Exim 4.80)
 (envelope-from <thierry.volpiatto@HIDDEN>) id 1WAzHb-00079F-Va
 for submit <at>; Wed, 05 Feb 2014 05:00:41 -0500
Received: from Debian-exim by with spam-scanned (Exim 4.71)
 (envelope-from <thierry.volpiatto@HIDDEN>) id 1WAzHV-00065g-Gj
 for submit <at>; Wed, 05 Feb 2014 05:00:39 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from ([2001:4830:134:3::11]:41392)
 by with esmtp (Exim 4.71)
 (envelope-from <thierry.volpiatto@HIDDEN>) id 1WAzHV-00065S-Dz
 for submit <at>; Wed, 05 Feb 2014 05:00:33 -0500
Received: from ([2001:4830:134:3::10]:57119)
 by with esmtp (Exim 4.71)
 (envelope-from <thierry.volpiatto@HIDDEN>) id 1WAzHP-00061T-Dl
 for bug-gnu-emacs@HIDDEN; Wed, 05 Feb 2014 05:00:33 -0500
Received: from Debian-exim by with spam-scanned (Exim 4.71)
 (envelope-from <thierry.volpiatto@HIDDEN>) id 1WAzHI-00063K-Pu
 for bug-gnu-emacs@HIDDEN; Wed, 05 Feb 2014 05:00:27 -0500
Received: from ([2a00:1450:400c:c05::232]:43680)
 by with esmtp (Exim 4.71)
 (envelope-from <thierry.volpiatto@HIDDEN>) id 1WAzHI-00063F-5P
 for bug-gnu-emacs@HIDDEN; Wed, 05 Feb 2014 05:00:20 -0500
Received: by with SMTP id cc10so352428wib.17
 for <bug-gnu-emacs@HIDDEN>; Wed, 05 Feb 2014 02:00:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113;
X-Received: by with SMTP id ka6mr12436wjc.93.1391594418729;
 Wed, 05 Feb 2014 02:00:18 -0800 (PST)
Received: from dell-14z ([])
 by with ESMTPSA id t6sm44210921wix.4.2014.
 for <bug-gnu-emacs@HIDDEN>
 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
 Wed, 05 Feb 2014 02:00:17 -0800 (PST)
From: Thierry Volpiatto <thierry.volpiatto@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3.50;
 unexpected results and errors with semantic completion in c-mode
Date: Wed, 05 Feb 2014 11:00:04 +0100
Message-ID: <87sirxq3q3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at>
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <>
List-Unsubscribe: <>, 
 <mailto:debbugs-submit-request <at>>
List-Archive: <>
List-Post: <mailto:debbugs-submit <at>>
List-Help: <mailto:debbugs-submit-request <at>>
List-Subscribe: <>, 
 <mailto:debbugs-submit-request <at>>
Errors-To: debbugs-submit-bounces <at>
Sender: "Debbugs-submit" <debbugs-submit-bounces <at>>
X-Spam-Score: -4.0 (----)


I am trying to provide completion in helm for c-mode.
Correct me if I am wrong I have no knowledge for C.

1) First of all, I see no completion at all if semantic-mode is not enabled.

2) When semantic-mode is enabled the results I have are:
   a) sometimes corrects (expected results)
   b) sometimes totally unrelated to the string at point
   c) sometimes return error with wrong-type-argument stringp nil.

3) I see the function that is added to `completion-at-point-functions' is a
function with no argument (correct) which return a function which is
providing itself the completion (Not recommended according to the
docstring of `completion-at-point-functions')

If I modify the `semantic-completion-at-point-function' so that it
returns a list composed like this:
I have completion with helm but with the same problems as in 2).
Also with such a function, normal completion is no more working,
returning an error in `completion-basic-all-completions' with the args
given to substring out of range (the `point' arg is returning a negative

What I expect is a fix for 2) and 3).

Please don't ask for a recipe, just open a file from emacs src
directory, enable semantic and start completing.


In GNU Emacs (x86_64-unknown-linux-gnu, X toolkit)
 of 2014-02-03 on dell-14z
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
System Description:	Ubuntu 12.04.4 LTS

Configured using:
 `configure --with-x-toolkit=3Dlucid --without-toolkit-scroll-bars
 --without-gconf --without-gsettings'

Important settings:
  value of $LC_MONETARY: fr_FR.UTF-8
  value of $LC_NUMERIC: fr_FR.UTF-8
  value of $LC_TIME: fr_FR.UTF-8
  value of $LANG: fr_FR.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  psession-mode: t
  global-semanticdb-minor-mode: t
  global-semantic-idle-scheduler-mode: t
  semantic-mode: t
  golden-ratio-mode: t
  winner-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  auto-image-file-mode: t
  eldoc-in-minibuffer-mode: t
  show-paren-mode: t
  display-time-mode: t
  recentf-mode: t
  savehist-mode: t
  eldoc-mode: t
  minibuffer-depth-indicate-mode: t
  helm-mode: t
  helm-descbinds-mode: t
  shell-dirtrack-mode: t
  helm-adaptative-mode: t
  helm-match-plugin-mode: t
  helm-occur-match-plugin-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
# <backspace> i n <M-tab> C-g C-x C-=C2=B2 C-x C-b <down>=20
<down> <return> <up> <up> C-M-x <down> <down> C-M-x=20
C-x C-b <return> <M-tab> <backspace> <backspace> #=20
i n c l <M-tab> <backspace> <M-tab> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <M-tab> c <M-tab>=20
<M-tab> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> a l <M-tab> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> s t <M-tab> <return> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <M-tab> <down> <down> <down>=20
<return> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> r <M-tab> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <backspace> <backspace>=20
<backspace> <backspace> <backspace> <M-tab> <backspace>=20
<backspace> <backspace> C-g <backspace> <backspace>=20
<backspace> C-x C-s C-x C-b <return> <f7> m <return>=20
<return> <down> <down> d d d q <up> <down> <return>=20
d d d q q y M-x r e p o <return>

Recent messages:
nnimap read 41k from
Reading active file from archive via nnfolder...done
Reading active file via nndraft...done
Checking new news...done
Opening nntp server on
Are you sure you want to quit reading news? (y or n)  y
Saving /home/thierry/.newsrc.eld...
Saving file /home/thierry/.newsrc.eld...
Wrote /home/thierry/.newsrc.eld
Saving /home/thierry/.newsrc.eld...done

Load-path shadows:
/usr/local/share/emacs/24.3.50/lisp/gnus/.dir-locals hides ~/elisp/magit/.d=
~/elisp/auctex/lpath hides ~/elisp/emacs-wget/lpath
/usr/local/share/emacs/24.3.50/lisp/emacs-lisp/tq hides ~/elisp/emms/lisp/tq

(shadow epa-mail emacsbug helm-command semantic/tag-write gnus-html
url-cache smiley gnus-cite mail-extr gnus-async gnus-bcklg gnus-ml
nndraft nnmh utf-7 nnimap utf7 nnml nnfolder parse-time netrc
network-stream starttls tls gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig
nntp gnus-cache gnus-dired nnir gnus-sum gnus-group gnus-undo nnmail
mail-source nnoo gnus-start gnus-spec gnus-int gnus-range gnus-win ido
help-mode semantic/analyze/complete semantic/db-typecache semantic/ia
semantic/senator semantic/edit sh-script smie executable conf-mode
vc-rcs markdown-mode vc-git semantic/tag-file semantic/db-file
data-debug cedet-files semantic/bovine/c semantic/decorate/include
semantic/decorate/mode semantic/decorate pulse hideif
semantic/bovine/c-by semantic/lex-spp semantic/bovine/gcc semantic/dep
semantic/bovine semantic/analyze/refs semantic/db-find semantic/db-ref
semantic/analyze semantic/sort semantic/scope semantic/analyze/fcn
cc-langs cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs naquadah-theme em-unix em-script em-prompt
em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic em-banner
em-alias align-let git-gutter server persistent-sessions
semantic/db-mode semantic/db eieio-base semantic/idle semantic/format
ezimage semantic/tag-ls semantic/find semantic/ctxt semantic/util-modes
semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local
cedet config-w3m w3m timezone w3m-hist w3m-fb bookmark-w3m w3m-ems
w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util w3m-load package
golden-ratio winner undo-tree diff image-file newsticker newst-treeview
newst-plainview newst-reader newst-ticker newst-backend xdvi-search
preview-latex tex-site auto-loads pcomplete-extension em-term term
disp-table ehelp helm-ipython helm-elisp helm-eval python eldoc-eval
warnings whitespace paren time avoid recentf tree-widget savehist
smtpmail-async smtpmail sendmail dired-async iterator simple-call-tree
iedit-rect rect iedit iedit-lib smallurl mm-url gnus gnus-ems nnheader
wid-edit rectangle-utils ledger-config ledger esh-var esh-io esh-cmd
esh-opt esh-ext esh-proc eldoc esh-groups eshell esh-module esh-mode
esh-arg esh-util tv-utils async pcvs vc-cvs pcvs-parse pcvs-info
pcvs-defs pcvs-util ewoc mb-depth cl-info slime-autoloads esh-toggle
flymake no-word htmlize cl dired-extension emms-mpd-config
emms-playlist-limit emms-volume emms-volume-amixer emms-i18n
emms-history emms-score emms-stream-info emms-metaplaylist-mode
emms-bookmarks emms-cue emms-mode-line-icon emms-browser sort
emms-playlist-sort emms-last-played emms-player-xine emms-player-mpd tq
emms-playing-time emms-lyrics emms-url hl-line emms-tag-editor emms-mark
emms-mode-line emms-cache emms-info-ogginfo emms-info-mp3info
emms-playlist-mode emms-player-vlc emms-player-mplayer emms-info
emms-streams later-do emms-source-playlist emms-source-file
emms-player-simple emms-setup emms emms-compat org-config-thierry ob-sh
org-crypt cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew
holidays hol-loaddefs appt diary-lib diary-loaddefs org-element
org-rmail org-mhe org-irc org-info org-gnus org-docview doc-view
jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m org-agenda
org-annotation-helper addressbook-bookmark message rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev mail-utils gmm-utils mailheader firefox-protocol
bookmark-firefox-handler bookmark-extensions org org-macro org-footnote
org-pcomplete org-list org-faces org-entities noutline outline
easy-mmode org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob
ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs find-func cal-menu calendar cal-loaddefs init-helm-thierry
helm-mode helm-dictionary helm-ls-git helm-descbinds helm-ls-hg
helm-files image-dired tramp tramp-compat tramp-loaddefs trampver shell
pcomplete format-spec dired-x dired-aux ffap thingatpt helm-buffers
helm-elscreen helm-tags helm-bookmark helm-adaptative helm-info helm-net
browse-url xml url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util url-parse url-vars mailcap
helm-plugin bookmark pp helm-help helm-match-plugin helm-grep wgrep-helm
wgrep helm-regexp grep helm-external helm-utils dired compile comint
ansi-color ring helm-locate helm vc vc-dispatcher helm-config
helm-aliases epa-file epa derived epg epg-config auth-source eieio
byte-opt bytecomp byte-compile cconv eieio-core gnus-util time-date
mm-util mail-prsvr password-cache info easymenu cl-macs gv edmacro
kmacro advice help-fns net-utils cl-loaddefs cl-lib tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer 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 make-network-process
dbusbind gfilenotify dynamic-setting font-render-setting x-toolkit x
multi-tty emacs)

Get my Gnupg key:
gpg --keyserver --recv-keys 59F29997=20

Acknowledgement sent to Thierry Volpiatto <thierry.volpiatto@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#16653; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.