GNU bug report logs - #19392
Emacs searches for dabbrevs in archive buffers

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: Paul Pogonyshev <pogonyshev@HIDDEN>; dated Tue, 16 Dec 2014 09:33:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 19392 <at> debbugs.gnu.org:


Received: (at 19392) by debbugs.gnu.org; 16 Dec 2014 16:19:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 16 11:19:11 2014
Received: from localhost ([127.0.0.1]:48027 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y0uq6-000568-HQ
	for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 11:19:10 -0500
Received: from mail-ie0-f173.google.com ([209.85.223.173]:58826)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <pogonyshev@HIDDEN>) id 1Y0uq3-00055y-Uw
 for 19392 <at> debbugs.gnu.org; Tue, 16 Dec 2014 11:19:08 -0500
Received: by mail-ie0-f173.google.com with SMTP id y20so13170712ier.18
 for <19392 <at> debbugs.gnu.org>; Tue, 16 Dec 2014 08:19:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=KyztjqMdKctodnr4hAwllJ8eS8kIqjgOG0qz99jW8IA=;
 b=gr0A44MsSBPTko8Nj3oIWrwtofK4JYsHty603mpOSpMXoXhX30xQLCUlNWXUfOKm5A
 bye3odDbjgyGgtUGB6joDCbTr4RlNtAV+yXmY5gpESDSNTxjSjj87E5+zz3o142j4nRx
 qJE4LM8fmqV1ZYNSb0kv89MTLBhmkS3Zeh6xYipjhEcLr6677OpfhC/UywIJDiqp8zFV
 9uW4YBMFYRlEO2BQSezQP8mKlpnpsr/SDFUqwzWlf9TosLe8cvCl+a7OmVIvUY5fNiza
 sA2n14xzfY36SyzJS/4BUg4GHcjHP/zaIVHa2CBmQQaN5Y5dxOexmoP6W528U1Nw20gV
 qzxw==
MIME-Version: 1.0
X-Received: by 10.107.128.138 with SMTP id k10mr35323648ioi.69.1418746747068; 
 Tue, 16 Dec 2014 08:19:07 -0800 (PST)
Received: by 10.43.125.2 with HTTP; Tue, 16 Dec 2014 08:19:06 -0800 (PST)
In-Reply-To: <83ppbjwqma.fsf@HIDDEN>
References: <CAG7BpapDrjvEOL036QimXxfOAhakUZV2tqUZZa=6C4JLGSid5Q@HIDDEN>
 <83ppbjwqma.fsf@HIDDEN>
Date: Tue, 16 Dec 2014 17:19:06 +0100
Message-ID: <CAG7BpappLoDTc84u3venwtzTdqFDVJSc=nFPecSQct+2oX93Dg@HIDDEN>
Subject: Re: bug#19392: Emacs searches for dabbrevs in archive buffers
From: Paul Pogonyshev <pogonyshev@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary=001a113fbcc4e2a8fb050a57b7fe
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 19392
Cc: 19392 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--001a113fbcc4e2a8fb050a57b7fe
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

> What is the definition of "archive" for this purpose?

I would say any buffer that has certain major mode, e.g. 'archive-mode' or
'tar-mode'.

> Also, when you visit a .tar.gz file, isn't most of the buffer readable
> text (because Emacs automatically decompresses the archive)?=E2=80=8B

Yes, it appears readable, but dabbrev still comes with various "useful"
binary data. Perhaps another approach would be to not search for abbrevs in
hidden text, but I don't know how that is implemented internally and if it
would be easy enough.

Paul

--001a113fbcc4e2a8fb050a57b7fe
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>&gt; What is the definition of &quot;archive&quot; fo=
r this purpose?<br><br></div>I would say any buffer that has certain major =
mode, e.g. &#39;archive-mode&#39; or &#39;tar-mode&#39;.<br><div>
<br>&gt; Also, when you visit a .tar.gz file, isn&#39;t most of the buffer =
readable<br>&gt; text (because Emacs automatically decompresses the archive=
)?=E2=80=8B<br><br></div><div>Yes, it appears readable, but dabbrev still c=
omes with various &quot;useful&quot; binary data. Perhaps another approach =
would be to not search for abbrevs in hidden text, but I don&#39;t know how=
 that is implemented internally and if it would be easy enough.<br><br></di=
