From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: David Hull Newsgroups: gmane.emacs.bugs Subject: bug#24960: 25.1; etags incorrectly indexes quoted Erlang atoms Date: Thu, 17 Nov 2016 17:52:43 -0800 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a113eec1aea3ec90541898fce X-Trace: blaine.gmane.org 1479433998 14767 195.159.176.226 (18 Nov 2016 01:53:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 18 Nov 2016 01:53:18 +0000 (UTC) To: 24960@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 18 02:53:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7YMY-0002tu-Se for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Nov 2016 02:53:11 +0100 Original-Received: from localhost ([::1]:34168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7YMc-00029W-7K for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Nov 2016 20:53:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7YMS-00027G-Gu for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 20:53:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7YMQ-00016r-8m for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 20:53:04 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45735) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c7YMQ-00016l-4l for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 20:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c7YMP-0007Me-UX for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 20:53:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: David Hull Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2016 01:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24960 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.147943398128299 (code B ref -1); Fri, 18 Nov 2016 01:53:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Nov 2016 01:53:01 +0000 Original-Received: from localhost ([127.0.0.1]:32901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7YMO-0007MM-Cs for submit@debbugs.gnu.org; Thu, 17 Nov 2016 20:53:00 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7YMM-0007M8-CS for submit@debbugs.gnu.org; Thu, 17 Nov 2016 20:52:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7YMF-00014p-3v for submit@debbugs.gnu.org; Thu, 17 Nov 2016 20:52:53 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:50448) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c7YME-00014b-WA for submit@debbugs.gnu.org; Thu, 17 Nov 2016 20:52:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7YMC-0001zf-70 for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 20:52:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7YMA-00011y-Cw for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 20:52:48 -0500 Original-Received: from mail-it0-x233.google.com ([2607:f8b0:4001:c0b::233]:37259) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c7YMA-00011L-37 for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 20:52:46 -0500 Original-Received: by mail-it0-x233.google.com with SMTP id y23so8298004itc.0 for ; Thu, 17 Nov 2016 17:52:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openx-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=JI4AhjaA3AC6XjYt30cU2WruhmTUAGKypow0cUrQvn8=; b=Y8PPivUsYIQJxkfwjYcRpK77k6nraEi+m23eVYTqbJ66y70q0idXw2GF6w3OlsFE/5 9E/X4fhV8RbXvNo42d4LkG0vs2tj43ryLBG9o90yOcZumdrcNxRnFn4I1EkaopLHQCVn eWu3bjE26GfnCJNPnXMZ1/PZO1E/RuTduJNKetqeckYNRt7Ge7Tr0zdiI45Fpmhj13QJ oN8zaGsv1ruJIRbymcGIBh16s6PsnrZcPZZYRpo+G16Vp55C/bORs/hYKVCQLequFbak OR2Ff5wizHYHBhxG3oIC5WVmd2dlaFkvYeNss/2fQF57FmjBb45lknFULnSuBR9KLK+y 62Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=JI4AhjaA3AC6XjYt30cU2WruhmTUAGKypow0cUrQvn8=; b=MePdZnlcSZOxUGMnv2JeMxBuo72OvHsk42p+XsnRWiUTVoq4isU/2vz0K+jaF7aZLm Bx6IJpqIoIq6iRk4+D/SlemW9Lttlie4KZJ+vRSujqGLYLN7xjAVJASIq1SoZAT0yjRo /wjEaHOZm9wJ0MD0ATSBnoB9vmSKjUWln2C+5oQMEtb3X/YGjKp2QzPq/dH9rUJ6bxzC t2+BsJ7gzh5bXkFtX81dYycJh9linwnWULx4tWAiD9E7gd3jh8ntfOvvuXvIzyIRulA3 lvyX3ZmTWaYiXiCLUh2r9PJIZGFZUzB/7dCkFNoop6oP37JNAgQMWlYJO9Cqsse7Zf+3 Kl5w== X-Gm-Message-State: AKaTC01UHufvOKP2ITKqk9SDNFj+e34H+jQa7PO8LP+LnsnMzKnwevs7HO+xvR+zKWQIf9KEwPsBiLyDnFAPx8Wt X-Received: by 10.107.17.205 with SMTP id 74mr6347920ior.96.1479433964077; Thu, 17 Nov 2016 17:52:44 -0800 (PST) Original-Received: by 10.107.36.77 with HTTP; Thu, 17 Nov 2016 17:52:43 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:125810 Archived-At: --001a113eec1aea3ec90541898fce Content-Type: multipart/alternative; boundary=001a113eec1aea3ec60541898fcc --001a113eec1aea3ec60541898fcc Content-Type: text/plain; charset=UTF-8 There is an error in how etags treats quoted function and record names in Erlang sources. etags treats the quotes a part of the name, which is incorrect and prevents xref-find-definitions from working. In Erlang, the names of functions and records are "atoms". Here's a description of an atom, from "Erlang Handbook" (http://opensource.erlang-solutions.com/erlang-handbook/): > An atom is a symbolic name, also known as a literal. Atoms begin with > a lower-case letter, and may contain alphanumeric characters, > underscores (_) or at-signs (@). Alternatively atoms can be specified > by enclosing them in single quotes ('), necessary when they start with > an uppercase character or contain characters other than underscores > and at-signs. Note that the quotes around quoted atoms are not part of the name. That is, the following two strings represent the same atom: xyzzy 'xyzzy' Because etags currently treats the quotes as part of the name, an attempt to look up the name using the unquoted form will fail. I have created a patch to fix this bug. Attached is the patch (etags.patch), an example Erlang source file that demonstrates the bug (test.erl), a TAGS file generated from the current etags program (TAGS), and a TAGS file generated from the patched etags program (TAGS.new). -- David Hull In GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911)) of 2016-09-20 built on builder10-9.porkrind.org Windowing system distributor 'Apple', version 10.3.1504 Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: C Minor modes in effect: diff-auto-refine-mode: t magit-auto-revert-mode: t global-git-commit-mode: t dired-omit-mode: t async-bytecomp-package-mode: t show-paren-mode: t global-anzu-mode: t anzu-mode: t icomplete-mode: t dtrt-indent-mode: t shell-dirtrack-mode: t which-function-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t mouse-wheel-mode: t menu-bar-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 line-number-mode: t transient-mark-mode: t abbrev-mode: t Recent messages: Tramp: Process has finished. Tramp: Waiting for prompts from remote shell...done Copying /var/folders/y9/k3f9vqgn73gf64x8ktywlkd10r0222/T/tramp.28509UNF.c to /scp:cos6:/home/david.hull/rpmbuild/BUILD/emacs-25.1/lib-src/etags.c...done Wrote /scp:cos6:/home/david.hull/rpmbuild/BUILD/emacs-25.1/lib-src/etags.c Loading dired-x...done Omitting... (Nothing to omit) Turning on magit-auto-revert-mode...done Configuring package magit...done next-line: End of buffer [2 times] Quit [4 times] Load-path shadows: /Users/david.hull/.emacs.d/elpa/python-mode-20161116.218/python-mode hides /Users/david.hull/emacs/python-mode /Users/david.hull/.emacs.d/elpa/tabulated-list-20120406.1351/tabulated-list hides /Users/david.hull/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/tabulated-list /Users/david.hull/.emacs.d/elpa/seq-20151121.1017/seq hides /Users/david.hull/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/seq Features: (shadow sort mail-extr emacsbug sendmail magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit magit-apply magit-wip magit-log magit-diff smerge-mode diff-mode magit-core magit-autorevert autorevert filenotify magit-process magit-popup magit-mode magit-git crm magit-section magit-utils git-commit log-edit message dired-x dired rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util with-editor async-bytecomp async server cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs tramp-cache markdown-mode noutline outline pulse jka-compr find-func erldoc debug misearch multi-isearch add-log ws-butler erlang derived tempo cl paren compile python tramp-sh anzu thingatpt etags-table etags xref project edmacro kmacro icomplete dtrt-indent tramp tramp-compat tramp-loaddefs trampver shell pcomplete comint ansi-color ring format-spec which-func imenu delight advice use-package diminish bind-key easy-mmode exec-path-from-shell finder-inf gh-common gh-profile url-parse auth-source gnus-util mm-util help-fns mail-prsvr password-cache url-vars rx s marshal eieio-compat cl-seq ht json map dash eieio eieio-core cl-macs thrift-autoloads info package epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame 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 charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 429292 44685) (symbols 48 36785 1) (miscs 40 793 1229) (strings 32 76992 21185) (string-bytes 1 2419332) (vectors 16 62070) (vector-slots 8 1710176 392883) (floats 8 578 784) (intervals 56 8956 290) (buffers 976 41)) --001a113eec1aea3ec60541898fcc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
There is an error in how etags treats quoted function and = record names
in Erlang sources.=C2=A0 etags treats the quotes a part of = the name, which is
incorrect and prevents xref-find-definitions from wor= king.

