unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Forcing emacs to refresh the display
@ 2008-08-07 17:02 brian greenfield
  2008-08-08  8:46 ` Juanma Barranquero
  0 siblings, 1 reply; 7+ messages in thread
From: brian greenfield @ 2008-08-07 17:02 UTC (permalink / raw)
  To: help-gnu-emacs

This isn't a Perl question, honest :)

I'm trying to automatically switch line numbers on (using linum-mode)
before invoking the perl debugger. linum-mode is activated, but the
line numbers don't display until I switch back to the original window.

The first thing that perldb does is to prompt the user for the command
line. ie, (read-from-minibuffer) or similar. At this point the perl
buffer doesn't have line numbers visible unless I C-x O into that buffer.

If I don't switch windows at this point, and let the debugger start,
it's prompt for a dubugging command and still the line numbers don't show
until I switch to the other buffer.

You can see the effect with this trimmed down code that doesn't
involve perl at all:

  (defun mydb ()
    "Saves buffer, deletes other window, turns on linum-mode and runs cperl-db"
    (interactive)
      (linum-mode)
      ;(force-window-update)
      ;(redraw-display)
      ;(setq redisplay-dont-pause t)
      ;(redisplay t)
      ;(sit-for 1)

      ;at this point I'd like line numbers visible, but they only appear
      ;if I switch windows and back again

      (read-from-minibuffer "press enter ") )

The commented-out functions are what I've tried to force the window
to update.

How can I force emacs (I've tried with 21.4.1, 22.2.1 and 23.0.60.1)
to refresh the display?





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

* Re: Forcing emacs to refresh the display
  2008-08-07 17:02 Forcing emacs to refresh the display brian greenfield
@ 2008-08-08  8:46 ` Juanma Barranquero
  2008-08-08  9:04   ` brian greenfield
  0 siblings, 1 reply; 7+ messages in thread
From: Juanma Barranquero @ 2008-08-08  8:46 UTC (permalink / raw)
  To: brian greenfield; +Cc: help-gnu-emacs

On Thu, Aug 7, 2008 at 19:02, brian greenfield <bri@zombie.org.uk> wrote:

> If I don't switch windows at this point, and let the debugger start,
> it's prompt for a dubugging command and still the line numbers don't show
> until I switch to the other buffer.
>
> You can see the effect with this trimmed down code that doesn't
> involve perl at all:
>
>  (defun mydb ()
>    "Saves buffer, deletes other window, turns on linum-mode and runs cperl-db"
>    (interactive)
>      (linum-mode)
>      ;(force-window-update)
>      ;(redraw-display)
>      ;(setq redisplay-dont-pause t)
>      ;(redisplay t)
>      ;(sit-for 1)
>
>      ;at this point I'd like line numbers visible, but they only appear
>      ;if I switch windows and back again
>
>      (read-from-minibuffer "press enter ") )

You talk about switching windows, but your example function does not
create any new window. Certainly running M-x mydb <RET> shows the line
numbers...

  Juanma




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

* Re: Forcing emacs to refresh the display
       [not found] <mailman.16058.1218168663.18990.help-gnu-emacs@gnu.org>
@ 2008-08-08  8:48 ` Markus Triska
  2008-08-09 13:49   ` brian greenfield
  0 siblings, 1 reply; 7+ messages in thread
From: Markus Triska @ 2008-08-08  8:48 UTC (permalink / raw)
  To: help-gnu-emacs

brian greenfield <bri@zombie.org.uk> writes:

> I'm trying to automatically switch line numbers on (using linum-mode)
> before invoking the perl debugger. linum-mode is activated, but the
> line numbers don't display until I switch back to the original window.

I could not reproduce your problem with the current CVS version of
Emacs; are you using the latest version of linum.el?


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

* Re: Forcing emacs to refresh the display
  2008-08-08  8:46 ` Juanma Barranquero
@ 2008-08-08  9:04   ` brian greenfield
  2008-08-08  9:09     ` Juanma Barranquero
  0 siblings, 1 reply; 7+ messages in thread
From: brian greenfield @ 2008-08-08  9:04 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: help-gnu-emacs

