From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#24205: 25.1.50; Re-display issue (lag) when opening certain files [sml-mode] Date: Thu, 11 Aug 2016 19:53:05 +0000 Message-ID: References: <837fbnfcg2.fsf@gnu.org> <8360r7f5y8.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c0484b0ee6ce90539d11d23 X-Trace: blaine.gmane.org 1470945258 7086 195.159.176.226 (11 Aug 2016 19:54:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 Aug 2016 19:54:18 +0000 (UTC) Cc: monnier@iro.umontreal.ca, 24205@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 11 21:54:14 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 1bXw3S-0001h1-4J for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Aug 2016 21:54:14 +0200 Original-Received: from localhost ([::1]:50332 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXw3P-0008IF-5U for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Aug 2016 15:54:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXw3I-0008Hz-Tw for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 15:54:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXw3G-0000oD-Nn for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 15:54:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXw3G-0000o9-JL for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 15:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bXw3G-0004eN-Cg for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 15:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Aug 2016 19:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24205 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org, monnier@iro.umontreal.ca Original-Received: via spool by submit@debbugs.gnu.org id=B.147094521117834 (code B ref -1); Thu, 11 Aug 2016 19:54:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Aug 2016 19:53:31 +0000 Original-Received: from localhost ([127.0.0.1]:54377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXw2k-0004dZ-U4 for submit@debbugs.gnu.org; Thu, 11 Aug 2016 15:53:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bXw2j-0004dO-Gt for submit@debbugs.gnu.org; Thu, 11 Aug 2016 15:53:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXw2d-0000cK-3H for submit@debbugs.gnu.org; Thu, 11 Aug 2016 15:53:24 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXw2c-0000cG-Vt for submit@debbugs.gnu.org; Thu, 11 Aug 2016 15:53:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXw2a-0007jb-Qz for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 15:53:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXw2Z-0000c2-OG for bug-gnu-emacs@gnu.org; Thu, 11 Aug 2016 15:53:20 -0400 Original-Received: from mail-oi0-x231.google.com ([2607:f8b0:4003:c06::231]:36475) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXw2X-0000bj-Qz; Thu, 11 Aug 2016 15:53:17 -0400 Original-Received: by mail-oi0-x231.google.com with SMTP id f189so8250333oig.3; Thu, 11 Aug 2016 12:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Q2erAeLXI5Dc9k0/kEeIxqTO9UwL360+7YGGDZKJFMU=; b=ALGswk6mlurHe6P+mcPPgSLsSXpSD/heFdVtYEChI+Zj1YrNFsjHhl63KZqDF7vnUy Gqu1tddrvdjtto9I8KNiaa0pkGnEaM0hO024alGzuz77Y7Ag07k+qNRhgerLt4YqiwR3 glJshdfODvMk0wbvPpuyw6XJkW+FGocOXLKC+f/OBCeQk+DxgeAaT64dmrD9p6fhixEt kucwvy+p383TcNsVLauKXC4qCkFC6q0DuzECKzN57Rtw1LAmmzwB9g4gO14dE39cDEbt xMsFaR22Nu2KnORtfbGsvD7kJERFPvxFSMxwCjIoL56h/OnCLZy58TtOh1lqf3wmefbW B01A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Q2erAeLXI5Dc9k0/kEeIxqTO9UwL360+7YGGDZKJFMU=; b=OeR4+8jiDSSG0jQng/+RLWTFbHPpHd5b/gy7jTZqSwpjAK/x1Y33kNUg3qFGA9bQzf pzHZi4r9zhWvmfO5K39YTuWAcCz2T+DqGgAaaoHsTURL5dEwHY7oxFsKvR0taSpTmgKG Uz5rMGN+pEYIU9m6uQl4lNpDv58vl6qy1QiU7LnglfJXn2ziVv2LJ4mamDQ4VsJjI2sR IJuYdP9YMIOjqPHXP3lW8Jkpgya7FuA6cpx/MReWo1sTrljzd6YCQzjFADcAEoQTLJLp c36QxOs+Pq5fV562BlX/oYBZCQD7vfhPA+dgVpZtc5CacMYO5yQc0nVbrc8DR1Sugqyj OtFA== X-Gm-Message-State: AEkoousRsV9btGLxQXTEmJBHhjiBUwWt5Wtqxu4NZ/+AFZ6JUqNwOhLJKBoKsa1wTH+In4YoRj8tDWaNFRIxmA== X-Received: by 10.157.41.7 with SMTP id d7mr3218168otb.165.1470945196664; Thu, 11 Aug 2016 12:53:16 -0700 (PDT) In-Reply-To: <8360r7f5y8.fsf@gnu.org> 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:122104 Archived-At: --94eb2c0484b0ee6ce90539d11d23 Content-Type: text/plain; charset=UTF-8 On Thu, Aug 11, 2016 at 3:42 PM Eli Zaretskii wrote: > It would help immensely. Unless visiting the file is all that's > needed, see below. > Correct, visiting the file is all that's needed, with the correct major mode turning on. That's why the file name ends in .sml and I made my MWE install the sml-mode package from GNU Elpa so that that mode is autoloaded on visiting any .sml file. To clarify, this issue does not occur for ANY .sml file. It happens to occur only due to this example file: The file has to contain just this sml comment: ===== (* ''a is a special equality type (it is not the same as the generic 'a type. It *) ===== I cannot figure out what's special about this comment that freaks the re-display. Are you saying that just visiting this file exhibits the problem? Yes, in sml-mode. > If > so, what modes should be turned on in the visiting buffer to see the > problem? > All my MWE is doing is: - Install sml-mode from GNU Elpa - Create a specific example file that causes this issue - Start profiler - Visit the file You will then see a 10-20 second lag. After which you hit C-c r (that shows the profiler report and also resets the profiler. My MWE sets that binding.). Here's the MWE once again: ===== (emacs-pkg-debug-setup '((nil . (sml-mode))) ; Install sml-mode from GNU Elpa (let ((test-file (expand-file-name "lag_test.sml" user-emacs-directory))) ;; The `emacs-pkg-debug-setup' macro sets user-emacs-directory to ;; (concat temporary-file-directory (getenv "USER") "/" ".emacs.d-debug/") (defun my-report () (interactive) (profiler-report) (profiler-stop) (profiler-reset)) (global-set-key (kbd "C-c r") #'my-report) (with-temp-buffer (insert (concat "(* ''a is a special equality type (it is not " "the same as the generic 'a type. It *)")) (write-file test-file)) (profiler-start 'cpu) (find-file test-file))) ===== -- Kaushal Modi --94eb2c0484b0ee6ce90539d11d23 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Thu, Aug 11= , 2016 at 3:42 PM Eli Zaretskii <eliz@gn= u.org> wrote:
It would help = immensely.=C2=A0 Unless visiting the file is all that's
needed, see below.

