* Emacs Initialization
@ 2021-07-11 23:16 Steve A Branch
2021-07-12 15:52 ` Skip Montanaro
2021-07-12 23:16 ` Felix Dietrich
0 siblings, 2 replies; 5+ messages in thread
From: Steve A Branch @ 2021-07-11 23:16 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]
Dear Gnu Emacs Helpers,
First of all, thank you for providing my go-to editor for the past (I
think) 40 years. I have so much invested in emacs that I just cannot
get started with another editor. So, great job.
I have a confusing problem that I have encountered since starting to
learn how to code in Python 3. I want my emacs window to initialize
itself using my ~/.emacs.d/init.el initialization file. I have enclosed
it for your information.
The problem I am experiencing is that frequently the emacs window opens
smaller than I expect. I can exit emacs and try it several more times,
and it will eventually initialize properly. I'm confused about what is
happening. I hope you can give me some advice on how to get emacs to
initialize properly each time in invoke it.
I have been using Ubuntu 20.04 LTS for a couple years, and I start
emacs using a link on the left-hand side of my monitor.
Also, you can probably tell from my init.el file that I have very little
idea how to write the initialization file. I'm hoping you can direct me
to some information on how to get that done.
Thanks for your help.<!-- This is the title line from the signature
file, (~/mail/signature.html). -->
Thank you,
*Steve Branch*
/216.848.0499/
/BlindStevie@mail.com/
/2584 Charney Road/
/University Heights, OH 44118-4403/
c isn't just a good idea, it's the *law*!
[-- Attachment #2: init.el --]
[-- Type: text/x-emacs-lisp, Size: 2300 bytes --]
;; -*-emacs-Lisp-*-
; This is a lisp comment line.
; Some of this information was found at
; http://emacsblog.org/2007/04/09/highlight-the-current-line/.
; Prior to executing init.el, emacs executes /etc/emacs/site-start.el.
; The emacs installation directory is /usr/local/share/emacs/site-lisp.
; Do not display the splash screen on startup. Note: This will allow
; default-directory to be ~/.
(customize-set-variable 'inhibit-startup-screen t)
(setq default-directory (concat (getenv "HOME") "/"))
(set-language-environment "UTF-8")
(set-default-coding-systems 'utf-8)
;; M-x list-colors-display
(set-background-color "honeydew")
; (set-background-color "cornsilk")
(electric-pair-mode t)
; (set-face-background 'hl-line "misty rose")
(show-paren-mode t)
(global-auto-revert-mode t)
(savehist-mode t)
(blink-cursor-mode t)
; Make searches case sensitive.
(setq-default case-fold-search nil)
(setq visible-bell t)
(add-hook 'text-mode-hook 'auto-fill-mode)
(put 'narrow-to-region 'disabled nil)
(setq doc-view-conversion-refresh-interval t)
(setq doc-view-continuous t)
(setq-default fill-column 60)
; Window frame parameters were researched at
; https://www.gnu.org/software/emacs/manual/html_node/elisp/
; Window-Frame-Parameters.html#Window-Frame-Parameters.
(setq default-frame-alist
'((top . 0.03) (left . 0.69)
(width . 100) (height . 65)
(user-position t) (user-size t)
))
; Request column and line numbers on the mode line.
(line-number-mode t)
(column-number-mode t)
; Request the current line be highlighted.
(global-hl-line-mode t)
(set-face-background hl-line-face "misty rose")
; Request removal of whitespace prior to saving.
(add-hook 'before-save-hook 'delete-trailing-whitespace)
; Set my email address.
(setq user-mail-address "BlindStevie@mail.com")
(customize-set-variable 'user-mail-address "BlindStevie@mail.com")
; Use a clipboard.
; (customize-set-variable 'x-select-enable-clipbboard t)
; Display time on mode line.
; (display-time-mode t)
;; Mouse
(global-set-key [mouse-3] 'imenu)
;; And we return.
(message "Emacs has been initialized, %s%s" (user-login-name) ".")
;; Set the default font.
(custom-set-faces '(default ((t (:family "Ubuntu Mono" :foundry "DAMA"
:slant normal :weight normal :height 128 :width normal)))))
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Emacs Initialization
2021-07-11 23:16 Emacs Initialization Steve A Branch
@ 2021-07-12 15:52 ` Skip Montanaro
2021-07-12 23:16 ` Felix Dietrich
1 sibling, 0 replies; 5+ messages in thread
From: Skip Montanaro @ 2021-07-12 15:52 UTC (permalink / raw)
To: Steve A Branch; +Cc: Help GNU Emacs
> I have a confusing problem that I have encountered since starting to
> learn how to code in Python 3. I want my emacs window to initialize
> itself using my ~/.emacs.d/init.el initialization file. I have enclosed
> it for your information.
Steve,
A few questions:
* You mention Python 3, but I see nothing in the init file you posted
which looks Python-related.
* I don't think you need to set default-drectory. It's buffer local
and will be set no matter what you're editing. Can you explain why you
do?
* You mentioned that it takes several starts to get the initial window
to open at the desired height.
- Does the "initialized" message always display even when the
initial window height isn't correct?
- Is it possible your window manager and other open windows are
conspiring to limit your initial window dimensions?
Skip
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Emacs Initialization
2021-07-11 23:16 Emacs Initialization Steve A Branch
2021-07-12 15:52 ` Skip Montanaro
@ 2021-07-12 23:16 ` Felix Dietrich
2021-07-20 19:52 ` Steve A Branch
1 sibling, 1 reply; 5+ messages in thread
From: Felix Dietrich @ 2021-07-12 23:16 UTC (permalink / raw)
To: Steve A Branch; +Cc: help-gnu-emacs
Steve A Branch <BlindStevie@mail.com> writes:
> I have a confusing problem that I have encountered since starting to
> learn how to code in Python 3. I want my emacs window to initialize
> itself using my ~/.emacs.d/init.el initialization file. I have enclosed
> it for your information.
>
> The problem I am experiencing is that frequently the emacs window opens
> smaller than I expect. I can exit emacs and try it several more times,
> and it will eventually initialize properly. I'm confused about what is
> happening. I hope you can give me some advice on how to get emacs to
> initialize properly each time in invoke it.
Try putting the frame configuration in the early init file, either
“~/.config/emacs/early-init.el” or “~/.emacs.d/early-init.el”. See also
(info "(emacs) Early Init File") [1]: “[the early init] file is loaded before the
package system and GUI is initialized, so in it you can customize
variables that affect frame appearance […]”.
[1] <https://www.gnu.org/software/emacs/manual/html_node/emacs/Early-Init-File.html>
--
Felix Dietrich
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Emacs Initialization
2021-07-12 23:16 ` Felix Dietrich
@ 2021-07-20 19:52 ` Steve A Branch
2021-07-20 21:09 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 5+ messages in thread
From: Steve A Branch @ 2021-07-20 19:52 UTC (permalink / raw)
To: Felix Dietrich; +Cc: help-gnu-emacs
Skip and Felix,
The addition of the early-init.el seems to have solved the timing
problem. Thank you very much for your help. I appreciate it very much.
I would like to become much more proficient with the initialization of
emacs. Is there some reading you can suggest?
Thanks,
Steve
On 7/12/21 7:16 PM, Felix Dietrich wrote:
> Steve A Branch <BlindStevie@mail.com> writes:
>
>> I have a confusing problem that I have encountered since starting to
>> learn how to code in Python 3. I want my emacs window to initialize
>> itself using my ~/.emacs.d/init.el initialization file. I have enclosed
>> it for your information.
>>
>> The problem I am experiencing is that frequently the emacs window opens
>> smaller than I expect. I can exit emacs and try it several more times,
>> and it will eventually initialize properly. I'm confused about what is
>> happening. I hope you can give me some advice on how to get emacs to
>> initialize properly each time in invoke it.
> Try putting the frame configuration in the early init file, either
> “~/.config/emacs/early-init.el” or “~/.emacs.d/early-init.el”. See also
> (info "(emacs) Early Init File") [1]: “[the early init] file is loaded before the
> package system and GUI is initialized, so in it you can customize
> variables that affect frame appearance […]”.
>
> [1] <https://www.gnu.org/software/emacs/manual/html_node/emacs/Early-Init-File.html>
--
<!-- This is the title line from the signature file,
(~/mail/signature.html). -->
Thank you,
*Steve Branch*
/216.848.0499/
/BlindStevie@mail.com/
/2584 Charney Road/
/University Heights, OH 44118-4403/
c isn't just a good idea, it's the *law*!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Emacs Initialization
2021-07-20 19:52 ` Steve A Branch
@ 2021-07-20 21:09 ` Emanuel Berg via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 5+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-07-20 21:09 UTC (permalink / raw)
To: help-gnu-emacs
Steve A Branch wrote:
> The addition of the early-init.el seems to have solved the
> timing problem. Thank you very much for your help.
> I appreciate it very much.
>
> I would like to become much more proficient with the
> initialization of emacs. Is there some reading you
> can suggest?
Both the Emacs and Elisp manuals come to mind:
(info "(elisp) Startup Summary")
(info "(elisp) Init File")
(info "(emacs) Init File")
(info "(emacs) Initial Options")
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-20 21:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-11 23:16 Emacs Initialization Steve A Branch
2021-07-12 15:52 ` Skip Montanaro
2021-07-12 23:16 ` Felix Dietrich
2021-07-20 19:52 ` Steve A Branch
2021-07-20 21:09 ` Emanuel Berg via Users list for the GNU Emacs text editor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).