Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8069379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:00:07+00:00 2026-06-05T13:00:07+00:00

I am new to StackOverflow and I have a question about an issue that

  • 0

I am new to StackOverflow and I have a question about an issue that has been virtually the only thing to irk me in my quest to master Emacs.

I configured my .emacs file to set the default frame size for Emacs to 70 rows and 80 columns like so:

(add-to-list 'default-frame-alist '(left . 0))
(add-to-list 'default-frame-alist '(top . 0))
(add-to-list 'default-frame-alist '(height . 70))
(add-to-list 'default-frame-alist '(width . 80))

This works fine when starting Emacs, the problem is that when I launch a new frame using new-frame or emacsclient -c these settings are not respected. Is there a way to force emacsclient and new-frame to read the settings in the .emacs file when they are executed?

Edit:

Here is my .emacs file:

;;This setting is meant to force emacs to read size settings before make-frame.

(add-hook 'before-make-frame-hook
      #'(lambda ()
          (add-to-list 'default-frame-alist '(left   . 0))
          (add-to-list 'default-frame-alist '(top    . 0))
          (add-to-list 'default-frame-alist '(height . 70))
          (add-to-list 'default-frame-alist '(width  . 80))))

;;disable annoying welcome screen.
(setq inhibit-splash-screen t)
(setq inferior-lisp-program "/usr/bin/abcl")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/slime/")
(require 'slime)
(slime-setup)

(add-to-list 'auto-mode-alist '("\\.lisp$" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.cl$" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.asd$" . lisp-mode))
(require 'slime)
(slime-setup)
(eval-after-load "slime"
 '(progn
   (setq slime-complete-symbol*-fancy t
      slime-complete-symbol-function 'slime-fuzzy-complete-symbol
      slime-when-complete-filename-expand t
      slime-truncate-lines nil
      slime-autodoc-use-multiline-p t)
(slime-setup '(slime-fancy slime-asdf))
(define-key slime-repl-mode-map (kbd "C-c ;")
  'slime-insert-balanced-comments)
(define-key slime-repl-mode-map (kbd "C-c M-;")
  'slime-remove-balanced-comments)
(define-key slime-mode-map (kbd "C-c ;")
  'slime-insert-balanced-comments)
(define-key slime-mode-map (kbd "C-c M-;")
  'slime-remove-balanced-comments)
(define-key slime-mode-map (kbd "RET") 'newline-and-indent)
(define-key slime-mode-map (kbd "C-j") 'newline)))

(add-to-list 'default-frame-alist '(left . 0))
(add-to-list 'default-frame-alist '(top . 0))
(add-to-list 'default-frame-alist '(height . 70))
(add-to-list 'default-frame-alist '(width . 80))

(normal-erase-is-backspace-mode 0)
(tool-bar-mode -1) ;;method for disabling changed in 24. can not nil, most negative
(scroll-bar-mode -1)

;;for loading cedet.
(load-file "/usr/share/emacs/site-lisp/cedet/common/cedet.el")
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T13:00:10+00:00Added an answer on June 5, 2026 at 1:00 pm

    You might try adding the following hook to your Emacs start-up file (normally, ~/.emacs), i.e.:

    (add-hook 'before-make-frame-hook
              #'(lambda ()
                  (add-to-list 'default-frame-alist '(left   . 0))
                  (add-to-list 'default-frame-alist '(top    . 0))
                  (add-to-list 'default-frame-alist '(height . 70))
                  (add-to-list 'default-frame-alist '(width  . 80))))
    

    Or, if you want to reload the whole .emacs file:

    (add-hook 'before-make-frame-hook #'(lambda () (load-file "~/.emacs")))
    

    The former hook is almost certainly preferable, as reloading the entire .emacs file is probably not only unnecessary and wasteful of resources, but also has the potential to cause errors or weird behavior (depending on the file’s contents).

    To elaborate, hooks are variables which define lists of commands that are executed when specific events happen within your Emacs session, e.g., the loading of a major editing mode, or, as in this case, the creation of a new frame. See the relevant Emacs manual page on hooks for more information. Generally speaking, if you want some function to be executed every time a particular event occurs within Emacs, adding said function to the right pre-existing hook is probably the best way to go about it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am new to stackoverflow and i would have a question about C# structs
I'm kinda new in asking @Stackoverflow, however it's been the closest thing I have
I'm new here to stackoverflow, so bear with me. I have a book that
I currently have this useful code that I found elsewhere on StackOverflow: form.DrawToBitmap(bmp, new
I think this question is very usual. Many results on Stackoverflow has said about
I understand that are similar question on StackOverflow about this problem, but none of
We have all seen many question on StackOverflow that are founded upon the idea
I have read lots of questions and answers about this issue on StackOverflow, but
I'm new to programming and stackoverflow and have decided to start by learning objective
Brand new poster here on StackOverflow. I've been reading and learning here for some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.