all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: modem <modem@member.fsf.org>
To: 24124@debbugs.gnu.org
Subject: bug#24124: emacs terminal escape command error
Date: Wed, 3 Aug 2016 15:21:24 +0200	[thread overview]
Message-ID: <57A1EFD4.2060100@member.fsf.org> (raw)
In-Reply-To: <579F5E03.70201@member.fsf.org>

[-- Attachment #1: Type: text/plain, Size: 1978 bytes --]

> [Please keep the bug address on the CC list.]
>
>> Thanks you for your advises.
>> 
>> My terminfo: "echo $TERM" return "screen". Is that it ?
> 
> Probably.
> 
>> I recompiled emacs after commenting a few optimization in src/cm.c (cmgoto).
>> Unfortunately I can still reproduce the bug with this binary.
>> 
>> I am attaching you the patch I did.
> 
> I think you disabled the wrong code.  What you need is force Emacs to
> always do this:
> 
>       if (cost <= relcost)œ
> 	{	/* really is cheaper */
> 	  emacs_tputs (tty, p, 1, cmputc);
> 	  curY (tty) = row, curX (tty) = col;
> 	  return;
> 	}

Hi Eli,

Thanks a lot. So I did another patch and another try. I can still
reproduce the bug.

Any more advices on stuff I should try are welcomed ;-)


Here is the patch:

--- emacs24-24.4+1.orig/src/cm.c        2014-10-21 23:45:42.000000000 +0200
+++ /dev/shm/cm.c       2016-08-03 15:10:55.803193217 +0200
@@ -327,10 +327,12 @@
     char *p;
     const char *dcm;

+#if 0
   /* First the degenerate case */
     if (row == curY (tty) && col == curX (tty)) /* already there */
     return;
-
+#endif // XXX MODEM
+
     if (curY (tty) >= 0 && curX (tty) >= 0)
     {
       /* We may have quick ways to go to the upper-left, bottom-left,
@@ -375,7 +377,7 @@
    * In the following comparison, the = in <= is because when the costs
    * are the same, it looks nicer (I think) to move directly there.
    */
-  if (directcost <= relcost)
+    if (directcost <= relcost || 1) // XXX MODEM
     {
       /* compute REAL direct cost */
       cost = 0;
@@ -383,14 +385,14 @@
            ? tgoto (dcm, row, col)
            : tgoto (dcm, col, row));
       emacs_tputs (tty, p, 1, evalcost);
-      if (cost <= relcost)
+      if (cost <= relcost || 1) // XXX MODEM
        {       /* really is cheaper */
          emacs_tputs (tty, p, 1, cmputc);
          curY (tty) = row, curX (tty) = col;
          return;
        }
     }
-
+
   switch (use)
     {
     case USEHOME:

[-- Attachment #2: second_try.patch --]
[-- Type: text/x-patch, Size: 1158 bytes --]

--- emacs24-24.4+1.orig/src/cm.c	2014-10-21 23:45:42.000000000 +0200
+++ /dev/shm/cm.c	2016-08-03 15:10:55.803193217 +0200
@@ -327,10 +327,12 @@
     char *p;
     const char *dcm;
 
+#if 0
   /* First the degenerate case */
     if (row == curY (tty) && col == curX (tty)) /* already there */
     return;
-
+#endif // XXX MODEM
+    
     if (curY (tty) >= 0 && curX (tty) >= 0)
     {
       /* We may have quick ways to go to the upper-left, bottom-left,
@@ -375,7 +377,7 @@
    * In the following comparison, the = in <= is because when the costs
    * are the same, it looks nicer (I think) to move directly there.
    */
-  if (directcost <= relcost)
+    if (directcost <= relcost || 1) // XXX MODEM
     {
       /* compute REAL direct cost */
       cost = 0;
@@ -383,14 +385,14 @@
            ? tgoto (dcm, row, col)
            : tgoto (dcm, col, row));
       emacs_tputs (tty, p, 1, evalcost);
-      if (cost <= relcost)
+      if (cost <= relcost || 1) // XXX MODEM
 	{	/* really is cheaper */
 	  emacs_tputs (tty, p, 1, cmputc);
 	  curY (tty) = row, curX (tty) = col;
 	  return;
 	}
     }
-
+  
   switch (use)
     {
     case USEHOME:

  parent reply	other threads:[~2016-08-03 13:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-01 14:34 bug#24124: emacs terminal escape command error modem
2016-08-01 15:18 ` Eli Zaretskii
2016-08-03 13:21 ` modem [this message]
2016-08-04 17:07   ` Eli Zaretskii
     [not found] <57A06C4B.70603@member.fsf.org>
2016-08-02 15:39 ` Eli Zaretskii
2019-11-08  3:54   ` Stefan Kangas
2020-01-18 10:51     ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57A1EFD4.2060100@member.fsf.org \
    --to=modem@member.fsf.org \
    --cc=24124@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.