Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with init.el file on Ubuntu 14.04 legacy with emacs 27.2 #89

Open
IstiCusi opened this issue Jul 17, 2022 · 1 comment
Open

Comments

@IstiCusi
Copy link

Dear Dave,
I am totally new to emacs, like it, but rush into a problem.
I tried directly your script and run into the following error message:

-----------------------------------------------------------------------------------------------

Warning (initialization): An error occurred while loading ‘~/.emacs.d/init.el’:

error: Package ‘use-package-’ is unavailable

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.

-----------------------------------------------------------------------------------------------

while such runs (first line fixes tls issue on the old machine):

------------------------------------------------------------------------------------------------

;; ---- > (debug-on-entry 'package-initialize) < ----

;; ==========================================================================
;; ======================= Fix for ubuntu 14.04 ============================
;; ==========================================================================

(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.0")

;; ==========================================================================
;; ======================= Changed key bindings ============================
;; ==========================================================================

;; Esc quit prompts (as ctrl-g did)

(global-set-key (kbd "") 'keyboard-escape-quit)

;; ==========================================================================
;; ====================== Standard emacs settings ===========================
;; ==========================================================================

;; Copy from linux buffer

(setq x-select-enable-clipboard t)

;; Core simplifications

(setq inhibit-startup-message t)

(scroll-bar-mode -1) ; Disable visible scrollbar
(tool-bar-mode -1) ; Disable the toolbar
(tooltip-mode -1) ; Disable tooltips
(set-fringe-mode 10) ; Give some breathing room
(menu-bar-mode -1) ; Disable the menu bar
(setq visible-bell t) ; visible bell
(column-number-mode)
(global-display-line-numbers-mode t) ; line numbering

;; Font settings

(defvar efs/default-font-size 180)
(defvar efs/default-variable-font-size 180)
(set-face-attribute 'default nil :font "Fira Code Retina" :height efs/default-font-size)
(set-face-attribute 'fixed-pitch nil :font "Fira Code Retina" :height efs/default-font-size)

;; Transparent window

(defvar efs/frame-transparency '(97 . 97))
(set-frame-parameter (selected-frame) 'alpha efs/frame-transparency)
(add-to-list 'default-frame-alist `(alpha . ,efs/frame-transparency))
(set-frame-parameter (selected-frame) 'fullscreen 'maximized)
(add-to-list 'default-frame-alist '(fullscreen . maximized))

;; Styling ;-)

(set-background-color "#FFF6FD")

;; ==========================================================================
;; ======================== Plugin emacs settings ===========================
;; ==========================================================================

; --- Provide the melpa packages

(require 'package)

(setq package-archives '(("org" . "https://orgmode.org/elpa/")
("elpa" . "https://elpa.gnu.org/packages/")))

(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)

(unless package-archive-contents
(package-refresh-contents))

; --- Usage package

(require 'use-package)
(setq use-package-always-ensure t)

(use-package auto-package-update
:custom
(auto-package-update-interval 7)
(auto-package-update-prompt-before-update t)
(auto-package-update-hide-results t)
:config
(auto-package-update-maybe)
(auto-package-update-at-time "09:00"))
(custom-set-variables
'(package-selected-packages '(auto-package-update use-package)))
(custom-set-faces
)

=======================================================

Two questions I have:

a) Why is your init.el not running in my settings (I tried also on a debian virtual machine)
b) How can I stop emacs in each startup to contact the servers

Could you have a short look into this, if you have time ... would be extremly nice

Thanks a lot and cheers,
Stephan

@ThibaultGH
Copy link

Hey @IstiCusi,
I'm maybe 80% sure that you init.el files just misses the following lines:
;; Initialize use-package on non-Linux platforms (unless (package-installed-p 'use-package) (package-install 'use-package))

Which basically says "if use-package is not installed, use package-install to install it"
Like so you should not get this error message when running emacs now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants