3 <!DOCTYPE faq SYSTEM "faq.dtd" >
5 <!-- $Id: faq.xml,v 1.5 2002/12/13 17:20:25 edg Exp $ -->
11 A quick note on the syntax of this file
12 ========================================
14 This XML file is based on the DTD specified in "faq.dtd". See "faq.dtd" for
15 a rigourous definition; a simple overview is given here, to help in making
16 quick additions and modifications.
18 The FAQ is composed of two parts : a <head> and a <body>. The <head>
19 contains the title (in our case, "NEdit Frequently Asked Questions"), the
20 list of <maintainers>, a <summary> which gets displayed ahead of all
21 questions, a section showing how to download the FAQ (<download>) and
22 other, less important stuff.
24 The <body> part is composed of many FAQ <section>s. A section has a title
25 and groups several FAQ entries. A particular section exists, called
26 <about-section>, which contains the description of the FAQ itself.
28 A section is generally composed of several "Question 'N' Answer" entries
29 (<qna>). A <qna> contains a question (<q>) and the answer to that question
30 (<a>). An identifier must be given to each <qna>, via the attribute "id". A
31 longer version of the question may be specified via <long-q> as another
32 element of <qna>; in this case, the <q> is displayed in a table of
33 questions, while the longer and more complete version, <long-q>, is
34 displayed along with the answer.
36 The <long-q> and <a> elements contain text paragraphs. The <q> doesn't
37 contain paragraphs and behaves like a single paragraph itself.
39 A text paragraph is indicated by one of the elements <p>, <blockquote>,
40 <ul>, <ol> and <pre> (which, in the DTD, are collectively referred to as
43 The <p> denotes a basic paragraph and contains text.
45 The <blockquote> indicates an indent, and it contains other paragraphs
46 inside. A nested <blockquote> will indent relative to the previous one.
48 The <ul> and <ol> indicate respectively an unnumbered and a numbered
49 list. Both <ul> and <ol> contain one or many <li> elements. A <li>
50 element contains text.
52 The <pre> indicates a preformatted piece of text, which will be output
53 with no further modifications.
55 Paragraphs of type <p> and <li>, as well as <q> and a few other elements of
56 the <head>, contain text. Text is composed of free text and style elements.
57 The style elements are the following :
59 <email> indicates an e-mail address.
61 <img> indicates an image. It has a required attribute "src" which must
62 be a URL referring to the image, and a "alt" attribute containing
63 alternate text, used for non-image-capable formats.
65 <site> indicates a web site. The text between <site> and </site> must be
68 <link> indicates a HTTP hyperlink. Its required attribute "href" must be
69 the URL to link to. An attribute "alt" may contain alternate text.
71 <em> stands for emphasized text.
73 <strong> stands for strong text.
75 <tt> is used for terminal output and for the contents of configuration
78 <code> is used for command names, when included inline within text.
79 Generally, <pre> paragraphs are used for several lines of code.
81 The distinction between <tt> and <code> and furthermore <pre> is not so
82 clear. A clearer and better definition is needed.
86 ========================================
95 <title>NEdit Frequently Asked Questions</title>
97 <version>2001/10/01</version>
101 <!-- several maintainers can be added -->
103 <name>Florian Xhumari</name>
104 <email>Florian.Xhumari@free.fr</email>
105 <subject>NEdit FAQ</subject>
111 <p>NEdit is a popular GUI-style text editor for Unix and VMS systems.
112 These are answers to the most frequently asked questions to
113 discuss@nedit.org. This information is also available from:</p>
116 <p><site>ftp://ftp.nedit.org/pub/</site><current>/FAQ,</p>
119 <p>and from the NEdit web page at:</p>
122 <p><site>http://nedit.org</site>.</p>
128 <p>The FAQ is available for download in a variety of formats.</p>
131 <li>HTML pages: <site>faq.tar.gz</site>
132 or <site>faq.zip</site>.</li>
134 <li>Plain text: <site>faq.txt</site>.</li>
136 <li>XML source: <site>faq.xml</site>
137 as well as its DTD <site>faq.dtd</site>.</li>
151 <about-section id="about">
152 <title>About the NEdit FAQ</title>
154 <p>This FAQ is written in XML and translated to HTML using
155 an XSL stylesheet. The XML source is processed using
156 <link href="http://www.jclark.com/">James Clark's</link> XSLT processor
157 <link href="http://www.jclark.com/xml/xt.html">XT</link> and
158 XML parser <link href="http://www.jclark.com/xml/xp">XP</link>.
161 <p>The XSL stylesheet used to generate the HTML version is
162 <link href="faq.xsl">here</link>.</p>
164 <p>The text version is generated in three steps: first,
165 <link href="faq-txt.xsl">an XSL stylesheet</link>
166 is used to generate a simple HTML. Then,
167 <link href="faq-txt-pass2.xsl">a second XSL stylesheet</link> transforms
168 the HTML into plain text.
169 <link href="faq-txt.awk">An awk script</link>
170 then performs the word wrapping.</p>
172 <p>For any questions about or contributions to the FAQ, please
174 <link href="mailto:Florian.Xhumari@free.fr">maintainers</link>.
181 <section id="sect_information">
183 <title>Where to get information</title>
187 <qna id="first-info">
188 <q>Where can I get information about NEdit?</q>
192 <p>The NEdit web page is at:</p>
194 <blockquote><p><site>http://nedit.org</site></p></blockquote>
196 <p>and it is mirrored in Australia at:</p>
198 <blockquote><p><site>http://www.au.nedit.org/</site></p></blockquote>
201 <p>The primary ftp site for NEdit is:</p>
203 <blockquote><p><site>ftp://ftp.nedit.org/pub</site></p></blockquote>
205 <p>which has a mirror in The Netherlands:</p>
207 <blockquote><p><site>ftp://ftp.nl.nedit.org/pub/mirror/NEdit</site></p></blockquote>
210 <p>The NEdit ftp site has executables for most Unix and VMS
211 systems, sources, documentation, and contributed software.</p>
213 <p>The first and easiest place to look for help with NEdit is the NEdit Help
214 menu. The bottom item in the menu (Problems/Bugs) has answers to the most
215 commonly asked questions about NEdit, which are not duplicated here. Also
216 check the platform specific information in the README file packaged in
217 the NEdit distribution kits.</p>
219 <p>If you have a problem that you really can't figure out, send mail
220 to <email>discuss@nedit.org</email>, and see if anyone else might be
221 having the same trouble. The nedit developers also subscribe to this
222 list, and hopefully someone will be able to answer your question.
223 If you are a Silicon Graphics user and NEdit
224 came bundled on your system, you can also contact SGI's technical support.</p>
230 <qna id="mailing-lists">
231 <q>Are there any mailing lists for NEdit users?</q>
235 <p>There are two separate mailing lists for nedit users, and one for
236 developers. Users may post to the developer mailing list to report
237 bugs and communicate with the nedit developers.</p>
240 <p>The lists are:</p>
244 <li><email>discuss@nedit.org</email>: general discussion, questions and
245 answers among nedit users and developers.</li>
247 <li><email>develop@nedit.org</email>: communication among and with
248 nedit developers. Developers should also subscribe to the discuss
251 <li><email>announce@nedit.org</email>: a low-volume mailing list for
252 announcing new versions.</li>
256 <p>Please note that only subscribers can send mail to the list. </p>
258 <p>The nedit developers subscribe to both
259 <email>discuss@nedit.org</email> and <email>develop@nedit.org</email>,
260 either of which may be used for reporting bugs. If you're not sure,
261 or you think the report might be of interest to the general nedit
262 user community, send the report to <email>discuss@nedit.org</email>. If it's
263 something obvious and boring, like we misspelled "anemometer" in the
264 on-line help, send it to <email>develop@nedit.org</email>.</p>
266 <p>Please do not cross post to both lists!</p>
270 <p>In order to subscribe to a list, send mail to <email>majordomo@nedit.org</email>
271 with one or more of the following in the body of the message:</p>
279 <p>To unsubscribe do the same with the keyword <strong>unsubscribe</strong>.</p>
287 <p>After subscribing, you will receive copies of all of the email
288 submitted to the lists. You may submit mail to the discussion list by
289 sending it to the appropriate list: <email>discuss@nedit.org</email>,
290 <email>develop@nedit.org</email> or
291 <email>announce@nedit.org</email>.</p>
293 <p>The archives of the old mailing lists (nedit_discuss@fnal_gov and
294 nedit_announce@fnal.gov) can be found on egroups.com:</p>
298 <li><site>http://www.egroups.com/group/nedit_discuss/</site></li>
299 <li><site>http://www.egroups.com/group/nedit_announce/</site></li>
303 <p>For more information about the mailing lists, refer to the <link
304 href="http://nedit.org/community/mailing.shtml">mailing lists
305 section</link> in the NEdit site.</p>
313 <q>Where can I get binaries / executables for machines other than
314 those available at NEdit site?</q>
318 <p>In past versions, we separated "supported" and "unsupported" executables
319 and divided them between the binary and contrib directories. With more
320 supported systems, you're less likely to find executables in the contrib
321 directory, but it's worth a peek, anyhow. If you can't find anything
322 appropriate, you can try asking in a usenet news group appropriate to your
323 system. Other places to try are, the
324 <email>discuss@nedit.org</email> mailing list, or
325 <site>news:comp.windows.x.apps</site>
326 or <site>news:comp.editors</site>.</p>
332 <qna id="info_contrib">
333 <q>What can I contribute?</q>
337 <p>If you use and enjoy NEdit, and feel like giving something
338 back to the NEdit user community, contact
339 <email>develop@nedit.org</email>. If you have ported NEdit to a new
340 machine, written a useful set of macros, or would like to contribute
341 to an ongoing development project, we'd love to hear from you.</p>
355 <section id="sect_reporting">
357 <title>Diagnosing and reporting problems</title>
360 <q>How do I report problems I've encountered using NEdit ?</q>
364 <p>If you have a problem which is not covered in the on-line help, in this FAQ,
365 or in the README file specific to your system, you can report it to
366 <email>discuss@nedit.org</email> (usage questions) or,
367 <email>develop@nedit.org</email> (error reports). Note that these lists only
368 allow members to post, and if you are not a member, your post will probably de
369 delayed in reaching the list. Alternatively you can use the bug tracker on
370 Sourceforge (<site>http://sourceforge.net/projects/nedit/</site>) to report
371 bugs and make feature requests. Below are some suggestions for information you
372 can provide to help in diagnosing your problem.</p>
374 <p>Because NEdit runs on a large number of different platforms and environments,
375 many problems are platform-specific. It's always helpful to know what kind of
376 system it's being run on. Sometimes, strange behavior can also be traced to
377 the X server software or window manager, so you may want to include information
378 on these as well.</p>
380 <p>The origin of the NEdit executable is often important, particularly, whether
381 it came from the NEdit site (<site>http://www.nedit.org</site>), was built
382 locally, or came from some other ftp server or freeware distribution CD.
383 Despite the fact that Motif appears on almost all Unix platforms, the Motif
384 libraries still vary from one machine to another. Be sure to mention whether
385 you're using Lesstif or Motif. As of version 5.2 a summary with build
386 information is present under 'Version' in the Help menu.</p>
389 <p>If you are having configuration or appearance problems, you should probably
390 look at the output from the command:</p>
396 <p>The <code>appres</code> command will show you the resources that
397 NEdit actually sees when it runs, including "stray" resources
398 intended for other programs but not properly qualified by the program
399 name. It will also give you a final objective check as to whether
400 resource settings that you have made are actually readable by
420 <section id="sect_building">
422 <title>Building</title>
428 When I build NEdit on my SunOS system, I get undefined
429 symbols: <tt>_memmove</tt>, <tt>_atexit</tt>,
435 <p>When I build NEdit on my SunOS system, I get the fillowing undefined
444 make: Fatal error: Command failed for target `nedit'
451 <p>Older versions of the gcc C runtime library were missing these functions. You
452 can either upgrade gcc, or get sources for these functions from
453 <site>ftp://ftp.nedit.org/pub/contrib/misc</site>
454 (which someone else with your very same problem kindly contributed).</p>
460 <q>I'd like to build NEdit, but my system seems to be missing the Xm...
461 include files and libXm.a</q>
465 <p>Xm means Motif, which is an important part of NEdit's GUI interface. Motif
466 is standard on commercial Unix workstations, but not on free Unix platforms
467 like Linux and FreeBSD. On these systems, you can now use LessTif, the
468 GPL clone of Motif, or purchase a copy of Motif, which is usually relatively
469 inexpensive, but not free. You can find a list of companies selling Motif
474 <site>http://www.cen.com/mw3/#providers</site>
478 <p>As of this writing LessTif is very close to being a fully reliable and
479 complete replacement for Motif, so it's definitely worth trying before
480 shelling out any money for a commercial copy. Also remember that in most
481 cases, you don't really need Motif libraries to use NEdit. There
482 are plenty of versions available pre-built with the Motif libraries
483 linked in statically. If you can't find one for your system, ask around,
484 and you may find that someone else has already built one for you. Motif
485 licensing allows free distribution of statically linked binaries.
486 Executables for NEdit are available from
487 <site>ftp://ftp.nedit.org/pub/</site><current-version>/executables.</p>
493 <q>When I build NEdit, I get the yacc error: <tt>conflicts: 36 shift/reduce</tt></q>
496 <p>When I build NEdit, I get the yacc error:</p>
498 conflicts: 36 shift/reduce
504 <p>That's normal. NEdit's macro language has a very conflicted grammar, but the
505 conflicts all resolve themselves correctly. The conflicts stem from allowing
506 awk-style no-operator concatenation of strings.</p>
512 <q>I built NEdit on my Linux system, and it's full of bugs. What a horrible
517 <p>Several of the Linux distributions began including LessTif (a free
518 version of the Motif GUI library) before it was really ready for
519 general use (particularly for something which needs to be as reliable
520 as a text editor). If you have a version of Lesstif prior to 0.92.26,
521 you have to upgrade it, before it will support NEdit reliably. To get
522 the newest version, go to <site>http://lesstif.org</site>. Alternatively,
523 you can get pre-built, statically linked, executables from
524 <site>ftp://ftp.nedit.org/pub/</site><current-version>/executables.</p>
532 <author><name>Thorsten Haude</name></author>
534 <q> While compiling NEdit on Linux, I get a warning about
535 <code>tmpnam</code> being dangerous. </q>
538 <p>While compiling NEdit on Linux, I get the following warning:</p>
541 file.o: In function `PrintString':
542 file.o(.text+0x17b7): the use of `tmpnam' is dangerous, better use `mkstemp'
545 <p>Is NEdit insecure?</p>
551 <p>Not if you are using the glibc. The algorithm of mkstemp(3) consists of
552 two parts: the first part is the one used in tmpnam(3) -- this is what
553 NEdit accomplishes by calling tmpnam(3); the second part is done directly
561 <author><name>Joor Loohuis</name></author>
563 <q>NEdit fails to build on Linux, with messages about `XpGetDocumentData'</q>
566 <p>NEdit fails to build on Linux, with messages</p>
569 undefined reference to `XpGetDocumentData'
570 undefined reference to `XpGetPageDimensions'
578 <p>Edit makefiles/Makefile.Linux, and add '-lXp' to the line starting with
579 'LIB', right before '-lXext'. At this time we are not sure whether libXp
580 (the X print library) is installed on all Linux systems.</p>
598 <section id="sect_customization">
600 <title>Customization</title>
603 <q>I can't get the delete key to remap to a forward delete</q>
605 <long-q><p>I can't get the delete key to remap to a forward delete. I
606 have re-bound it in my .Xdefaults file, and that doesn't
611 <p>In your .Xdefaults file, add:</p>
614 <p><tt>nedit.remapDeleteKey: False</tt></p>
617 <p>This is now the default, so you likely have an old resource file
618 sitting around somewhere with this setting. When <tt>remapDeleteKey</tt> is
619 <tt>True</tt>), NEdit forcibly maps the delete to
620 backspace. This can be used when the X server and the client
621 machine have different expectations about whether the key in the
622 backspace position on the keyboard is a backspace key or a delete
623 key. It also saves users in very heterogeneous environments
624 from having to re-map keys on nearly every system they use
625 just to be able to backspace.</p>
631 <q>My X resource settings don't work.</q>
635 <p>It's harder to explain how to specify X resources than you might
636 expect, since how they are set is often configured by your local
637 system manager. They are either automatically attached to the server
638 (your screen) by an X startup or login script, or they are left
639 unspecified, and read from the .Xdefaults file whenever you run an X
640 application. If they are attached to the server, you should find out
641 the "normal" method for setting them on your system. If it's not the
642 .Xdefaults file, then it is usually a file called .Xresources (also
643 in your home directory). To make a change, you have to either run
644 xrdb, or re-invoke the startup script that originally attached them,
645 usually by exiting and re-starting X, or logging out and back in to
648 <p>Since setting resources is tricky, it's usually better to start with
649 something simple, like:</p>
652 <p><tt>nedit*foreground:green</tt></p>
655 <p>Then, once you have that working, try the more subtle or difficult ones.
656 You can also use the appres command to find out what resources nedit
657 actually sees (<code>appres NEdit nedit</code>).</p>
663 <q>I am setting some X defaults in my $HOME/.nedit file but some of
668 <p>The .nedit file holds the NEdit Preferences menu options and is
669 automatically overwritten whenever you select "Save Defaults". You
670 really shouldn't put X resource settings there. Also, as you may have
671 discovered, resources other than Preferences resources don't always
674 <p>How you set X resources depends on local system conventions. You
675 usually put them in the .Xdefaults or .Xresources file in your home
676 directory. You may also need to run xrdb to install them in the server.
677 It depends on how your local system has been configured, so it's best
678 to talk to the person who configured your system. If you're not sure
679 whether your resources are set up correctly, the command:</p>
685 <p>will tell you what settings NEdit will see when it runs.</p>
692 <q>If I install an "app-defaults" file for NEdit (empty too), all default
693 shortcuts are reset</q>
696 <p>If I install an "app-defaults" file for NEdit (empty too), all default
697 shortcuts are reset (only "Alt+B" and "Alt+Z" works). Without that file
698 all works fine. Now, how can I customize nedit with this problem ? Or,
699 how can I get a copy of all default shortcuts to add on my NEdit
700 "app-defaults" file ?</p>
705 <p>NEdit uses the X fallback resources mechanism to provide default values
706 for user-settable resources. When you provide a system-wide app-
707 defaults file, it overrides the entire contents of the fallback
708 resources, meaning all of the program defaults are lost, except for
709 those which are also represented in the app-defaults file. To use an
710 app-defaults file, therefore, you need to start from a complete one
711 which provides all of the necessary default values. There is a complete
712 app-defaults file in:</p>
715 <p><site>ftp://ftp.nedit.org/pub/contrib/misc/nedit.app-defaults</site></p>
718 <p>We strongly discourage users from using system-wide app-defaults because
719 once you install the file, you have to keep it up to date with every new
720 release of the software. If you don't update it, users might not even
721 notice the difference, but things will be increasingly wrong with each
728 <q>Where can I get the complete list of nedit resources?</q>
732 <p>The way X is designed, there are a LOT of user settable resources in NEdit,
733 most of them quite useless. You can see them all using the editres tool,
734 which is available on most Unix systems. A more useful subset are the
735 application default resources, which you can look at either in the source code
736 (near the beginning of nedit.c, in the variable called fallbackResources) or
737 in the app-defaults file in:</p>
740 <p><site>ftp://ftp.nedit.org/pub/contrib/misc/nedit.app-defaults</site></p>
746 <qna id="N386"> <q>Can I use <code>ispell</code> with NEdit instead of the less
747 capable Unix <code>spell</code> command?</q>
751 <p><code>ispell</code> is actually the default spell checker for NEdit on Linux systems where
752 <code>spell</code> is not available. On other systems, enter the following in the Shell
756 Command Input: Either
757 Command Output: Same Window
758 Output Replaces Input: ON
759 Shell Command: cat>spellTmp; xterm -e ispell -x spellTmp; cat spellTmp; rm spellTmp
762 <p>If you want to get fancy, the following puts the temporary file in the /tmp
763 directory, and uses $$ (the process ID of the shell) in the file name so you
764 don't have to worry about clashes between simultaneous ispell sessions:</p>
767 cat > /tmp/ispell.$$; xterm -title "Spell Check" -e
768 ispell -S /tmp/ispell.$$; cat /tmp/ispell.$$; rm /tmp/ispell.$$
775 <q>How can the display of hidden (eg .login) files in dialog boxes be
779 <p>How can the display of hidden (eg .login) files in dialog boxes be
780 suppressed? We use nedit with for teaching programming with very naive
781 and inexperienced students. The display of these in dialogs such as the
782 "Save as..." one encourages them to screw up important login stuff, state
788 <p>It depends on the system you are running how easy this is to do. Under
789 Motif 2.0, which I think is still only found on Linux and Free-BSD systems,
790 it's a simple resource setting:</p>
793 <p><tt>nedit*XmFileSelectionBox.fileFilterStyle: FILTER_HIDDEN_FILES</tt></p>
796 <p>On other systems, unfortunately, it's a rather difficult source code change,
797 involving creating a replacement file searching procedure to be spliced in
798 to the file selection box widget.</p>
805 <q>Why, in the 'open file' dialog, there is no text field where to
806 type in the file name?</q>
809 <p>Most Motif applications allow you to type in the file name in a separate
810 text field (as in the 'open file' dialog). Why doesn't NEdit? Can
811 I make it do that?</p>
816 <p>Set the X resource nedit.stdOpenDialog to True. The field is disabled by
817 default to get new users accustomed to typing the file name directly in to
818 the list widget, which is not standard Motif behavior.</p>
824 <q>I would like to change NEdit's cursor from a
828 <p>I would like to change NEdit's cursor from a
829 bar to a block. I seem to lose it sometimes in my text.</p>
834 <p>The block cursor in NEdit is used to indicate overstrike mode, but
835 you can turn on a resource to make the cursor thicker:</p>
838 <p><tt>nedit*text.heavyCursor: true</tt></p>
841 <p>The only way to get a permanent block cursor, though is to hack the source
842 code. This shouldn't be too difficult, since the code for drawing a block
843 cursor is already there.</p>
849 <q>I'd like to see more than 8 files in the file selection dialogs (Open,
853 <p>I'd like to see more than 8 files in the file selection dialogs (Open,
854 Save As, Include, etc.). I've tried to set the X-resources like
855 nedit*XmList.visibleItemCount: 20, but this did not work.</p>
860 <p>The only effective way I've found to control the number of items in
861 the highly temperamental Motif FileSelectionBox widget is through the
865 <p><tt>nedit*FileSelect.height: 900</tt></p>
868 <p>The X resource line above will make the file selection box 900 pixels
876 <q>I am trying to do key bindings such that, for example, Find is Alt+F rather
877 than Ctrl+F, but this clashes with the find menu mnemonic</q>
880 <p>I am trying to do key bindings such that, for example, Find is Alt+F rather
881 than Ctrl+F. However, this clashes with the find menu mnemonic. I realize
882 that the menu mnemonics can be changed to any letter, but they are always
883 bound to Alt-letter. I would like to just remove all menu mneumonics. Is
884 there any way to do this in an .Xdefaults file?</p>
889 <p>You can turn mnemonics off by setting them to the ascii null character, for
893 <p><tt>nedit*fileMenu.mnemonic: \0</tt></p>
901 <q>I have a PC-style 2-button mouse and I would like to switch the 2nd and 3rd
902 (emulated) mouse buttons</q>
905 <p>I have a PC-style 2-button mouse. Can I switch the 2nd and 3rd mouse
906 buttons so the more important functions like secondary selection are on
907 the right button instead of the middle (which is emulated by pressing 1+3
908 buttons simultaneously under Linux), like they were in version 4?</p>
913 <p>It's somewhat involved and hard to figure out from the documentation, but
914 yes you can. You have to reverse the translation table bindings for mouse
915 buttons 2 and 3, AND reset the bgMenuButton resource. The translation table
916 bindings can either be found in the source file source/text.c, or by adding
917 and activating a temporary translation to the text widget for dumping the
918 translation table itself (XtDisplayTranslations()).</p>
920 <p>What it boils down to, though, is just add the following lines to your X
921 resource file (.Xdefaults or .Xresources depending on your system):</p>
924 NEdit*text.Translations: #override \n\
925 <Btn3Down>: secondary_or_drag_start()\n\
926 Shift Ctrl Button3<MotionNotify>: \
927 secondary_or_drag_adjust("rect", "copy", "overlay")\n\
928 Shift Button3<MotionNotify>: secondary_or_drag_adjust("copy")\n\
929 Ctrl Button3<MotionNotify>: secondary_or_drag_adjust("rect", "overlay")\n\
930 Button3<MotionNotify>: secondary_or_drag_adjust()\n\
931 Shift Ctrl<Btn3Up>: move_to_or_end_drag("copy", "overlay")\n\
932 Shift <Btn3Up>: move_to_or_end_drag("copy")\n\
933 Alt<Btn3Up>: exchange()\n\
934 Meta<Btn3Up>: exchange()\n\
935 Ctrl<Btn3Up>: copy_to_or_end_drag("overlay")\n\
936 <Btn3Up>: copy_to_or_end_drag()\n\
937 Ctrl~Meta~Alt<Btn2Down>: mouse_pan()\n\
938 Ctrl~Meta~Alt Button2<MotionNotify>: mouse_pan()\n\
939 <Btn2Up>: end_drag()
940 nedit.bgMenuButton: ~Shift~Ctrl~Meta~Alt<Btn2Down>
947 <q>How can I make a shell command prompt me for input?</q>
950 <p>I'd like to send mail directly from my nedit window, but there's no good
951 way to make a shell command prompt me for input (for entering the recipient
957 <p>Use a macro command instead to do the prompting:</p>
960 to = string_dialog("Send mail to: (enter name below, along with any\n" \
961 "additional Unix Mail command parameters, -s for subject)", \
963 if ($string_dialog_button == 2 || $string_dialog_button == 0)
965 if ($selection_start == -1)
966 body = get_range(0, $text_length)
968 body = get_selection()
969 cmdOutput = shell_command("Mail " to, body)
970 if ($shell_cmd_status != 0)
971 dialog("mail command returned failed exit status\n" cmdOutput)
972 else if (cmdOutput != "")
980 <q>How I can set the foreground color for selected
981 text when syntax highlighting is applied?</q>
984 <p>How I can set the foreground color for selected
985 text to be always say grey1 even when syntax highlighting is applied?</p>
990 <p>There's no equivalent to the
991 <tt>nedit*text.selectForeground</tt> resource when you turn on
992 syntax highlighting. You just have to choose a selection color that
993 is compatible with all of your highlighting colors.</p>
1011 <section id="sect_features">
1013 <title>Features</title>
1016 <q>Why NEdit does not support drag and drop?</q>
1019 <p>I'm a little confused about what happend to drag and drop.
1020 I thought drag-N-drop was supported by the Motif library.</p>
1025 <p>NEdit no longer uses the Motif text widget, so all of the functionality
1026 had to be duplicated in the new widget. Drag and drop between windows got
1027 left off due to time pressure of getting out the new release, but it will
1028 be back some day.</p>
1034 <q>Why don't you integrate Max Vohlken's / Yunliang Yu's versions into the
1035 official release of NEdit</q>
1039 <p>Many of their changes will eventually find their way in to the "official"
1040 version, but some will not. Max has really done quite a lot of stuff.
1041 I appreciate it, and I think it's kind of neat to have a "bleeding edge"
1042 version of NEdit around to try out new features. </p>
1044 <p>I can't just apply Max's patches to our version and release it. Some of
1045 them break the VMS version, some interfere with existing commands that
1046 are important to other users, and some are just customizations that I
1047 don't particularly agree with. Mostly, I want to do a lot of testing to
1048 make sure the changes are safe on all platforms, and I just don't have
1049 time right now. (Mark Edel)</p>
1051 <p><strong>Update as of NEdit version 5.2RC1:</strong> The forthcoming
1052 NEdit version 5.2 contains several functionalities of Max's patches.</p>
1059 <q>Is it possible to use NEdit on windows 95 or NT?</q>
1062 <p>I really like nedit and it would be nice to use on windows 95 or NT
1063 instead of word or notepad. Is this possible?</p>
1068 <p>There is an NT version of NEdit, available at
1069 <site>http://nedit.org/download/win32.shtml</site>. A mini-FAQ is also
1076 <q>Why aren't there pre-entered default values in text fields of dialogs?</q>
1079 <p>A feature which is found in in some Macintosh and PC programs, which I
1080 like, is to provide pre-entered default values in text fields. For example,
1081 the find and replace dialogs could show the last search/replace string, or
1082 the currently selected text. These programs select the text, so simply
1083 typing in the field automatically replaces the default without any extra
1084 work from the user.</p>
1089 <p>X has a strict convention that there can be only one selection at
1090 a time on the whole display. This means that some of the tricks used
1091 in PC and Macintosh programs don't work in X. On PCs and Macs,
1092 programs can fill in default values in text fields, and select the
1093 text that they have inserted such that If the user types over the
1094 selection, it will automatically be erased. Under X, there is a
1095 price to pay for making an automatic selection. The selection must
1096 be "stolen" from some other window, maybe some other program. If the
1097 user's intent was to paste a selection that existed before the dialog
1098 popped up, once the automatic selection is made, they are out of
1101 <p>If NEdit automatically transferred the selection to the Find or Replace
1102 dialog, it would either have to steal the selection, or users would
1103 have to click or drag the mouse over the text to delete it before they
1104 could type anything different. Instead, NEdit has a "Find Selection"
1105 command, as well as various methods of pasting and copying the
1106 selection into dialog fields. It also allows you to recall of previous
1107 search strings in the Find and Replace dialogs via the up-arrow and
1108 down-arrow keys.</p>
1114 <q>I would like to use (multiple fonts, special symbols) in my file, but
1115 NEdit seems to allow just one single font.</q>
1119 <p>NEdit is a plain text editor, not a word processor. Plain text files have
1120 no font or formatting information contained in them, they are just a string
1121 of ascii characters. While you might find a font with limited symbols and
1122 greek letters, your troubles would just be beginning. You'd still have
1123 trouble getting the printer to agree and print out the characters as they
1124 appeared in NEdit. For anything involving font changes or special symbols,
1125 you need a word processor, such as Microsoft Word, or a text
1126 formatting program like LaTEX.</p>
1132 <q>Auto-wrap doesn't work well</q>
1135 <p>Auto-wrap doesn't work very well. When I type in the middle of a line, I
1136 can push the end of the line beyond the right margin, and when I delete,
1137 It doesn't keep the right edge of the text lined up.</p>
1142 <p>You probably want continuous wrap mode (Preferences -> Wrap
1143 -> Continuous).</p>
1145 <p>Because NEdit is not a word processor, it is stuck with the limits
1146 of the plain text format. In the default, auto-newline, wrapping
1147 mode, nedit does wrapping by inserting newline characters. Because
1148 there is only one newline character, NEdit can't distinguish a
1149 newline which can be "unwrapped" from one which the user intended to
1150 be permanent. While it might be possible for NEdit to temporarily
1151 make that distinction, for example while the cursor is on a
1152 particular line that the user is typing, ultimately, NEdit will have
1153 to forget this information, because there is no way to save it in the
1154 file. Users who work in auto-newline wrap mode tend to make liberal
1155 use of the Fill paragraph command.</p>
1157 <p>In continuous wrapping mode, you can intentionally leave out the
1158 newlines within paragraphs, and lines will be wrapped as needed to
1159 fit within the page. When you edit in the middle of a paragraph, the
1160 text will be continuously adjusted. However, continuous wrap mode
1161 has it's limitations too. All paragraphs must be lined up against
1162 the right margin to take advantage of continuous wrapping, and Unix
1163 systems have limited support for files of that format. You may have
1164 trouble printing and viewing the files outside of NEdit.</p>
1170 <q>NEdit scrolls too fast when I extend a selection by dragging the mouse
1171 outside of the window.</q>
1175 <p>NEdit features proportional auto-scrolling, where the
1176 speed is controlled by how far your mouse is beyond the edge of the
1177 window. If you want it to scroll slower, bring the mouse back closer
1184 <q>Is there a special symbol that represents the selected text,
1185 usable in shell commands?</q>
1188 <p>Is there a special symbol (as % for filename in the shell commands)
1189 that can be used to represent the text that is selected, which can then
1190 be used as an argument to a command? For instance, I want to feed the
1191 selection to a script so that it can be used as the expression to a
1192 'grep' command. Is there any other way that I can accomplish this goal?</p>
1197 <p>Below is an example from the NEdit discussion list (from David L. Paterline)
1198 of a "Find All" command implemented by using the selection as an argument to
1199 the grep command:</p>
1202 <p>I set up a command to list all lines in a file which contain the
1203 highlighted selection as follows, using the Preferences -> Shell
1207 Menu Entry: all <selection>
1208 Command Input: selection
1209 Command Output: new window
1210 Save file before: yes
1211 Shell Command: grep -n -- "`cat -`" %
1214 <p>The <code>cat -</code> portion of the command echoes the selected text to the
1215 <code>grep -n</code> command, which lists the lines containing the selection
1216 with line numbers. The output of the command appears in a new
1217 window; I can then highlight a line number in the new window and
1218 use the Search -> Goto Selected menu in the original window to jump
1219 to the line in the original file.</p>
1226 <q>How can I print highlighted text on my printer as it appears in NEdit.</q>
1230 <p>In the current version, that's not possible, but there are external tools
1231 for highlighting, which are specifically designed for printing, including
1232 a2ps, enscript, and genscript.</p>
1252 <section id="sect_server_mode">
1254 <title>Server mode and nc</title>
1257 <q>I want to use <code>nc</code> as an external
1258 editor from my mailer, but my mailer doesn't wait for the editor
1263 which can invoke an external editor, but if I use nc, the mailer process
1264 continues and assumes the editor has finished, when in fact it hasn't.</p>
1269 <p>nc is actually finished communicating with the NEdit server when it
1270 returns. It's possible to create a shell command that invokes nc and
1271 then goes to sleep, and a second script to be run from the NEdit Shell
1272 menu, which looks for the sleeping process with a matching file name
1273 and kills it. Try the shell scripts in:</p>
1277 <site>ftp://ftp.nedit.org/pub/contrib/misc/</site>nc_and_wait.tar
1285 <q>I started nedit as root, then tried later to edit a file as myself with
1286 <code>nc</code>; the file was opened in the root's nedit</q>
1288 <long-q> <p>I started nedit (via <code>nc</code>) as root, and then
1289 later tried to edit a file as myself with <code>nc</code>. I was very
1290 suprised to see that a new nedit wasn't started--rather, I was given
1291 the old nedit window, with root permissions. Isn't this a security
1296 <p>Actually, NEdit does check who the user is. When you use the su
1297 command, however, several Unix variants return the original user name
1298 in response to the standard C library calls for getting a user name,
1299 rather than the name to which you have su'd. Starting with version 5.1,
1300 a different mechanism is used for getting this information, so you shouldn't
1301 see this problem any more.</p>
1303 <p>In your case, my guess is that you used su to become root, then
1304 started an nedit server as root. On a system which returns the
1305 original user name, both the new server and the nc client program
1306 think the user name is your original user name, so the server accepts
1307 requests from both you as root and you as you.</p>
1309 <p>The security of an nedit session, depends upon the security of your X
1310 server. Only those with access to your screen can send commands to an
1311 nedit server, but they can also send keystrokes to any nedit, or a shell
1312 window, etc... Anyhow, just upgrade to the latest NEdit version.</p>
1331 <section id="sect_techniques">
1333 <title>Editing techniques</title>
1336 <q>I'd like to select a large expanse of text
1337 without dragging all the way through it with the mouse.</q>
1341 <p>Using the shift key with the left mouse button, you can select all of the text
1342 between the cursor (or an existing selection) and the mouse.</p>
1345 <li>Position the cursor at one end of the desired selection</li>
1346 <li>Use the scroll bar to make the other end visible</li>
1347 <li>Shift+Click with the left mouse button to select the text between
1348 the cursor and the mouse</li>
1351 <p>Alternatively, using only keyboard navigation:</p>
1354 <li>Position the cursor at one end of the desired selection</li>
1355 <li>Type Alt-m and a letter to mark the position</li>
1356 <li>Use the keyboard to go to the other end of the desired selection</li>
1357 <li>Type Shift-Alt-g and the letter you used to mark the first end
1358 of the selection</li>
1366 <q>How can I select the text between two marks?</q>
1370 <li>Go to the first mark (Goto Mark).</li>
1371 <li>Hold the shift key while selecting Goto Mark or Alt+Shift+G to
1372 select the text.</li>
1395 <section id="sect_bugs">
1400 <q>The keyboard shortcuts (accelerator keys) are not
1401 working when 'Caps' or 'Num Lock' are switched on.</q>
1404 <p>The keyboard shortcuts (accelerator keys) are not
1405 working when 'Caps' or 'Num Lock' are switched on. Have I
1406 overlooked something obvious?</p>
1411 <p>You haven't overlooked anything, it's a Motif design flaw. Netscape
1412 painfully works around this and the Alt/Meta key reversal on Sun
1413 workstations by internally re-implementing the Motif menu accelerator
1414 mechanism. NEdit will likely follow suit with the release of version 5.2.</p>
1416 <p>Another possibility (writes Peter Daifuku of SGI):</p>
1419 <p>There's another answer which unfortunately isn't widespread as yet.
1420 For an X11R6.3 X server supporting the XKB extension, there is a
1421 mechanism to ignore the NumLock and CapsLock key as modifiers. The
1422 file /usr/lib/X11/xkb/X0-config.keyboard should contain the string
1423 IgnoreLockMods=NumLock+Lock . For systems with multiple displays,
1424 display 1 would be controlled by the file X1-config.keyboard, etc.</p>
1426 <p>On SGI systems, this mechanism is support on IRIX 6.2 with X server
1427 patch 1574 or later, on IRIX 6.3 and IRIX 6.4 and all later releases.</p>
1433 <qna id="NumLockBis">
1434 <q>Sometimes NEdit inserts <dc3> instead of saving the
1435 file when I type ^S</q>
1438 <p>Sometimes NEdit inserts <dc3> instead of saving the
1439 file when I type ^S. Other keyboard shortcuts (accelerator keys) don't
1444 You have probably NumLock or CapsLock ON. See the answer to
1445 <link href="#N900">this</link> question.
1454 <author><name>Joor Loohuis</name></author>
1455 <q>I use the numeric keypad really often, so I keep NumLock on.
1456 But NEdit shortcuts don't work when NumLock is on.</q>
1459 <p>The bug is not in NEdit, but in Motif. This is fixed as of NEdit 5.2, but
1460 that might not help you much. Older versions have the same problem.</p>
1462 <p>Here's how you tell X to interpret the keypad keys as numbers without
1463 turning NumLock on. Create a file .Xmodmap in your home directory, and put the
1464 following lines in it:</p>
1477 keycode 91 = KP_Decimal
1480 <p>Then make sure the script that starts your X session parses this file with
1483 xmodmap -merge ~/.Xmodmap
1486 <p>This script can be ~/.xinitrc (called by startx) or something like Xsession
1487 if you use xdm/kdm/gdm. Then again, it might be an entirely different script on
1490 <p>Then turn off numlock, and just continue using the keypad. The only thing
1491 is, you loose the alternate set of functions (cursor/home/pgdown/etc).</p>
1503 <q>NEdit crashes I try to paste text in to a text field in a dialog
1504 (like Find or Replace) on my SunOS system.</q>
1508 <p>On many SunOS systems, you have to set up an nls directory before
1509 various inter-client communication features of Motif will function
1510 properly. Before NEdit 4.0 this wasn't much of a problem, because
1511 users couldn't cut and paste at all, and Motif would sometimes
1512 print a warning about not finding an nls directory, so most users
1513 figured it out right away. But with 4.0, everything seems to be
1514 working fine, except when someone tries to move text in or out of
1515 a dialog field, then blamo.</p>
1517 <p>There are instructions in README.sun in
1518 <site>ftp://ftp.nedit.org/pub/</site><current-version<,
1519 as well as a tar file containg a complete nls directory:
1520 <site>ftp://ftp.nedit.org/pub/</site><current-version</individual/README.sun
1523 <p>It contains directions for setting up an nls directory, which is
1524 required by Motif for handling copy and paste to Motif text fields.</p>
1530 <q>NEdit crashes frequently, particularly on window closing.</q>
1534 <p>There is an obsolete resource in Motif called defaultFontList, which
1535 does nothing but cause random crashing. I don't know why NEdit users
1536 keep popping up with this resource set, maybe it looks enticing when
1537 you look at widget resources with editres. Anyhow, setting it to
1538 anything, whether it be a valid font or just garbage, causes random
1539 crashing in both Motif 1.2 and 2.0, so just don't set it.</p>
1545 <q>NEdit sometimes crashes when I execute a shell command menu item I
1550 <p>Check the "Command Input" setting, in the Preferences->Shell Commands
1551 dialog for that menu item. If the shell command being executed does
1552 not take input, but "Command Input" is set to "selection" or "window",
1553 NEdit tries to write the input anyhow, and fails. Set "Command Input"
1554 to "none" to prevent this possibility. This is fixed in version 5.1 and later.</p>
1561 <q>When NEdit starts up, I get errors like:
1562 <tt>Cannot allocate colormap entry for "#b3b3b3".</tt>
1567 <p>When NEdit starts up, I get errors:</p>
1570 Cannot allocate colormap entry for "#b3b3b3"
1571 Cannot allocate colormap entry for "#e5e5e5"
1577 <p>Most X displays are set up to operate in a mode which allocates 8
1578 bits of video memory per-pixel, and requires a color mapping table to
1579 translate pixel values to screen colors. With just 8 bits there are
1580 only 256 possible colors, and programs must either allocate and share
1581 these pixel values, or swap in their own colormap and make all other
1582 windows flash to strange colors while their window is focused. Some
1583 programs, Netscape in particular, are bad neighbors in this
1584 environment and snarf up every free entry in the shared colormap,
1585 such that every program that runs after them gets the errors you're
1588 <p>The solution is either to start Netscape last, after all other applications
1589 that you might want to run, or better, tell Netscape how many colors it is
1590 allowed to allocate. Fortunately, you can do this with a resource setting:</p>
1593 <p><tt>Netscape*maxImageColors: 80</tt></p>
1601 <q>Sometimes when I use regular expression replacement inside of a
1602 rectangular selection, NEdit fails to match text.</q>
1605 <p>Sometimes when I use regular expression replacement inside of a
1606 rectangular selection, NEdit fails to match text which does legally
1607 match the expression.</p>
1612 <p>The problem with REs and rectangular selections is that matching is
1613 bounded by the rectangular selection, but text outside of the selection
1614 is still fed to the matching routines, so ^, $, don't refer to the
1615 edges of the selection, they still refer to the beginning and ending of
1616 the line, and some legal matches are excluded because they continue
1617 outside of the selection are thereby excluded, or are shadowed by
1618 matches which begin or end outside of the selection.</p>
1625 <q>When ever I execute a nedit shell command (such as spell or wc) I get
1629 <p>When ever I execute an nedit shell command (such as spell or wc) I get
1630 (extra junk, error messages, complaints from stty) inserted into my text,
1631 or an Information dialog with (extra junk, error messages, complaints
1637 <p>You probably have printing commands in your shell startup file (.cshrc, or
1638 equivalent). These should either be skipped in non-interactive mode, or
1639 moved to your .login file. You can often see the problem outside of nedit
1646 <p>Error messages from stty are a result of it being executed from a process
1647 which isn't attached to a terminal. You can safely move stty statements
1648 and most other interactive commands to your .login file (calling stty from
1649 a .cshrc file is redundant because the terminal device doesn't change for
1650 each sub-shell). If you can't remove interactive commands, you should
1651 skip around them in non-interactive shells, I think the usual method is to
1652 put them at the end, preceded by something like:</p>
1655 if ($?prompt == 0) exit
1658 <p>The manual entry on csh has more information on this.</p>
1664 <q>On a Solaris system, the right part of the 'file open' dialog
1665 is too narrow, I can't see the complete file names.</q>
1668 <p>On a Solaris system, when trying to open a file within nedit, you get the
1669 listing of available file names. However, the sub-window (on the right)
1670 containing the file names (not directory names) sometimes is too narrow so
1671 that you can't see the filename part (i.e. /usr/people/rainer/sometextfile.txt
1672 shows up as /usr/people/rain or so). When resizing the dialog box, the
1673 filenames sub-window on the right doesn't become larger. I know I can use
1674 nedit.stdOpenDialog to type a filename, but that's annoying.</p>
1679 <p>It's a bug in the shared Motif library. Depending on your system, the patch
1680 is one of ID# 103461-07, # 102226-19, or # 103186-21. If you can't patch
1681 your system, you can set the resource:</p>
1684 nedit*XmFileSelectionBox.pathMode: XmPATH_MODE_RELATIVE
1687 <p>This will stop the dialog from displaying the path component of
1688 file names. Another possible workaround is to use the nedit_sunos
1689 executable (from <site>ftp://ftp.nedit.org/pub/</site>), which is
1690 statically linked with a good Motif.</p>
1696 <q>When I try to open a file from the "Open" dialog nothing appears in
1697 the "Filter" textfield</q>
1700 <p>When I try to open a file from the "Open" dialog nothing appears in
1701 the "Filter" textfield. Instead, I get repeated message like:</p>
1706 Character '/' not supported in font. Discarded.
1712 <p>In some versions of S.u.S.E. Linux, there's apparently something wrong
1713 with their builds of NEdit and other Motif apps. I've been told you
1714 can make nedit work by seting the environment variable LD_PRELOAD to
1715 /lib/libBrokenLocale.so.1 before launching it. You can also use the
1716 statically linked version of NEdit for Linux from
1717 <site>ftp://ftp.nedit.org/pub/</site>
1724 <q>NEdit seems to be running very slowly on my Solaris 2.6 system.</q>
1728 <p>If you're running NEdit on a Solaris 2.6 system and experiencing performance
1729 problems (windows come up slowly), the patch for Sun's shared Motif library
1730 is ID# 105284-04. Installing the patch alone will improve the performance
1731 dramatically. The patch also enables a resource, *XmMenuReduceGrabs.
1732 Setting this to True will eliminate the delay completely.</p>
1738 <q>I can't seem to enter accented characters on my system.</q>
1742 <p>This should be working properly on most systems as of NEdit 5.1 or later. If it's
1743 not, try re-building NEdit with -DNO_XMIM. If it still doesn't work, send
1744 mail to <email>develop@nedit.org</email></p>
1750 <q>When I try to use nc to start an nedit server, I receive a message
1751 <tt>(filename): forward host lookup failed: ...</tt></q>
1754 <p>When I try to use nc to start an nedit server, for instance using</p>
1760 <p>I receive the following error message:</p>
1763 (filename): forward host lookup failed:
1764 Host name lookup failure: Connection refused
1771 <p>There is another program called <code>nc</code> which is installed on
1772 some systems. In this case, <code>nc</code> is for <code>netcat</code>,
1773 some kind of network diagnostic tool. You can safely rename NEdit's
1774 <code>nc</code> to something else (we recommend ncl), or put it first in
1775 your path before <code>netcat</code>.</p>
1781 <q>Whenever I try to open existing files by using menu, nedit crashes; but
1782 if I type <code>nedit filename</code> command, it works.</q>
1785 <p>Whenever I try to open existing files by using menu, nedit crashes, and
1786 sometimes I get the following error message:</p>
1789 X Error of failed request: BadAlloc (insufficient resources for operation)
1790 Major opcode of failed request: 53 (X_CreatePixmap)
1793 <p>But if I type <code>nedit filename</code> command, it works. So
1794 how can I open file by using menu bar?</p>
1800 <p>Several users have reported this problem. Most of them were using
1801 S.u.S.E. Linux . A few others had different
1802 distributions, but always European. The problem appears to be related
1803 to how Motif searches for named pixmaps and bitmaps. My guess is that on
1804 some systems, this search encounters a match with a bad pixmap file, or
1805 tries to load something which is not a pixmap at all. One solution was
1806 to set the environment variable XBMLANGPATH to a random directory. For
1814 <p>The solution on S.u.S.E Linux systems was to remove an unnecessary line
1815 in the global /etc/profile (provided by S.u.S.E.):</p>
1819 "$XAPPLRESDIR:/var/X11R6/app-defaults:/usr/X11R6/lib/X11/app-defaults"
1822 <p>Another user who had the problem reported that the root cause appeared to
1823 be insufficient read permissions on some xm_* (e.g. xm_warning) pixmaps in
1824 "/usr/X11R6/include/X11/bitmaps". (Could someone else confirm this?)</p>
1830 <q>I want to be able to spawn a command from NEdit.</q>
1833 <p>I want to be able to spawn a command from NEdit. By this I mean that I
1834 want to NEdit to launch another program without waiting for the program
1835 to return. At the moment I'd like to be able to launch
1836 <code>mctags</code>, but I
1837 also have a variety of other things I'd like to do. The shell command:
1838 <code>mctags &</code> continues to wait
1839 for mctags to finish, despite the "&". Is
1840 there any way to do what I want?</p>
1845 <p>It's a bug/feature of NEdit that it considers a shell command process
1846 alive as long as any of it's file descriptors remain open. Forked
1847 processes generally copy and keep open the stdout and stderr descriptors
1848 from their parent process, so you have to add
1849 <code>>& /dev/null</code> to your shell
1850 command, so it reads:</p>
1853 mctags >& /dev/null &
1860 <q>NEdit flashes or matches the wrong parenthesis, bracket, or brace if there
1861 is an intervening paren/bracket/brace quoted in between.</q>
1865 <p>Until version 5.0, NEdit had no way of even knowing what
1866 language you were operating in when making the flash/match decision, so it
1867 simply counted opening and closing instances, disregarding language syntax
1868 context (strings, comments, etc.) completely. Now that the feature is more
1869 possible to implement, it may be included in a future version, but I'm not
1870 entirely sure how best to do it yet.</p>
1876 <q>I'd like to edit a file which is about 50 Megabytes long,
1877 but I get errors.</q>
1880 <p>I'd like to edit a file which is about 50 Megabytes long.
1881 Whenever I try to read this file, there was always a message as following:</p>
1884 Error: Cannot perform realloc
1890 <p>How large a file you can edit with NEdit depends on how much swap space + RAM
1891 you have, since it loads your file into virtual memory and occasionally does a
1892 full copy of that memory space. NEdit can handle a 100MB file reasonably well
1893 if you increase your swap space, but I don't know how far beyond that it can
1894 go. To work with a 100MB file, you must have at least 200MB of virtual memory
1895 available. Many Unix systems can be set up to temporarily increase swap space
1896 by creating a temporary swap file.</p>
1902 <q>We installed NEdit Version 5.0 recently, and the
1903 accelerators Ctrl-G (Find again) and Ctrl-L (Goto Line Number) are now
1908 <p>You have an out-of-date app-defaults file. We strongly recommend not using
1909 such files for this exact reason. When you use an app-defaults file, it
1910 replaces ALL of the program defaults. If you do install an app-defaults file,
1911 it is your responsibility to keep it up to date with each new release of the
1912 executable. Otherwise, as you have observed, certain features will degrade
1913 with each release, as the app-defaults file and the executable get further and
1914 further out of sync with eachother.</p>
1920 <q>On our PCs we have Windows 3.1 and we run XVision as X-Server and
1921 we cannot mark with the mouse within NEdit.</q>
1924 <p>On our PCs we have Windows 3.1 and we run XVision as X-Server. The problem
1925 that we have is, that we cannot mark with the mouse within NEdit.</p>
1927 <p>When you click and hold the left mouse button and then move the mouse, you
1928 can see the mark-area flickering during the movement of the mouse. When
1929 stopping the movement nothing is highlighted and nothing is marked.</p>
1934 <p>XVision is grabbing the selection immediately, as soon as it is made, not
1935 allowing applications to own it. This behavior is completely wrong, and I
1936 have no idea what they might have been thinking when they implemented it. It
1937 may be possible to turn it off, ask their technical support people if they're
1938 not already out of business.</p>
1944 <q>My regular expression replacement got truncated!</q>
1947 <p>My regular expression replacement got truncated! I wrote
1948 a regular expression to nest additional braces around blocks of code
1949 (replace <tt>{([^{}]|\n)*}</tt> with <tt>{\0}</tt>), which works for
1950 small blocks of text, but it fails on large ones, truncating the
1951 replacement at around 512 bytes.</p>
1956 <p>A remnant of pre-regular-expression, pre-macro-language NEdit, is that
1957 replacement strings are limited to 511 bytes. This is high on the list
1958 to fix in a future upgrade.</p>
1964 <q>NEdit is slow and pages continuously on my 8MB Linux system</q>
1968 <p>On most Unix workstations, 8MB of RAM is actually insufficient to run X
1969 and Motif properly. Some Linux users get by with it and Linux itself
1970 seems to be quite memory efficient, but you really should have 12 or 16
1971 if you're going to be using X much. NEdit would not be my first choice
1972 in editors on an 8MB system.</p>
1978 <q>Some of the special keys on my keyboard don't do what I expect.</q>
1982 <p>X systems are rife with this kind of problem because are just too many
1983 levels of re-settable bindings between the keyboard and the application
1984 program that reads it. Sun systems are the worst offenders, combining
1985 poor Motif support with a variety of strange keyboard arrangements.</p>
1987 <p>To diagnose these problems, you have to look at all three levels of key
1988 binding that affect Motif programs.</p>
1990 <p>At the bottom level are the modifier map and keymap table, where
1991 hardware key codes are bound to X keysyms. You can see the bindings on
1992 this level with the xmodmap program (see man xmodmap). A useful tool
1993 in debugging the xmodmap level is a program like xev, which can show
1994 you the keysyms it receives.</p>
1996 <p>The next level up from that is the motif virtual binding level
1997 (see man VirtualBindings). You can (usually) view the bindings at
1998 this level by looking at the value of the root window property:
1999 _MOTIF_DEFAULT_BINDINGS, using the xprop -root command, however what
2000 you see is not necessarily what you'll get. The defaults for these
2001 bindings are determined by an unbelievably complicated process
2002 involving not just the application in question, but Motif
2003 applications which have run before it attached to the same server.
2004 This process is described in detail in the VirtualBindings manual
2005 page (which is often not available on systems where the bindings are
2006 messed up). While it's usually better to attack system configuration
2007 problems at the source, this one is so contorted that you're better
2008 off with a patch. Luckily, the default Motif virtual bindings can be
2009 overridden by an application resource called defaultVirtualBindings.
2010 If you think the problem is at the Motif virtual binding level,
2011 define a defaultVirtualBindings resource in your .Xresources or
2012 .Xdefaults file, using the example below as a template, replacing the
2013 keysym names (to the right of the colon) with the keysyms shown by
2014 xev when you press the desired key:</p>
2018 ! Motif Virtual Key Bindings
2020 nedit*defaultVirtualBindings: \
2021 osfActivate : <Key>KP_Enter\n\
2022 osfCancel : <Key>Escape\n\
2023 osfHelp : <Key>Help\n\
2024 osfMenu : <Key>F4\n\
2025 osfMenuBar : <Key>F10\n\
2026 osfLeft : <Key>Left\n\
2027 osfUp : <Key>Up\n\
2028 osfRight : <Key>Right\n\
2029 osfDown : <Key>Down\n\
2030 osfBeginLine : <Key>Home\n\
2031 osfEndLine : <Key>End\n\
2032 osfPageUp : <Key>Prior\n\
2033 osfPageDown : <Key>Next\n\
2034 osfBackSpace : <Key>BackSpace\n\
2035 osfDelete : <Key>Delete\n\
2036 osfInsert : <Key>Insert\n\
2037 osfUndo : <Key>F14\n\
2038 osfAddMode :Shift <Key>F8\n\
2039 osfCopy : <Key>F16\n\
2040 osfCut : <Key>F20\n\
2041 osfPaste : <Key>F18\n
2044 <p>If NEdit is having binding problems, chances are that other Motif-based
2045 programs are also having trouble. Removing the "nedit" from the resource
2046 name above (just *defaultVirtualBindings), will apply it to the other
2047 Motif programs that you run as well.</p>
2049 <p>The top level bindings in the key binding hierarchy, are the X toolkit
2050 translation tables (see the NEdit Help section called X Resources). To
2051 show the translations in use, you can add a binding which dumps the table
2055 nedit*text.Translations: #override \
2056 Alt<Key>t: XtDisplayTranslations()\n
2059 <p>Typing Alt+T will then display the contents of the translation table to
2060 stdout (the terminal from which you started NEdit). If you have the NEdit
2061 source, you can also look at the default bindings in the module text.c.</p>
2063 <p>Sometimes, even if you don't understand the problem, you can patch around it
2064 by supplying translations for the keysyms that NEdit actually sees, binding
2065 them to the action routines that you want activated when you press that
2072 <q>KP Enter does no longer executes the current line or selected text as
2073 a shell command. How can I get this behavior back?</q>
2077 <p>It was considered dangerous to have a commonly used key potentially
2078 execute arbitrary shell commands unintentionally (think rm -Rf). Therefore
2079 the shortcut was changed to Ctrl+KP Enter.
2081 In case you want the old binding back, you can add the following lines
2082 to your .Xdefaults or .Xresources file:</p>
2085 nedit*shellMenu.executeCommandLine.accelerator: <Key>KP_Enter",
2086 nedit*shellMenu.executeCommandLine.acceleratorText: KP Enter",