v><div>Paul<br></div></div>

--001a113fbcc4e2a8fb050a57b7fe--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19392; Package emacs. Full text available.

Message received at 19392 <at> debbugs.gnu.org:


Received: (at 19392) by debbugs.gnu.org; 16 Dec 2014 15:39:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 16 10:39:56 2014
Received: from localhost ([127.0.0.1]:48005 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y0uE8-00049J-2l
	for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 10:39:56 -0500
Received: from mtaout27.012.net.il ([80.179.55.183]:54595)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Y0uE4-000497-Um
 for 19392 <at> debbugs.gnu.org; Tue, 16 Dec 2014 10:39:53 -0500
Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il
 (HyperSendmail v2007.08) id <0NGO00900LQJKI00@HIDDEN> for
 19392 <at> debbugs.gnu.org; Tue, 16 Dec 2014 17:35:50 +0200 (IST)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NGO00PT0LZQ6G90@HIDDEN>; Tue, 16 Dec 2014 17:35:50 +0200 (IST)
Date: Tue, 16 Dec 2014 17:39:41 +0200
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#19392: Emacs searches for dabbrevs in archive buffers
In-reply-to: <CAG7BpapDrjvEOL036QimXxfOAhakUZV2tqUZZa=6C4JLGSid5Q@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Paul Pogonyshev <pogonyshev@HIDDEN>
Message-id: <83ppbjwqma.fsf@HIDDEN>
References: <CAG7BpapDrjvEOL036QimXxfOAhakUZV2tqUZZa=6C4JLGSid5Q@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 19392
Cc: 19392 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Tue, 16 Dec 2014 10:32:13 +0100
> From: Paul Pogonyshev <pogonyshev@HIDDEN>
> 
> * In a freshly started Emacs, open an archive, e.g. a .tar.gz file in a buffer.
> * Switch to another buffer, type a couple of letters and then start pressing
> 'M-/' (dabbrev-expand).
> * It is very likely you will hit a "very useful" dabbrev in binary form taken
> from the archive. E.g. I opened a large tarball, then switched to *scratch*,
> typed "tz", and the very first dabbrev I got was "tz\327r".
> 
> Request: Emacs should ignore archive and other binary buffers when generating
> dabbrevs.

What is the definition of "archive" for this purpose?

Also, when you visit a .tar.gz file, isn't most of the buffer readable
text (because Emacs automatically decompresses the archive)?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19392; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Dec 2014 09:32:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 16 04:32:19 2014
Received: from localhost ([127.0.0.1]:47432 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Y0oUM-0000n8-Uc
	for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 04:32:19 -0500
Received: from eggs.gnu.org ([208.118.235.92]:34327)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <pogonyshev@HIDDEN>) id 1Y0oUK-0000my-OS
 for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 04:32:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <pogonyshev@HIDDEN>) id 1Y0oUJ-0005hs-M7
 for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 04:32:16 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:38950)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <pogonyshev@HIDDEN>) id 1Y0oUJ-0005hn-IP
 for submit <at> debbugs.gnu.org; Tue, 16 Dec 2014 04:32:15 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36041)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <pogonyshev@HIDDEN>) id 1Y0oUI-0007Gi-Mv
 for bug-gnu-emacs@HIDDEN; Tue, 16 Dec 2014 04:32:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <pogonyshev@HIDDEN>) id 1Y0oUH-0005hQ-MY
 for bug-gnu-emacs@HIDDEN; Tue, 16 Dec 2014 04:32:14 -0500
Received: from mail-ig0-x22e.google.com ([2607:f8b0:4001:c05::22e]:62759)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <pogonyshev@HIDDEN>) id 1Y0oUH-0005hE-ID
 for bug-gnu-emacs@HIDDEN; Tue, 16 Dec 2014 04:32:13 -0500
