Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have following two lines in ~/.emacs file to set my own font size for Emacs in linux. However, the problem that I have is that, if I open up a new frame by choosing File -> New Frame in Emacs menu, the new frame opened does not have the same font setting. It seems to changed to some other settings. Please see my attached two emacs windows. The right one is the correct one. But the left one does not work. And the left one is a new frame opened from the right one. Why?
Need a bit more info. Distro, GUI and file manager you are using. Does it do it if you open the file in the same window? Or only when you open them in new windows?
I have following two lines in ~/.emacs file to set my own font size for Emacs in linux.
Is that the (set-default-font ... line?
Quote:
However, the problem that I have is that, if I open up a new frame by choosing File -> New Frame in Emacs menu, the new frame opened does not have the same font setting... Why?
Code:
set-default-font is an alias for `set-frame-font' in `frame.el'.
(set-default-font FONT-NAME &optional KEEP-SIZE)
This function is obsolete since 23.1;
use `set-frame-font' instead.
Set the font of theselected frame to FONT-NAME.
When called interactively, prompt for the name of the font to use.
To get the frame's current default font, use `frame-parameters'.
The default behavior is to keep the numbers of lines and columns in
the frame, thus may change its pixel size. If optional KEEP-SIZE is
non-nil (interactively, prefix argument) the current frame size (in
pixels) is kept by adjusting the numbers of the lines and columns.
Need a bit more info. Distro, GUI and file manager you are using. Does it do it if you open the file in the same window? Or only when you open them in new windows?
I am using KDE windown manager. The problem is that, when I open a file the first time in Emacs, it is ok. After that, in the existing Emacs window, I chose File -> New Frame from the menu. Then it will open up a second window which change the font from the first window. I don't know why?
I just tried both "set-frame-font" and (set-face-attribute 'default nil :font FONT). Neither work. I still have the same problem. The first window works. The second window opened from the first window does not.
The only related option I see is "save options". This will basically save your current setting, and save it into ~/.emacs file. I've already mentioned in my previous posts that I have a function to set the default font in ~/.emacs file. But that function does not work correctly. Do you know why that function does not work correctly? Look at the attached picture in the first note, which is ~/.emacs file I posted. The line "(set-default-font ...)" is the function that I am using. I also tried "(set-frame-font ...)" based on someone's suggestion. Does not work either. Any suggestion?
Try adding this and removing what you have in the default font settings "-adobe-courier-medium-r-normal--18-180-75-75-m-110-iso8859-1". See of that syntax works.
Last edited by AuroraZero; 10-25-2011 at 03:44 PM.
In the new one you can change the fonts from the menu. This takes away the need for the right names and syntax. You may want to look into the newest version which I believe is 23. I am not saying you have to change but it may be a good idea if you did change.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.