In Erlang, the names of functions and records are "atoms&= quot;.=C2=A0 Here's a
description of an atom, from "Erlang Hand= book"
(http://opensource.erlang-solutions.com/erlang-handbook/):
> An atom is a symbolic name, also known as a literal. Atoms begin wit= h
> a lower-case letter, and may contain alphanumeric characters,
= > underscores (_) or at-signs (@). Alternatively atoms can be specified<= br>> by enclosing them in single quotes ('), necessary when they sta= rt with
> an uppercase character or contain characters other than und= erscores
> and at-signs.

Note that the quotes around quoted at= oms are not part of the name.=C2=A0 That
is, the following two strings r= epresent the same atom: xyzzy 'xyzzy'
Because etags currently tr= eats the quotes as part of the name, an
attempt to look up the name usin= g the unquoted form will fail.=C2=A0 I have
created a patch to fix this = bug.

Attached is the patch (etags.patch), an example Erlang source f= ile that
demonstrates the bug (test.erl), a TAGS file generated from the= current
etags program (TAGS), and a TAGS file generated from the patche= d etags
program (TAGS.new).
--
David Hull

In GNU Emacs 25.1.1 (x86_64-appl= e-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911))
=C2=A0= of 2016-09-20 built on builder1= 0-9.porkrind.org
Windowing system distributor 'Apple', versi= on 10.3.1504
Configured using:
=C2=A0'configure --with-ns '--= enable-locallisppath=3D/Library/Application
=C2=A0Support/Emacs/${versio= n}/site-lisp:/Library/Application
=C2=A0Support/Emacs/site-lisp' --w= ith-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 Z= LIB TOOLKIT_SCROLL_BARS NS MODULES

Important settings:
=C2=A0 val= ue of $LANG: en_US.UTF-8
=C2=A0 locale-coding-system: utf-8-unix

= Major mode: C

Minor modes in effect:
=C2=A0 diff-auto-refine-mode= : t
=C2=A0 magit-auto-revert-mode: t
=C2=A0 global-git-commit-mode: t=
=C2=A0 dired-omit-mode: t
=C2=A0 async-bytecomp-package-mode: t
= =C2=A0 show-paren-mode: t
=C2=A0 global-anzu-mode: t
=C2=A0 anzu-mode= : t
=C2=A0 icomplete-mode: t
=C2=A0 dtrt-indent-mode: t
=C2=A0 she= ll-dirtrack-mode: t
=C2=A0 which-function-mode: t
=C2=A0 override-glo= bal-mode: t
=C2=A0 tooltip-mode: t
=C2=A0 global-eldoc-mode: t
=C2= =A0 mouse-wheel-mode: t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shad= ow-mode: t
=C2=A0 global-font-lock-mode: t
=C2=A0 font-lock-mode: t=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2= =A0 auto-compression-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transi= ent-mark-mode: t
=C2=A0 abbrev-mode: t

Recent messages:
Tramp:= Process has finished.
Tramp: Waiting for prompts from remote shell...do= ne
Copying /var/folders/y9/k3f9vqgn73gf64x8ktywlkd10r0222/T/tramp.28509U= NF.c to /scp:cos6:/home/david.hull/rpmbuild/BUILD/emacs-25.1/lib-src/etags.= c...done
Wrote /scp:cos6:/home/david.hull/rpmbuild/BUILD/emacs-25.1/lib-= src/etags.c
Loading dired-x...done
Omitting...
(Nothing to omit)Turning on magit-auto-revert-mode...done
Configuring package magit...d= one
next-line: End of buffer [2 times]
Quit [4 times]

Load-pat= h shadows:
/Users/david.hull/.emacs.d/elpa/python-mode-20161116.218/pyth= on-mode hides /Users/david.hull/emacs/python-mode
/Users/david.hull/.ema= cs.d/elpa/tabulated-list-20120406.1351/tabulated-list hides /Users/david.hu= ll/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/tabulated-list=
/Users/david.hull/.emacs.d/elpa/seq-20151121.1017/seq hides /Users/davi= d.hull/Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/seq
Features:
(shadow sort mail-extr emacsbug sendmail magit-blame magit-st= ash
magit-bisect magit-remote magit-commit magit-sequence magit magit-ap= ply
magit-wip magit-log magit-diff smerge-mode diff-mode magit-core
m= agit-autorevert autorevert filenotify magit-process magit-popup
magit-mo= de magit-git crm magit-section magit-utils git-commit log-edit
message d= ired-x dired rfc822 mml mml-sec epg mm-decode mm-bodies
mm-encode mail-p= arse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
mail-utils gmm-utils = mailheader pcvs-util with-editor async-bytecomp
async server cc-mode cc-= fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-= defs tramp-cache markdown-mode noutline
outline pulse jka-compr find-fun= c erldoc debug misearch multi-isearch
add-log ws-butler erlang derived t= empo cl paren compile python tramp-sh
anzu thingatpt etags-table etags x= ref project edmacro kmacro icomplete
dtrt-indent tramp tramp-compat tram= p-loaddefs trampver shell pcomplete
comint ansi-color ring format-spec w= hich-func imenu delight advice
use-package diminish bind-key easy-mmode = exec-path-from-shell finder-inf
gh-common gh-profile url-parse auth-sour= ce gnus-util mm-util help-fns
mail-prsvr password-cache url-vars rx s ma= rshal eieio-compat cl-seq ht
json map dash eieio eieio-core cl-macs thri= ft-autoloads info package
epg-config seq byte-opt gv bytecomp byte-compi= le cl-extra help-mode
easymenu cconv cl-loaddefs pcase cl-lib time-date = mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float= -type mwheel
ns-win ucs-normalize term/common-win tool-bar dnd fontset i= mage
regexp-opt fringe tabulated-list newcomment elisp-mode lisp-modeprog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mo= use jit-lock font-lock syntax facemenu font-core frame cl-generic cham
g= eorgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean= japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european e= thiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-= hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button = faces cus-face macroexp files text-properties overlay
sha1 md5 base64 fo= rmat env code-pages mule custom widget
hashtable-print-readable backquot= e kqueue cocoa ns multi-tty
make-network-process emacs)

Memory in= formation:
((conses 16 429292 44685)
=C2=A0 (symbols 48 36785 1)
= =C2=A0 (miscs 40 793 1229)
=C2=A0 (strings 32 76992 21185)
=C2=A0 (st= ring-bytes 1 2419332)
=C2=A0 (vectors 16 62070)
=C2=A0 (vector-slots = 8 1710176 392883)
=C2=A0 (floats 8 578 784)
=C2=A0 (intervals 56 8956= 290)
=C2=A0 (buffers 976 41))

--001a113eec1aea3ec60541898fcc-- --001a113eec1aea3ec90541898fce Content-Type: application/octet-stream; name="etags.patch" Content-Disposition: attachment; filename="etags.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ivn4pp0s0 LS0tIGVtYWNzLTI1LjEvbGliLXNyYy9ldGFncy5jLm9yaWcJMjAxNi0xMS0xOCAwMDo1MDo0NS4w MTA4ODgyMTYgKzAwMDAKKysrIGVtYWNzLTI1LjEvbGliLXNyYy9ldGFncy5jCTIwMTYtMTEtMTgg MDE6MTg6MjUuMzc5NDk4OTA0ICswMDAwCkBAIC01ODAzLDcgKzU4MDMsNyBAQCBwcm9sb2dfYXRv bSAoY2hhciAqcyw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ICovCisgICAgICAgIGlmIChsZW4gPiAyICYmIGNwWzBdID09 ICdcJycgJiYgY3BbbGVuIC0gMV0gPT0gJ1wnJykKKyAgICAgICAgICB7CisgICAgICAgICAgICBj cCsrOworICAgICAgICAgICAgbGVuIC09IDI7CisgICAgICAgICAgfQorCW1ha2VfdGFnIChjcCwg bGVuLCB0cnVlLCBzLCBwb3MsIGxpbmVubywgbGluZWNoYXJubyk7CiAgICAgfQogICByZXR1cm47 CiB9Cg== --001a113eec1aea3ec90541898fce Content-Type: application/octet-stream; name=ChangeLog Content-Disposition: attachment; filename=ChangeLog Content-Transfer-Encoding: base64 X-Attachment-Id: f_ivn4q0oy1 MjAxNi0xMS0xNyAgRGF2aWQgSHVsbCA8ZGF2aWQuaHVsbEBvcGVueC5jb20+CgoJKiBldGFncy5j IChlcmxhbmdfZnVuYywgZXJsYW5nX2F0dHJpYnV0ZSk6IEZpeCB0YWdnaW5nIG9mIHF1b3RlZAoJ RXJsYW5nIGZ1bmN0aW9uIGFuZCBtYWNybyBuYW1lcy4K --001a113eec1aea3ec90541898fce Content-Type: application/octet-stream; name="test.erl" Content-Disposition: attachment; filename="test.erl" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ivn4q7cx2 LW1vZHVsZSh0ZXN0KS4KLWV4cG9ydChbIGYvMCwgZy8xIF0pLgoKLXJlY29yZCh0ZXN0b25lLCB7 YSwgYiwgY30pLgotcmVjb3JkKCd0ZXN0dHdvJywge2R9KS4KCmYgKCkgLT4KICAjJ3Rlc3RvbmUn e2EgPSBnKHRydWUpLCBiID0gYmFuYW5hLCBjID0gMTB9LgoKJ2cnICh0cnVlKSAtPgogICN0ZXN0 dHdve2QgPSA8PCJkb2ciPj59OwpnIChmYWxzZSkgLT4KICAnSGVsbG8gV29ybGQnLgo= --001a113eec1aea3ec90541898fce Content-Type: application/octet-stream; name=TAGS Content-Disposition: attachment; filename=TAGS Content-Transfer-Encoding: base64 X-Attachment-Id: f_ivn4qcrx3 DAp0ZXN0LmVybCw4NQotcmVjb3JkKHRlc3RvbmV/NCwzOQotcmVjb3JkKCd0ZXN0dHdvJ381LDY4 CmYgKH9mATcsOTQKJ2cnICh/J2cnATEwLDE1MApnICh/ZwExMiwxOTEK --001a113eec1aea3ec90541898fce Content-Type: application/octet-stream; name="TAGS.new" Content-Disposition: attachment; filename="TAGS.new" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ivn4qhq34 DAp0ZXN0LmVybCw3OAotcmVjb3JkKHRlc3RvbmV/NCwzOQotcmVjb3JkKCd0ZXN0dHdvJ390ZXN0 dHdvATUsNjgKZiAof2YBNyw5NAonZycgKH9nATEwLDE1MAo= --001a113eec1aea3ec90541898fce--