From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Brubeck Unhammer Newsgroups: gmane.emacs.bugs Subject: bug#18788: 24.4; vc-git-working-revision vs mode-line gives error Date: Wed, 22 Oct 2014 10:31:42 +0200 Message-ID: <87wq7sfqtt.fsf@fsfe.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1413966805 25137 80.91.229.3 (22 Oct 2014 08:33:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2014 08:33:25 +0000 (UTC) To: 18788@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 22 10:33:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XgrM7-0003W4-3r for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2014 10:33:19 +0200 Original-Received: from localhost ([::1]:55551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgrM6-0001Jh-DH for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2014 04:33:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgrLw-0001IC-SF for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 04:33:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgrLq-0003FY-L3 for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 04:33:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgrLq-0003FU-IE for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 04:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XgrLq-00079w-3Y for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 04:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kevin Brubeck Unhammer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Oct 2014 08:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18788 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141396673627453 (code B ref -1); Wed, 22 Oct 2014 08:33:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Oct 2014 08:32:16 +0000 Original-Received: from localhost ([127.0.0.1]:59106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgrL4-00078h-Hx for submit@debbugs.gnu.org; Wed, 22 Oct 2014 04:32:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47258) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgrL0-00078O-Hb for submit@debbugs.gnu.org; Wed, 22 Oct 2014 04:32:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgrKp-0002aR-17 for submit@debbugs.gnu.org; Wed, 22 Oct 2014 04:32:05 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:32927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgrKo-0002aN-VB for submit@debbugs.gnu.org; Wed, 22 Oct 2014 04:31:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgrKj-0001Bh-AJ for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 04:31:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgrKd-0002Zv-Lw for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 04:31:53 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:53474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgrKd-0002Zj-Db for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 04:31:47 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by gateway2.nyi.internal (Postfix) with ESMTP id B0E8820921; Wed, 22 Oct 2014 04:31:45 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Wed, 22 Oct 2014 04:31:45 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:from:to:subject:date :message-id:mime-version:content-type:content-transfer-encoding; s=smtpout; bh=O+8q/u6avVzmfgpACE0Y4ORCw40=; b=Y2XC8+ywsDF3vpcDC xHV+du+ffCA3XEb6ML4UdZoZO0SwnILqrA0SBzmWkNoWuVQkH9x/4bdzy0YTWYL2 UwXNZlGFQNBoZla1cf39848082oiDXTKtNFLq0s2ugczqcr+KGZSRcpEJ45vEKRE XbF9rnwB/9P9eux8QmXAQov0Xo= X-Sasl-enc: o9ZnIevpUR3XGodMhldwyYePxv21eqF0GOxOE+x/hxdR 1413966705 Original-Received: from kiwiarch (unknown [84.210.14.246]) by mail.messagingengine.com (Postfix) with ESMTPA id 1DD62680178 for ; Wed, 22 Oct 2014 04:31:44 -0400 (EDT) User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94896 Whenever I try to save a git-registered file under emacs 24.4, I get apply: Args out of range: #("Git@" 0 4 (help-echo "Locally added file under the Git version control system")), 0, 7 The function vc-git-mode-line-string tries to get the revision using vc-working-revision, which returns nil. Instead of checking the `rev' variable for nil, it checks `detached', before calling substring. It should probably do (if (and detached rev) (substring =E2=80=A6)=20 =E2=80=A6) instead. I don't know why vc-working-revision returns nil though (there's a whole lot of indirection to dig through there). In GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars) of 2014-10-21 on kiwiarch Windowing system distributor `The X.Org Foundation', version 11.0.11501000 Configured using: `configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib --localstatedir=3D/var --with-x-toolkit=3Dlucid --with-xft --without-gconf --without-gsettings 'CFLAGS=3D-march=3Dx86-64 -mtune=3Dgeneric -O2 -pipe -fstack-protector-strong --param=3Dssp-buffer-size=3D4' CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2 LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro' Important settings: value of $LANG: nn_NO.UTF-8 locale-coding-system: utf-8 Major mode: Emacs-Lisp Minor modes in effect: shell-dirtrack-mode: t erc-capab-identify-mode: t erc-log-mode: t erc-track-score-mode: t erc-autoaway-mode: t erc-list-mode: t erc-menu-mode: t erc-autojoin-mode: t erc-ring-mode: t erc-networks-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-track-minor-mode: t erc-match-mode: t erc-button-mode: t erc-fill-mode: t erc-stamp-mode: t erc-netsplit-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t diff-auto-refine-mode: t eldoc-mode: t elisp-slime-nav-mode: t display-time-mode: t recentf-mode: t ido-everywhere: t delete-selection-mode: t cua-mode: t window-numbering-mode: t show-paren-mode: t paredit-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t global-prettify-symbols-mode: t prettify-symbols-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 buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: i n i M-: C-y C-n C-p C-x n C-g C-x=20 o C-n C-n M-m M-f M-b C-b C-M-SPC M-w C-x o M-: C-y=20 q M-f M-f M-f M-f C-f C-M-SPC M-w C-x o M-:=20 M-p M-f M-d C-_ M-f M-d M-d C-e =20 C-x o C-n C-n M-m C-n M-m C-M-SPC M-w C-x o M-: C-y=20 M-: M-p C-x o C-f M-. M-, C-x o M-:=20 M-p M-p M-p M-p M-p M-p M-p M-p M-f M-f C-f C-M-k w=20 o r k i C-e C-b C-M-b C-M-k f i l e C-e=20 M-: M-p C-x o C-s v c - g i t - w=20 o C-r C-a C-s C-s C-a C-x o C-h f v c - g i t - w o=20 i C-x o C-a C-x=20 o C-x b C-x o C-n C-n C-n C-M-u C-M-SPC M-w=20 C-x o M-: C-y q C-f C-n C-M-SPC M-w C-x o=20 M-: C-y q M-f C-f C-M-SPC M-w C-x o M-: C-y=20 C-x o C-p C-n C-M-SPC M-w C-x o M-: C-y =20 M-: M-p C-x o C-f C-n C-n C-n C-n C-n C-n=20 C-M-u C-M-SPC M-w C-x o M-: C-y C-x o C-M-b=20 C-M-b C-p C-p M-f M-f M-. C-x b C-s C-s C-x=20 C-s C-x o M-x M-p C-g C-x b C-u C-SPC C-u=20 C-SPC C-e M-: M-p M-p M-p M-p M-p M-p M-p M-p M-p M-p=20 M-n M-p M-p M-p M-p M-n M-p M-: M-p M-p M-p=20 M-n M-n M-p M-p M-p M-p M-p M-p M-p M-p M-p M-p M-p=20 M-p M-p M-p M-p M-p M-p C-a=20 C-x o q C-x C-s C-x o C-M-b C-M-SPC M-x M-p Recent messages: Searching for vc-git--run-command-string... Mark set (No changes need to be saved) Quit #("Git@" 0 4 (help-echo "Locally added file under the Git version control s= ystem Current revision: ")) Entering debugger... mouse-2, RET: find function's definition Back to top level. (No changes need to be saved) Load-path shadows: /usr/share/emacs/site-lisp/emms/tq hides /usr/share/emacs/24.4/lisp/emacs-l= isp/tq Features: (shadow emacsbug bbdb-message footnote face-remap tramp-cache tramp tramp-compat tramp-loaddefs trampver shell texmathp latexenc texinfo toolbar-x reporter desktop frameset context plain-tex compile autoload lisp-mnt tar-mode url-handlers finder-inf apropos preview prv-emacs tex-fold tex-buf font-latex latex tex-style tex dbus w3m-filter w3m-cookie w3m-bookmark w3m-tabmenu w3m-session gnus-html xml cal-iso bbdb-vcard vcard flow-fill shr-color debug cus-start cus-load org-agenda calc-map calc-stat calc-vec calc-ext calc-menu calc-aent calc calc-loaddefs calc-macs cal-move tabify org-table org-rmail org-mhe org-irc org-info org-gnus org-docview org-bibtex bibtex org-bbdb org-w3m org-random-todo org-element org-crypt org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs ffap w3m-search kbu-w3m w3m-lnum w3m doc-view dired-x dired image-mode w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util jka-compr eieio-opt speedbar sb-image ezimage dframe find-func cua-rect rect misearch multi-isearch mule-util gnus-gravatar gravatar sort gnus-cite smiley mm-archive gnus-bcklg gnus-async qp mail-extr gnus-ml url-queue url-http url-gw url-cache url-auth eww mm-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse url-vars shr browse-url gnus-topic nndraft nnmh gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 utf-7 gnus-cache gnus-sum bbdb-gnus nnimap parse-time utf7 view gnutls network-stream starttls tls bitlbee erc-capab erc-log rot13 disp-table epa-file epa epg netrc znc warnings erc-yank erc-track-score erc-autoaway erc-list erc-menu erc-join erc-ring erc-networks erc-pcomplete pcomplete erc-track erc-match erc-button erc-fill erc-stamp erc-netsplit erc-goodies erc erc-backend erc-compat pp git-commit-mode log-edit notmuch hl-line notmuch-version notmuch-message notmuch-maildir-fcc notmuch-hello notmuch-tree notmuch-parser notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-address notmuch-wash diff-mode coolj notmuch-query goto-addr icalendar notmuch-tag notmuch-lib mm-view mml-smime smime dig mailcap kbu-bbdb bbdb-anniv bbdb2erc bbdb-mua bbdb-com crm bbdb bbdb-site timezone gnus-demon nntp gnus-group gnus-undo nnmail mail-source gnus-start gnus-spec gnus-win nnoo gnus-int gnus-range offlineimap comint ansi-color smtpmail auth-source eieio byte-opt bytecomp byte-compile cconv eieio-core password-cache sendmail gnus gnus-ems nnheader gnus-util message idna format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log eldoc diminish elisp-slime-nav help-mode etags ring wheatgrass-theme bash-completion-autoloads bbdb-vcard-autoloads bbdb2erc-autoloads bbdb-autoloads color-theme-approximate-autoloads csv-mode-autoloads ddg-autoloads diminish-autoloads dix-autoloads elisp-slime-nav-autoloads erc-track-score-autoloads find-file-in-repository-autoloads fiplr-autoloads flymake-jslint-autoloads flymake-easy-autoloads ggtags-autoloads god-mode-autoloads goto-chg-autoloads grizzl-autoloads impatient-mode-autoloads htmlize-autoloads jedi-autoloads auto-complete-autoloads epc-autoloads ctable-autoloads concurrent-autoloads js2-refactor-autoloads json-snatcher-autoloads keyfreq-autoloads litable-autoloads magit-filenotify-autoloads magit-svn-autoloads info git-rebase-mode-autoloads markdown-mode-autoloads mediawiki-autoloads minimap-autoloads mwe-log-commands-autoloads noctilux-theme-autoloads oauth-autoloads offlineimap-autoloads paredit-everywhere-autoloads paredit-autoloads popup-autoloads powerline powerline-separators color powerline-themes python-environment-autoloads deferred-autoloads rainbow-mode-autoloads rust-mode-autoloads s-autoloads simple-httpd-autoloads tea-time-autoloads tuareg-autoloads undo-tree-autoloads utop-autoloads wcheck-mode-autoloads zenburn-theme-autoloads kbu-dix kbu-kaldera csv-kalderagram cg-kalderagram errcorr package epg-config w3m-load preview-latex tex-site auto-loads kbu-org remember solar cal-dst holidays hol-loaddefs vc-git appt diary-lib diary-loaddefs pabbrev derived thingatpt time recentf tree-widget wid-edit ido server saveplace delsel cua-base cal-menu easymenu calendar cal-loaddefs calendar-norway advice help-fns midnight window-numbering time-date paren paredit easy-mmode iso-transl kbu-selector edmacro kmacro cl-macs cl gv 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) Memory information: ((conses 16 1263704 163547) (symbols 48 74875 0) (miscs 40 5902 5617) (strings 32 187493 18068) (string-bytes 1 6647178) (vectors 16 67528) (vector-slots 8 1920805 145259) (floats 8 1124 1215) (intervals 56 56303 1123) (buffers 960 114) (heap 1024 108861 67472)) <#secure method=3Dpgpmime mode=3Dsign> --=20 Kevin Brubeck Unhammer GPG: 0x766AC60C