Received: by mail-ig0-f174.google.com with SMTP id hn15so6560816igb.1
 for <bug-gnu-emacs@HIDDEN>; Tue, 16 Dec 2014 01:32:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:date:message-id:subject:from:to:content-type;
 bh=GvsuBBK4XWXCpfcjXO5lN9nZ5Ue1q1UP3egbB8hZdmU=;
 b=qewi+HxLylyiqkbTwX+tIJyJo+3ifhgFoi9kMfEyoxySj/szdmwLjAXiHgy0LO7Xfs
 gtirJe20aajV84fhpWCAhG6520SnmuEOq22CRq/Kh1HFaNk3DKj1uzjruPrhp7oPkQd5
 gnyKlbI+Gy7THvoAfqZubuz2kYYRq2KlHeXRZiqWAZ9Ffj35azZoCaR6eAj6rvz6jels
 1I+wIQMPIaPCQ9KBa2409eXayhbSdaGtKJFgFc4JH7sbBKOQ5NmwxJYBe6C9SDxNsmA0
 XshTNura9Fs5H2OXXXRAguGfhXBnRr+QIadR7gqDSrj8kE6GCAdl+1JJbRocX54JIX6D
 cFNg==
MIME-Version: 1.0
X-Received: by 10.107.128.138 with SMTP id k10mr33447607ioi.69.1418722333116; 
 Tue, 16 Dec 2014 01:32:13 -0800 (PST)
Received: by 10.43.125.2 with HTTP; Tue, 16 Dec 2014 01:32:13 -0800 (PST)
Date: Tue, 16 Dec 2014 10:32:13 +0100
Message-ID: <CAG7BpapDrjvEOL036QimXxfOAhakUZV2tqUZZa=6C4JLGSid5Q@HIDDEN>
Subject: Emacs searches for dabbrevs in archive buffers
From: Paul Pogonyshev <pogonyshev@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary=001a113fbcc4b3506b050a5208af
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: 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> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--001a113fbcc4b3506b050a5208af
Content-Type: text/plain; charset=UTF-8

Reproducible with 'emacs -q':

* In a freshly started Emacs, open an archive, e.g. a .tar.gz file in a
buffer.
* Switch to another buffer, type a couple of letters and then start
pressing 'M-/' (dabbrev-expand).
* It is very likely you will hit a "very useful" dabbrev in binary form
taken from the archive. E.g. I opened a large tarball, then switched to
*scratch*, typed "tz", and the very first dabbrev I got was "tz\327r".

Request: Emacs should ignore archive and other binary buffers when
generating dabbrevs. There are some settings to ignore buffers by name, but
this would rather ignore buffers by mode. Also, this should be the default
because I cannot imagine binary dabbrevs being useful to more than maybe
0.01% of users.

Reproduced on a recent Emacs trunk.

Paul

--001a113fbcc4b3506b050a5208af
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div>Reproducible with &#39;emacs -q&#39;:<br></=
div><div><br>* In a freshly started Emacs, open an archive, e.g. a .tar.gz =
file in a buffer.<br></div>* Switch to another buffer, type a couple of let=
ters and then start pressing &#39;M-/&#39; (dabbrev-expand).<br></div>* It =
is very likely you will hit a &quot;very useful&quot; dabbrev in binary for=
m taken from the archive. E.g. I opened a large tarball, then switched to *=
scratch*, typed &quot;tz&quot;, and the very first dabbrev I got was &quot;=
tz\327r&quot;.<br><br></div>Request: Emacs should ignore archive and other =
binary buffers when generating dabbrevs. There are some settings to ignore =
buffers by name, but this would rather  ignore buffers by mode. Also, this =
should be the default because I cannot imagine binary dabbrevs being useful=
 to more than maybe 0.01% of users.<br><div><div><div><div><div><br>Reprodu=
ced on a recent Emacs trunk.<br><br></div><div>Paul<br></div></div></div></=
div></div></div>

--001a113fbcc4b3506b050a5208af--




Acknowledgement sent to Paul Pogonyshev <pogonyshev@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#19392; 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: Mon, 25 Nov 2019 12:00:02 UTC

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