On Fri, Aug 08, 2008 at 10:46:49AM +0200, Juanma Barranquero wrote:
> On Thu, Aug 7, 2008 at 19:02, brian greenfield <bri@zombie.org.uk> wrote:
> 
> > If I don't switch windows at this point, and let the debugger start,
> > it's prompt for a dubugging command and still the line numbers don't show
> > until I switch to the other buffer.
> >
> > You can see the effect with this trimmed down code that doesn't
> > involve perl at all:
> >
> >  (defun mydb ()
> >    "Saves buffer, deletes other window, turns on linum-mode and runs cperl-db"
> >    (interactive)
> >      (linum-mode)
> >      ;(force-window-update)
> >      ;(redraw-display)
> >      ;(setq redisplay-dont-pause t)
> >      ;(redisplay t)
> >      ;(sit-for 1)
> >
> >      ;at this point I'd like line numbers visible, but they only appear
> >      ;if I switch windows and back again
> >
> >      (read-from-minibuffer "press enter ") )
> 
> You talk about switching windows, but your example function does not
> create any new window. Certainly running M-x mydb <RET> shows the line
> numbers...

After M-x mydb RET, the cursor is in the minibuffer and the main
window doesn't have line numbers. C-x o makes the main window active
and the line numbers appear, another C-x o moves the cursor back to
the minibuffer ready to answer the prompt.

I'd like the line numbers to appear without having to leave the
minibuffer.





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

* Re: Forcing emacs to refresh the display
  2008-08-08  9:04   ` brian greenfield
@ 2008-08-08  9:09     ` Juanma Barranquero
  0 siblings, 0 replies; 7+ messages in thread
From: Juanma Barranquero @ 2008-08-08  9:09 UTC (permalink / raw)
  To: brian greenfield; +Cc: help-gnu-emacs

On Fri, Aug 8, 2008 at 11:04, brian greenfield <bri@zombie.org.uk> wrote:

> After M-x mydb RET, the cursor is in the minibuffer and the main
> window doesn't have line numbers. C-x o makes the main window active
> and the line numbers appear, another C-x o moves the cursor back to
> the minibuffer ready to answer the prompt.

That's not what I see.

emacs -Q
C-y             ; to paste your function
C-x C-e         ; to define mydb
M-x mydb <RET>  ; the minibuffer shows "pres enter " and the *scratch*
buffer shows line numbers.

What version of Emacs are you using?

  Juanma




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

* Re: Forcing emacs to refresh the display
@ 2008-08-08 10:01 brian greenfield
  0 siblings, 0 replies; 7+ messages in thread
From: brian greenfield @ 2008-08-08 10:01 UTC (permalink / raw)
  To: help-gnu-emacs

On Fri, Aug 08, 2008 at 11:09:30AM +0200, Juanma Barranquero wrote:
> That's not what I see.
> 
> emacs -Q
> C-y             ; to paste your function
> C-x C-e         ; to define mydb
> M-x mydb <RET>  ; the minibuffer shows "pres enter " and the *scratch*
> buffer shows line numbers.
> 
> What version of Emacs are you using?

21.4.1, 22.2.1 and 23.0.60.1 and linum.el version 0.9.

Using linum.el as supplied with emacs23 (0.9wx) everything works as it
should! So, problem solved.

Thanks for your time Juanma





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

* Re: Forcing emacs to refresh the display
  2008-08-08  8:48 ` Markus Triska
@ 2008-08-09 13:49   ` brian greenfield
  0 siblings, 0 replies; 7+ messages in thread
From: brian greenfield @ 2008-08-09 13:49 UTC (permalink / raw)
  To: help-gnu-emacs

On Fri, Aug 08, 2008 at 10:48:43AM +0200, Markus Triska wrote:
> I could not reproduce your problem with the current CVS version of
> Emacs; are you using the latest version of linum.el?

No, I wasn't. I was using 0.9. :(

Using linum.el as supplied with emacs23 (0.9wx) everything works as it
should!





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

end of thread, other threads:[~2008-08-09 13:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-07 17:02 Forcing emacs to refresh the display brian greenfield
2008-08-08  8:46 ` Juanma Barranquero
2008-08-08  9:04   ` brian greenfield
2008-08-08  9:09     ` Juanma Barranquero
     [not found] <mailman.16058.1218168663.18990.help-gnu-emacs@gnu.org>
2008-08-08  8:48 ` Markus Triska
2008-08-09 13:49   ` brian greenfield
  -- strict thread matches above, loose matches on Subject: below --
2008-08-08 10:01 brian greenfield

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).