jEdit Community - Resources for users of the jEdit Text Editor
jEdit 4.4.1 Windows nits
Submitted by dirckb on Monday, 25 July, 2011 - 20:09
Switching to jEdit 4.4.1 on Windows 7; so far I'm enjoying jEdit, but are are some minor annoyances:

* using command line to open a file in jEdit will not switch the keyboard focus to jEdit.

Here's a workaround: front.py

#   bring named window to front
import re
import sys
import win32gui

def winEnumHandler(hwnd, match):
    if win32gui.IsWindowVisible(hwnd):
        if match(win32gui.GetWindowText(hwnd)):
            print "found"
            win32gui.SetForegroundWindow(hwnd)
            win32gui.SetFocus(hwnd)

def front(pattern):
    match = re.compile(pattern).match
    win32gui.EnumWindows(winEnumHandler, match)

if __name__ == '__main__':
    front(sys.argv[1])
and j.cmd:
start C:\PROGRA~1\jEdit\jedit.EXE %*
front "jEdit.*"
This helps but doesn't seem to work every time. Probably needs an event flush somewhere.

Another nit:

* jEdit uses alt+ keys (arrow, pgup/pgdown/home/end, etc). I like to use the keypad (w/numlock off) for these keys, but with alt+keypad, Windows insists on adding a Unicode character, even with numlock off.

I've done some googling but haven't found a workaround for this yet. Might have to add alternate mappings for the relevant shortcuts.

Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Lockups
by dirckb on Thu, 04/08/2011 - 17:35
I've been getting occasional lock-ups where jedit won't respond to the mouse or keyboard, but doesn't seem to be hung in a loop. These may have been caused by the front.py hack. Apparently the win32.SetFocus call isn't necessary, and this call is the suspect for my new problem. Here's the current front.py:
#   bring named window to front
import re
import sys
import win32gui

def winEnumHandler(hwnd, match):
    if win32gui.IsWindowVisible(hwnd):
        if match(win32gui.GetWindowText(hwnd)):
            print "Found:", win32gui.GetWindowText(hwnd)
            win32gui.SetForegroundWindow(hwnd)

def front(pattern):
    win32gui.EnumWindows(winEnumHandler, re.compile(pattern).match)

if __name__ == '__main__':
    front(sys.argv[1])
 
More locking up in Windows 7
by dirckb on Mon, 08/08/2011 - 20:29
OK, even without my silly little front.py hack, the jedit window can get stung. A seemingly consistent case: from the Windows command line (cmd), try to open a '*.py' file that doesn't exist. Switch to the jEdit window and it won't respond to mouse or keyboard. Tried with both the jedit.exe and running the jedit.jar from a java command line.

Maybe this isn't the same lockup from before, although it's the same behavior - this one only happens if the JPyDebug plugin is installed.

The previous lockup seemed a lot more random, and I didn't have JPyDebug installed at the time. Guess I could go to vanilla jEdit and slowly add stuff back in until it breaks.
 
Splash is already disabled
by dirckb on Wed, 24/08/2011 - 05:21
And my focus problems usually occur when switching to an already-running jEdit.

Thanks for the tip, though.
User login
Browse archives
« November 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   101634
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17481
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300