help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Forcing emacs to refresh the display


From: brian greenfield
Subject: Forcing emacs to refresh the display
Date: Thu, 7 Aug 2008 18:02:39 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]