Correct, visiting th= e file is all that's needed, with the correct major mode turning on.
That's why the file name ends in .sml and I made my MWE install= the sml-mode package from GNU Elpa so that that mode is autoloaded on visi= ting any .sml file.

To clarify, this issue does no= t occur for ANY .sml file. It happens to occur only due to this example fil= e:

The file has to contain just this sml comment:<= /div>

=3D=3D=3D=3D=3D
(* ''a is a special e= quality type (it is not the same as the generic 'a type. It *)
=3D=3D=3D=3D=3D=C2=A0
I cannot figure out what's special about this comment that = freaks the re-display.

A= re you saying that just visiting this file exhibits the problem?=C2=A0

Yes, in sml-mode.
=C2=A0
If
so, what modes should be turned on in the visiting buffer to see the
problem?

All my MWE is doing is:
<= div>- Install sml-mode from GNU Elpa
- Create a specific example = file that causes this issue
- Start profiler
- Visit th= e file

You will then see a 10-20 second lag.
=

After which you hit C-c r (that shows the profiler repo= rt and also resets the profiler. My MWE sets that binding.).

=
Here's the MWE once again:

=3D=3D= =3D=3D=3D
(emacs-pkg-debug-setup
=C2=A0 =C2=A0 = 9;((nil . (sml-mode))) ; Install sml-mode from GNU Elpa
=C2=A0 (l= et ((test-file (expand-file-name
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "lag_test.sml"
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 user-= emacs-directory)))
=C2=A0 =C2=A0 ;; The `emacs-pkg-debug-setup= 9; macro sets user-emacs-directory to
=C2=A0 =C2=A0 ;; (concat te= mporary-file-directory (getenv "USER") "/" ".emacs= .d-debug/")
=C2=A0 =C2=A0 (defun my-report ()
=C2= =A0 =C2=A0 =C2=A0 (interactive)
=C2=A0 =C2=A0 =C2=A0 (profiler-re= port)
=C2=A0 =C2=A0 =C2=A0 (profiler-stop)
=C2=A0 =C2= =A0 =C2=A0 (profiler-reset))
=C2=A0 =C2=A0 (global-set-key (kbd &= quot;C-c r") #'my-report)

=C2=A0 =C2=A0 (= with-temp-buffer
=C2=A0 =C2=A0 =C2=A0 (insert (concat "(* &#= 39;'a is a special equality type (it is not "
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "th= e same as the generic 'a type. It *)"))
=C2=A0 =C2=A0 = =C2=A0 (write-file test-file))
=C2=A0 =C2=A0 (profiler-start '= ;cpu)
=C2=A0 =C2=A0 (find-file test-file)))
=3D= =3D=3D=3D=3D
--

Kaushal Modi

--94eb2c0484b0ee6ce90539d11d23--