man8user Posted October 10, 2008 Report Share Posted October 10, 2008 I installed the 2009.0 Free DVD on a disk with Fedora 9.91 Beta and Suse 10.0 and the installation went smooth. It even fixed the MBR messup that Fedora left after installing 9.91 and I can now tripple-boot into any of these three! Then I installed emacs 22.3 from the DVD itself (no internet connection with Linux PC). The emacs starts OK but it cannot seem to find the standard fonts. Normally the 22.3 would give me an option (at the bottom of GNU Emacs welcome screen) to ditch the first-time Welcome screen on other systems. But on 2009.0 and also on 2008.1 I did not get that option... just the standard GNU Emacs Welcome on a split-screen. So, I look into *Messages* buffer and this is what I see: - Warning: no fonts matching `-*-fixed-medium-r-normal-*-16-*-*-*-*-*-iso8859-1' available [2 times] Warning: no fonts matching `-*-*-medium-r-normal-*-16-*-*-*-*-*-iso8859-1' available Warning: no fonts matching `-*-*-*-r-normal-*-16-*-*-*-*-*-iso8859-1' available Warning: no fonts matching `-*-*-*-*-normal-*-16-*-*-*-*-*-iso8859-1' available Warning: no fonts matching `-*-*-*-*-*-*-16-*-*-*-*-*-iso8859-1' available [2 times] ("emacs" "/root/.bashrc") Loading paren...done Package auto-show is obsolete Loading /etc/emacs/site-start.d/desktop-file-utils.el (source)...done Loading /etc/emacs/site-start.d/python.el (source)...done Loading places from /root/.emacs-places...done For information about GNU Emacs and the GNU system, type C-h C-a. Toggling font-lock-mode off; better pass an explicit argument. Loading sh-script...done Setting up indent for shell type bash Loading regexp-opt...done setting up indent stuff Indentation variables are now local. Indentation setup for shell type bash Mark set The Emacs 22.3 is very usable after this. But I would like to get rid off this error (and avoid typing Ctl-X 1 everytime when I start emacs)! Also, when I set the font size to something bigger like Misc 9x15 and save the options, the window size changes and readjusts to 9x15 but all is forgotten when I exit and restart emacs. Thanks. Link to comment Share on other sites More sharing options...
coverup Posted October 10, 2008 Report Share Posted October 10, 2008 (edited) Do you have xfontsel installed? Does it show that these fonts are available? Also, check /etc/X11/app-defaults/Emacs. If you find what those fonts are used for, you could replace them by editing that file, but it is better to edit your local ~/.emacs or ~/.Xdefaults files. For example, I have these lines in my ~/.Xdefaults ! emacs, xemacs emacs*bitmapIcon: on emacs.font-latex-math-face.attributeForeground: Red As a last resort, you might need to install and run X font server xfs. AFAIK, recent versions of xorg do not use xfs . That may be a better option for KDE/Gnome apps, but causes problems for those few of us who use emacs. Edit: Just found that only one line in my /etc/X11/app-defaults/Emacs refers to the medium-r-normal font: ! *EmacsFrame.FontSet: -dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-* As you can see it is commented out. Edited October 10, 2008 by coverup Link to comment Share on other sites More sharing options...
adamw Posted October 11, 2008 Report Share Posted October 11, 2008 Do you have xorg-x11-100dpi-fonts installed? Link to comment Share on other sites More sharing options...
man8user Posted October 12, 2008 Author Report Share Posted October 12, 2008 Hi Adamw: I probably do not have that installed... nothing shows up with search string as "100". Just did a rpm -qa | grep font and here is the result: [rrq@localhost ~]$ rpm -qa | grep font x11-font-adobe-75dpi-1.0.0-6mdv2009.0 x11-font-alias-1.0.1-13mdv2009.0 ghostscript-fonts-8.11-10mdv2009.0 mkfontdir-1.0.4-2mdv2009.0 fontconfig-2.6.0-3mdv2009.0 fonts-ttf-west_european-1.3-20mdv2009.0 fonts-ttf-dejavu-2.26-1mdv2009.0 libfontenc1-1.0.4-5mdv2009.0 mkfontscale-1.0.5-2mdv2009.0 x11-font-bh-lucidatypewriter-75dpi-1.0.0-6mdv2009.0 libfontconfig1-2.6.0-3mdv2009.0 x11-font-cursor-misc-1.0.0-6mdv2009.0 xorg-x11-75dpi-fonts-7.3-4mdv2009.0 fslsfonts-1.0.2-2mdv2009.0 x11-font-adobe-utopia-75dpi-1.0.1-6mdv2009.0 x11-font-bh-type1-1.0.0-6mdv2009.0 urw-fonts-2.0-22mdv2009.0 font-tools-0.1-17mdv2009.0 libxfont1-1.3.3-1mdv2009.0 x11-font-misc-misc-1.0.0-8mdv2009.0 xfontsel-1.0.2-4mdv2009.0 x11-font-bitstream-75dpi-1.0.0-6mdv2009.0 showfont-1.0.2-2mdv2009.0 fonts-ttf-decoratives-1.3-20mdv2009.0 fonts-ttf-liberation-1.04-1mdv2009.0 x11-font-bh-75dpi-1.0.0-6mdv2009.0 [rrq@localhost ~]$ I did install xfontsel as suggested by coverup. I do not have Emacs directory under /etc/X11/app-defaults. Just finished installing 2009.0 and have not yet put a .emacs that I normally use. My .Xdefaults file in root account has quite a few lines regarding emacs as shown below :- emacs*Background: DarkSlateGray emacs*Foreground: Wheat emacs*pointerColor: Orchid emacs*cursorColor: Orchid emacs*bitmapIcon: on emacs*font: fixed emacs.geometry: 80x25 The non-root user account does not have a .Xdefaults file! Now, I do not recall from which account I installed the Emacs 22.3 from the 2009.,0 DVD. It was most probably the root account. The XFS server did not make any difference other than refusing to stop after I started and stopped it a few times. I know very little about font management. In the past I never had to bother about managing emacs font... from the RH 7,8,9 days. Only in the recent versions of Linux I come across this font related issues. The screens these days are larger, size variation is high, anywhere from a laptop 14.5" to a grand 24" desktop with varying resolutions. So, there is learning curve ahead for me I guess. Apart from the font related issues in the context of Mandriva, I believe Emacs22.3 has its own problems in saving options in .emacs. Many a time I saw last night it falsely report "saving .emacs" but the .emacs file remained unchanged! I also just found out that it tries to wrap text when typing gets close to 75-th column on the right margin. The file I was typing had an extension of .txt and Emacs should have no business wrapping text like a word processor! I might have to install a previous version if I can't control 22.3. Regards. Link to comment Share on other sites More sharing options...
coverup Posted October 12, 2008 Report Share Posted October 12, 2008 On my 2008.0 laptop, only font that matches the mask -*-*-*-*-*-*-16-*-*-*-*-*-iso8859-1 is -sony-fixed-medium-r-normal-*-16-*-*-*-c-*-iso8859-1. It seems to be available in both 100x100 and 75x75 point sizes. The corresponding font files are in the directory /usr/share/fonts/misc/, according to the file /usr/share/fonts/misc/fonts.dir: $ more misc/fonts.dir |grep sony 12x24.pcf.gz -sony-fixed-medium-r-normal--24-170-100-100-c-120-iso8859-1 12x24rk.pcf.gz -sony-fixed-medium-r-normal--24-170-100-100-c-120-jisx0201.1976-0 8x16.pcf.gz -sony-fixed-medium-r-normal--16-120-100-100-c-80-iso8859-1 8x16rk.pcf.gz -sony-fixed-medium-r-normal--16-120-100-100-c-80-jisx0201.1976-0 They are part of the package x11-font-sony-misc. You may want to check whether you have this package installed, hopefully 2009 uses the same naming convention. You can copy/create your own ~/.Xdefaults in the user account. If you like, you can copy the one in the root account and modify it at will. I noticed that your root's .Xdefaults includes emacs*font: fixed Did you try commenting it out? Just put ! at the start. Text wrapping as well as splash screen can be turned on/off in ~/.emacs file. Here is the section from my ~/.emacs that turns on autofill (text wrapping) and turnes off the splash screen (setq initial-major-mode (lambda () (text-mode) (turn-on-auto-fill) (font-lock-mode) )) (setq font-lock-mode-maximum-decoration t) (require 'font-lock) ;; By default turn on colorization. (if (fboundp 'global-font-lock-mode) (global-font-lock-mode t) ) ;; Turn on auto-fill mode in text mode and related modes. (add-hook 'text-mode-hook '(lambda () (setq fill-column 75) (auto-fill-mode 1))) ;; Enable this if you don't want to see emacs start-up message (setq inhibit-startup-message t) Link to comment Share on other sites More sharing options...
man8user Posted October 12, 2008 Author Report Share Posted October 12, 2008 Yes, you are right. The sony fonts were missing in my installed rpm list! The installer searched it out as "x11-font-sony-misc Version: 1.0.0 Release: 6mdv2009.0 Size: 20KB in disk." I got them installed and Emacs doesn't complain about missing fonts anymore. However, emacs still does not save the changed fonts in .emacs. All I get when I try to save options is "Loading battery ... done" but the .emacs file does not get written over. Probably Mandriva has nothing to do with it and I believe I can use a suitable font spec in .emacs for a workaround. Don't know where the installer got those Sony fonts from because I had internet connected. It is only 20KB on the disk and if it is in DVD, then the dependency should probably extend to that fonts package (or something else if legality is involved). And, I used your lines of .emacs to disable the text wrap ... in an undignified manner...hope you don't mind! ;; Turn on auto-fill mode in text mode and related modes on Column 750. (add-hook 'text-mode-hook '(lambda () (setq fill-column 750) (auto-fill-mode 1))) The .Xdefaults from root is now copied at the non-root account with the emacs font line commented out: "!emacs*font: fixed". I think this issue can be considered solved. A lot of thanks to coverup for detailed help. Link to comment Share on other sites More sharing options...
coverup Posted October 12, 2008 Report Share Posted October 12, 2008 (edited) It is not very clear from your post how you are making modifications in the .emacs. You can simply add whatever you need to the .emacs, though the syntax is a bit cumbersome. Another method is making modifications in the Customize Emacs buffer. To reach it open Emacs, then go to Options->Customize Emacs->Specific Face, then hit "Enter" to open the buffer. Note gray buttons near the top of the buffer: Set for Current Session Save for Future Sessions Undo Edits Reset to Saved Erase Customization Finish To make permanent changes and save them in the .emacs file, you must click "Save for Future Sessions". Make sure you have write permissions for that file. To change a particular font/face browse to the font/component you would like to modify, and click the Show Face button. Make modifications (note that there is a preview - the word "sample"), then scroll back to the top of the buffer and click one of the buttons mentioned above. You can initially set changes for the current session (without modifying .emacs), then if you are happy with them, return to the Customize Emacs buffer, and click Save for Future Sessions. Edit: Here is a discussion on how to permanently turn off auto-fill http://groups.google.com/group/gnu.emacs.h...6e78a16d7d7bc0f Edited October 12, 2008 by coverup Link to comment Share on other sites More sharing options...
man8user Posted October 12, 2008 Author Report Share Posted October 12, 2008 Hi, I was using the most obvious route available on the Options --> Set Font/FontSet and then the small window that appears with Font Menu as Misc, Courier, Fontset. Then I would use the Options --> Save Options (Save options set from the menu above). This method does not save .emacs file and is clearly unreliable. The other way through Customize Emacs, then Faces and the Default Face works fine as it always had before. The presence of the obvious Set Font/Faces in Options menu is a work in progress, I guess. As you said, from the google link I was able to disable text wrap permanently by commenting out the (add-hook 'text-mode-hook 'turn-on-auto-fill) line in the /usr/share/emacs/22.3/lisp/site-start.el file. Thanks, once again. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now