unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20072: Incorrect popup showing
@ 2015-03-10 10:48 Nikolay Puzanov
  2015-03-10 17:03 ` Eli Zaretskii
  2022-02-08  9:14 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 12+ messages in thread
From: Nikolay Puzanov @ 2015-03-10 10:48 UTC (permalink / raw)
  To: 20072


[-- Attachment #1.1: Type: text/plain, Size: 1131 bytes --]

Hi,

I found bug on display a popup window from auto-complete-mode. I attach two
screenshot and init.el. Bug appear when global-linum-mode is on.

Commit e589765 bring this bug. I changed the line that seemed most
appropriate. I not understand how it work, but this patch fix it:

--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3434,6 +3434,7 @@ handle_stop (struct it *it)
   it->dpvec = NULL;
   it->current.dpvec_index = -1;
   handle_overlay_change_p = !it->ignore_overlay_strings_at_pos_p;
+  it->ignore_overlay_strings_at_pos_p = false;
   it->ellipsis_p = 0;

   /* Use face of preceding text for ellipsis (if invisible) */

Note, this patch do not break fix by e589765 (
http://lists.gnu.org/archive/html/bug-gnu-emacs/2015-02/msg00075.html).

Screenshots also uploaded to the external server:
http://www.embddr.com/emacs-popup-good.png
http://www.embddr.com/emacs-popup-bad.png

Init.el:
(require 'package)
(add-to-list 'package-archives '("melpa" . "
http://melpa.milkbox.net/packages/"))
(package-initialize)

(require 'auto-complete-config)
(auto-complete-mode t)
(ac-config-default)

(global-linum-mode t)


Nikolay Puzanov.

[-- Attachment #1.2: Type: text/html, Size: 2127 bytes --]

[-- Attachment #2: emacs-popup-bad.png --]
[-- Type: image/png, Size: 29084 bytes --]

[-- Attachment #3: emacs-popup-good.png --]
[-- Type: image/png, Size: 54832 bytes --]

[-- Attachment #4: init.el --]
[-- Type: text/x-emacs-lisp, Size: 222 bytes --]


(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
(package-initialize)

(require 'auto-complete-config)
(auto-complete-mode t)
(ac-config-default)

(global-linum-mode t)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#20072: Incorrect popup showing
  2015-03-10 10:48 bug#20072: Incorrect popup showing Nikolay Puzanov
@ 2015-03-10 17:03 ` Eli Zaretskii
  2015-03-10 17:30   ` Nikolay Puzanov
  2022-02-08  9:14 ` Lars Ingebrigtsen
  1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2015-03-10 17:03 UTC (permalink / raw)
  To: Nikolay Puzanov; +Cc: 20072

> From: Nikolay Puzanov <punzik@gmail.com>
> Date: Tue, 10 Mar 2015 10:48:38 +0000
> 
> I found bug on display a popup window from auto-complete-mode. I attach two
> screenshot and init.el. Bug appear when global-linum-mode is on.

Damn that linum-mode!

> Commit e589765 bring this bug. I changed the line that seemed most appropriate.
> I not understand how it work, but this patch fix it:
> 
> --- a/src/xdisp.c
> +++ b/src/xdisp.c
> @@ -3434,6 +3434,7 @@ handle_stop (struct it *it)
>    it->dpvec = NULL;
>    it->current.dpvec_index = -1;
>    handle_overlay_change_p = !it->ignore_overlay_strings_at_pos_p;
> +  it->ignore_overlay_strings_at_pos_p = false;
>    it->ellipsis_p = 0;
>    
>    /* Use face of preceding text for ellipsis (if invisible) */

Thanks, but I don't think this is the right fix.  It is fundamentally
wrong to unconditionally reset this flag at that spot, because there's
no way of knowing there that we have processed all the overlay
strings.

> Note, this patch do not break fix by e589765
> (http://lists.gnu.org/archive/html/bug-gnu-emacs/2015-02/msg00075.html).

The problem fixed by e589765 is much more fundamental than just what
bug 19307 reported.  When I worked on the fix, I tested a lot more
situations than originally reported, and some of them will be broken
by your suggested change.

So we need to look for another solution.

> Screenshots also uploaded to the external server:
> http://www.embddr.com/emacs-popup-good.png
> http://www.embddr.com/emacs-popup-bad.png

Thanks, I will look into this when I have time.

> Init.el:
> (require 'package)
> (add-to-list 'package-archives '("melpa" .
> "http://melpa.milkbox.net/packages/"))
> (package-initialize)
> 
> (require 'auto-complete-config)
> (auto-complete-mode t)
> (ac-config-default)
> 
> (global-linum-mode t)

Is it enough to do just this instead:

  (require 'auto-complete-config)
  (auto-complete-mode 1)
  (ac-config-default)
  (global-linum-mode 1)

IOW, can I skip the steps that set up package.el, and instead download
auto-complete manually?





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#20072: Incorrect popup showing
  2015-03-10 17:03 ` Eli Zaretskii
@ 2015-03-10 17:30   ` Nikolay Puzanov
  2015-03-13 15:50     ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Nikolay Puzanov @ 2015-03-10 17:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20072

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

>
> So we need to look for another solution.
>
>
I would be happy to help you, but I think my knowledge is not enough.


> > Init.el:
> > (require 'package)
> > (add-to-list 'package-archives '("melpa" .
> > "http://melpa.milkbox.net/packages/"))
> > (package-initialize)
> >
> > (require 'auto-complete-config)
> > (auto-complete-mode t)
> > (ac-config-default)
> >
> > (global-linum-mode t)
>
> Is it enough to do just this instead:
>
>   (require 'auto-complete-config)
>   (auto-complete-mode 1)
>   (ac-config-default)
>   (global-linum-mode 1)
>
> IOW, can I skip the steps that set up package.el, and instead download
> auto-complete manually?
>

Yes, you can. That I did:

$ mkdir -p ~/.emacs.d/packages
$ cd ~/.emacs.d/packages
$ git clone https://github.com/auto-complete/auto-complete.git
$ git clone https://github.com/auto-complete/popup-el.git

And init.el:

(add-to-list 'load-path "~/.emacs.d/packages/auto-complete")
(add-to-list 'load-path "~/.emacs.d/packages/popup-el")
(require 'auto-complete-config)
(auto-complete-mode t)
(ac-config-default)
(global-linum-mode t)

[-- Attachment #2: Type: text/html, Size: 2089 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#20072: Incorrect popup showing
  2015-03-10 17:30   ` Nikolay Puzanov
@ 2015-03-13 15:50     ` Eli Zaretskii
  2015-03-13 17:17       ` Nikolay Puzanov
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2015-03-13 15:50 UTC (permalink / raw)
  To: Nikolay Puzanov; +Cc: 20072

> From: Nikolay Puzanov <punzik@gmail.com>
> Date: Tue, 10 Mar 2015 17:30:31 +0000
> Cc: 20072@debbugs.gnu.org
> 
> $ mkdir -p ~/.emacs.d/packages
> $ cd ~/.emacs.d/packages
> $ git clone https://github.com/auto-complete/auto-complete.git
> $ git clone https://github.com/auto-complete/popup-el.git
> 
> And init.el:
> 
> (add-to-list 'load-path "~/.emacs.d/packages/auto-complete")
> (add-to-list 'load-path "~/.emacs.d/packages/popup-el")
> (require 'auto-complete-config)
> (auto-complete-mode t)
> (ac-config-default)
> (global-linum-mode t)

And what should I do after this to reproduce the broken display you
posted?





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#20072: Incorrect popup showing
  2015-03-13 15:50     ` Eli Zaretskii
@ 2015-03-13 17:17       ` Nikolay Puzanov
  2015-03-13 17:46         ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Nikolay Puzanov @ 2015-03-13 17:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20072

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

Open init.el, put cursor to the beginning of buffer, type "(lo", wait for
popup.

пт, 13 марта 2015 г. в 18:50, Eli Zaretskii <eliz@gnu.org>:

> > From: Nikolay Puzanov <punzik@gmail.com>
> > Date: Tue, 10 Mar 2015 17:30:31 +0000
> > Cc: 20072@debbugs.gnu.org
> >
> > $ mkdir -p ~/.emacs.d/packages
> > $ cd ~/.emacs.d/packages
> > $ git clone https://github.com/auto-complete/auto-complete.git
> > $ git clone https://github.com/auto-complete/popup-el.git
> >
> > And init.el:
> >
> > (add-to-list 'load-path "~/.emacs.d/packages/auto-complete")
> > (add-to-list 'load-path "~/.emacs.d/packages/popup-el")
> > (require 'auto-complete-config)
> > (auto-complete-mode t)
> > (ac-config-default)
> > (global-linum-mode t)
>
> And what should I do after this to reproduce the broken display you
> posted?
>

[-- Attachment #2: Type: text/html, Size: 1486 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#20072: Incorrect popup showing
  2015-03-13 17:17       ` Nikolay Puzanov
@ 2015-03-13 17:46         ` Eli Zaretskii
  2015-03-13 17:53           ` Nikolay Puzanov
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2015-03-13 17:46 UTC (permalink / raw)
  To: Nikolay Puzanov; +Cc: 20072

> From: Nikolay Puzanov <punzik@gmail.com>
> Date: Fri, 13 Mar 2015 17:17:39 +0000
> Cc: 20072@debbugs.gnu.org
> 
> Open init.el, put cursor to the beginning of buffer, type "(lo", wait for
> popup.

I don't have init.el, I evaluated all of that stuff in *scratch*.  I
did try typing "(lo", but nothing happened.

What am I missing?





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#20072: Incorrect popup showing
  2015-03-13 17:46         ` Eli Zaretskii
@ 2015-03-13 17:53           ` Nikolay Puzanov
  2015-03-14 18:05             ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Nikolay Puzanov @ 2015-03-13 17:53 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20072

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

Switch to emacs-lisp-mode.
Below the cursor should be a few lines of text.


пт, 13 марта 2015 г. в 20:46, Eli Zaretskii <eliz@gnu.org>:

> > From: Nikolay Puzanov <punzik@gmail.com>
> > Date: Fri, 13 Mar 2015 17:17:39 +0000
> > Cc: 20072@debbugs.gnu.org
> >
> > Open init.el, put cursor to the beginning of buffer, type "(lo", wait for
> > popup.
>
> I don't have init.el, I evaluated all of that stuff in *scratch*.  I
> did try typing "(lo", but nothing happened.
>
> What am I missing?
>

[-- Attachment #2: Type: text/html, Size: 1014 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#20072: Incorrect popup showing
  2015-03-13 17:53           ` Nikolay Puzanov
@ 2015-03-14 18:05             ` Eli Zaretskii
  2015-03-16 20:20               ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2015-03-14 18:05 UTC (permalink / raw)
  To: Nikolay Puzanov, m2ym.pub, tomo; +Cc: 20072

> From: Nikolay Puzanov <punzik@gmail.com>
> Date: Fri, 13 Mar 2015 17:53:48 +0000
> Cc: 20072@debbugs.gnu.org
> 
> Switch to emacs-lisp-mode.
> Below the cursor should be a few lines of text.

OK, I see the problem now (some corruption happens even without
linum-mode, btw).  But I have trouble debugging it: the problematic
display disappears the moment I type anything, even "M-x".  This makes
debugging next to impossible.

So I need a simpler example, one that will produce the problematic
display and not disappear.  I tried to prepare such an example, but
failed, which isn't surprising, as I know almost nothing about the
packages involved.  Can you guys help me with that?





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#20072: Incorrect popup showing
  2015-03-14 18:05             ` Eli Zaretskii
@ 2015-03-16 20:20               ` Eli Zaretskii
  0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2015-03-16 20:20 UTC (permalink / raw)
  To: punzik, m2ym.pub, tomo; +Cc: 20072

> Date: Sat, 14 Mar 2015 20:05:34 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 20072@debbugs.gnu.org
> 
> > From: Nikolay Puzanov <punzik@gmail.com>
> > Date: Fri, 13 Mar 2015 17:53:48 +0000
> > Cc: 20072@debbugs.gnu.org
> > 
> > Switch to emacs-lisp-mode.
> > Below the cursor should be a few lines of text.
> 
> OK, I see the problem now (some corruption happens even without
> linum-mode, btw).  But I have trouble debugging it: the problematic
> display disappears the moment I type anything, even "M-x".  This makes
> debugging next to impossible.
> 
> So I need a simpler example, one that will produce the problematic
> display and not disappear.  I tried to prepare such an example, but
> failed, which isn't surprising, as I know almost nothing about the
> packages involved.  Can you guys help me with that?

Ping!  Anyone out there interested enough in this bug to help me solve
it?  Please?





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#20072: Incorrect popup showing
  2015-03-10 10:48 bug#20072: Incorrect popup showing Nikolay Puzanov
  2015-03-10 17:03 ` Eli Zaretskii
@ 2022-02-08  9:14 ` Lars Ingebrigtsen
  2022-02-08 10:12   ` Николай Пузанов
  1 sibling, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-08  9:14 UTC (permalink / raw)
  To: Nikolay Puzanov; +Cc: 20072

Nikolay Puzanov <punzik@gmail.com> writes:

> I found bug on display a popup window from auto-complete-mode. I attach two
> screenshot and init.el. Bug appear when global-linum-mode is on.
>
> Commit e589765 bring this bug. I changed the line that seemed most appropriate.
> I not understand how it work, but this patch fix it:

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Are you still seeing this issue in recent Emacs versions?  I can't
recall seeing any similar reports, and some of this display code has
changed since this was originally reported.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#20072: Incorrect popup showing
  2022-02-08  9:14 ` Lars Ingebrigtsen
@ 2022-02-08 10:12   ` Николай Пузанов
  2022-02-08 10:13     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Николай Пузанов @ 2022-02-08 10:12 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 20072

Hi!
This bug did not show up again. Now I checked on the latest version of Emacs,
everything is fine. To be honest, I even forgot that I sent a bug
report about it.
I think this issue can be closed.

On Tue, Feb 8, 2022 at 12:14 PM Lars Ingebrigtsen <larsi@gnus.org> wrote:
>
> Nikolay Puzanov <punzik@gmail.com> writes:
>
> > I found bug on display a popup window from auto-complete-mode. I attach two
> > screenshot and init.el. Bug appear when global-linum-mode is on.
> >
> > Commit e589765 bring this bug. I changed the line that seemed most appropriate.
> > I not understand how it work, but this patch fix it:
>
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
>
> Are you still seeing this issue in recent Emacs versions?  I can't
> recall seeing any similar reports, and some of this display code has
> changed since this was originally reported.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#20072: Incorrect popup showing
  2022-02-08 10:12   ` Николай Пузанов
@ 2022-02-08 10:13     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 12+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-08 10:13 UTC (permalink / raw)
  To: Николай Пузанов
  Cc: 20072

Николай Пузанов <punzik@gmail.com> writes:

> This bug did not show up again. Now I checked on the latest version of Emacs,
> everything is fine. To be honest, I even forgot that I sent a bug
> report about it.
> I think this issue can be closed.

Thanks for checking; I'm closing this bug report, then.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-02-08 10:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-10 10:48 bug#20072: Incorrect popup showing Nikolay Puzanov
2015-03-10 17:03 ` Eli Zaretskii
2015-03-10 17:30   ` Nikolay Puzanov
2015-03-13 15:50     ` Eli Zaretskii
2015-03-13 17:17       ` Nikolay Puzanov
2015-03-13 17:46         ` Eli Zaretskii
2015-03-13 17:53           ` Nikolay Puzanov
2015-03-14 18:05             ` Eli Zaretskii
2015-03-16 20:20               ` Eli Zaretskii
2022-02-08  9:14 ` Lars Ingebrigtsen
2022-02-08 10:12   ` Николай Пузанов
2022-02-08 10:13     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).