unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
       [not found] <1741095947.686890.1699803039311.ref@mail.yahoo.com>
@ 2023-11-12 15:30 ` Globe Trotter
  2023-11-12 16:44   ` Manuel Giraud via Users list for the GNU Emacs text editor
  2023-11-12 16:44   ` Eli Zaretskii
  0 siblings, 2 replies; 17+ messages in thread
From: Globe Trotter @ 2023-11-12 15:30 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Hi,

I am a long-term emacs user (for 31 years) but I have a strange problem since my recent upgrade to 29.1 (as part of my Fedora distribution upgrade from 38 to 39).


I try:

$ emacs test.txt

And I get a window that simply loads the following:

https://i.stack.imgur.com/ecDDL.png

OK, that is unusual, so let me add a few lines of text and try and save, having done this for over 31 years.

I type, hit Ctrl-x and am asked where to save it:

https://i.stack.imgur.com/Drihj.png

Which file to save in? That is odd, why? Anyway, I type again "test.txt" and am told that the file is saved (and it is). Fine.

Then I hit Ctrl-Q and exit but am asked:

https://i.stack.imgur.com/DBuU1.png

No idea what this is about, but OK, "no". ("yes" does not change the outcome).

The file is saved and exists:

https://i.stack.imgur.com/sgAY0.png

OK, let us load this file again, with

emacs test.txt


I get a new "scratch" file loaded (same screenshot as the first one above). What happened to my created file (that still exists)?

I am not sure how to load a file, or save it. How do I get back the old behavior?

Thanks a lot for any help and suggestions!

Happy to provide more information.

Many thanks and best wishes,
GT



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-12 15:30 ` help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt Globe Trotter
@ 2023-11-12 16:44   ` Manuel Giraud via Users list for the GNU Emacs text editor
  2023-11-12 16:44   ` Eli Zaretskii
  1 sibling, 0 replies; 17+ messages in thread
From: Manuel Giraud via Users list for the GNU Emacs text editor @ 2023-11-12 16:44 UTC (permalink / raw)
  To: Globe Trotter; +Cc: help-gnu-emacs@gnu.org

Globe Trotter <itsme_410@yahoo.com> writes:

> Hi,
>
> I am a long-term emacs user (for 31 years) but I have a strange
> problem since my recent upgrade to 29.1 (as part of my Fedora
> distribution upgrade from 38 to 39).
>
>
> I try:
>
> $ emacs test.txt

Hi,

Could you try like that:

$ emacs -Q test.txt

Because what you describe should work as intended (and has worked always
I think).
-- 
Manuel Giraud



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-12 15:30 ` help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt Globe Trotter
  2023-11-12 16:44   ` Manuel Giraud via Users list for the GNU Emacs text editor
@ 2023-11-12 16:44   ` Eli Zaretskii
       [not found]     ` <878765838.2608508.1699810245902@mail.yahoo.com>
  1 sibling, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2023-11-12 16:44 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sun, 12 Nov 2023 15:30:39 +0000 (UTC)
> From: Globe Trotter <itsme_410@yahoo.com>
> 
> I am a long-term emacs user (for 31 years) but I have a strange problem since my recent upgrade to 29.1 (as part of my Fedora distribution upgrade from 38 to 39).
> 
> 
> I try:
> 
> $ emacs test.txt
> 
> And I get a window that simply loads the following:
> 
> https://i.stack.imgur.com/ecDDL.png

Chrystal ball says something is wrong with your customizations.  Try

  $ emacs -Q test.txt

instead.  If that behaves as you are used to, then look into your init
file(s) for the culprit(s).



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
       [not found]     ` <878765838.2608508.1699810245902@mail.yahoo.com>
@ 2023-11-12 17:39       ` Globe Trotter
  2023-11-12 18:05         ` Globe Trotter
  2023-11-12 18:22         ` Manuel Giraud via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 17+ messages in thread
From: Globe Trotter @ 2023-11-12 17:39 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org


On Sunday, November 12, 2023 at 10:46:06 AM CST, Eli Zaretskii <eliz@gnu.org> wrote: 





> Date: Sun, 12 Nov 2023 15:30:39 +0000 (UTC)

> From: Globe Trotter <itsme_410@yahoo.com>
> 
> I am a long-term emacs user (for 31 years) but I have a strange problem since my recent upgrade to 29.1 (as part of my Fedora distribution upgrade from 38 to 39).
> 
> 
> I try:
> 
> $ emacs test.txt
> 
> And I get a window that simply loads the following:
> 
> https://i.stack.imgur.com/ecDDL.png


> Chrystal ball says something is wrong with your customizations.  Try

>  $ emacs -Q test.txt

> nstead.  If that behaves as you are used to, then look into your init
> file(s) for the culprit(s).


Hi,

Thanks for this! Yes, this loads the existing file, however it does not load my default font (size is too  small).

Init files: I have a .emacs file, but I do not have a init.el file. What should I be looking at?

Here is my .emacs file. What should I be 



;; Added by Package.el.  This must come before configurations of
;; installed packages.  Don't delete this line.  If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
;; (package-initialize)
(setq load-path (append load-path (list "~/lisp")))

;; Startup settings for ESS (this is borrowed from VM)
;;
;; For some reason, native compilation breaks VM. As a workaround until the
;; problem is understood and fixed, disable native compilation of all VM
;; lisp files.
;; (eval-after-load "comp"
;;'(if (boundp 'native-comp-deferred-compilation-deny-list)
;;     (add-to-list 'native-comp-deferred-compilation-deny-list "*/ess\*.el"))

(setq TeX-default-mode 'latex-mode)
(setq text-mode-hook '(lambda ()
            (auto-fill-mode 1)(abbrev-mode 1)
            ))
(define-key esc-map "#" 'goto-line)
(setq default-major-mode 'text-mode)
(setq auto-save-interval 1000)
(setq ask-about-buffer-names t)
(defun rec0() (interactive)(recenter 0))
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(auto-compression-mode t nil (jka-compr))
 '(case-fold-search t)
 '(column-number-mode t)
 '(current-language-environment "Latin-1")
 '(default-input-method "latin-1-prefix")
 '(font-use-system-font t)
 '(global-font-lock-mode t nil (font-lock))
 '(send-mail-function 'mailclient-send-it)
 '(show-paren-mode t nil (paren))
 '(text-mode-hook
   '(turn-on-auto-fill
     (lambda nil
       (auto-fill-mode 1)
       (abbrev-mode 1))))
 '(warning-suppress-log-types '((comp)))
 '(warning-suppress-types '((comp))))


(defun linux-c-mode ()
  "C mode with adjusted defaults for use with the Linux kernel."
  (interactive)
  (c-mode)
  (c-set-style "K&R")
  (setq tab-width 8)
  (setq indent-tabs-mode t)
  (setq c-basic-offset 8))

(setq auto-mode-alist (cons '(".*\\.[ch]$" . linux-c-mode) auto-mode-alist))

(setq inhibit-startup-message t)
(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
(add-hook 'message-mode-hook 'turn-on-flyspell)
(add-hook 'text-mode-hook 'turn-on-flyspell)
(add-hook 'c-mode-common-hook 'flyspell-prog-mode)
(add-hook 'tcl-mode-hook 'flyspell-prog-mode)
(defun turn-on-flyspell ()
  "Force flyspell-mode on using a positive arg.  For use in hooks."
  (interactive)
  (flyspell-mode 1))


;;Flyspell is compatible with TeX editing. That is, Flyspell tries, as much as possible, to avoid highlighting TeX command. In order to automate the starting of Flyspell when editing LaTeX source files, one may add the following expression in his .emacs file:

(add-hook 'LaTeX-mode-hook 'flyspell-mode)


;;Flyspell proposes corrections for miss-spelled words by the means of pop-up menus. Clicking Mouse-2 on a highlighted word will raise a menu that proposes corrections. Alternatively you will be able to store the word in the global dictionary, to add it to the current document dictionary or to ignore the miss-spelling for the current session.

;;Flyspell also proposes automatic corrections. With M-\t, Flyspell replaces current miss-spelled word with a possible correction. If several corrections are made possible, they are sorted and M-\t proposes a new correction each time hit. Corrections may be sorted by alphabetical ordering (the default) or by likeness to the current word ordering. To enable the likeness criteria, uses:

(setq flyspell-sort-corrections nil)


;;Flyspell considers that a word repeated twice is an error (for instance, the second word word is highlighted). This feature can be disable with:

(setq flyspell-doublon-as-error-flag nil)

;(add-to-list 'default-frame-alist '(font .  10x20 ))
;(set-face-attribute 'default t :font  10x20 )

(set-frame-font "10x20")

;; auto-complete taken from https://emacs.stackexchange.com/questions/5938/how-to-make-auto-complete-work-in-auctex-mode
(require 'package)
(package-initialize)
(ac-config-default)

;; Activate auto-complete for latex modes (AUCTeX or Emacs' builtin one).

;; https://raw.githubusercontent.com/vitoshka/ac-math/master/ac-math.el

(require 'unicode-math-input)

(require 'ac-math) ; This is not needed when you install from MELPA

(add-to-list 'ac-modes 'latex-mode)   ; make auto-complete aware of `latex-mode`

(defun ac-latex-mode-setup ()         ; add ac-sources to default ac-sources
  (setq ac-sources
     (append '(ac-source-math-unicode ac-source-math-latex ac-source-latex-commands)
         ac-sources)))

(setq ac-math-unicode-in-math-p t)

;; Activate autocomplete with ess from: https://stackoverflow.com/questions/16075012/emacs-ess-auto-complete

(setq ess-use-auto-complete t)

;; https://stackoverflow.com/questions/24106099/emacs-ess-indentation-and-auto-completion?rq=1

(define-key ess-mode-map [tab] 'ess-indent-or-complete)
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:family "DejaVu Sans Mono" :foundry "PfEd" :slant normal :weight normal :height 162 :width normal)))))

;(add-to-list 'default-frame-alist '(font ."Terminus-20"))
;(set-face-attribute 'default t :font "Terminus-20")


;; http://blog.vivekhaldar.com/post/4809065853/dotemacs-extract-interactively-change-font-size
(defun my/zoom-in ()
  "Increase font size by 10 points"
  (interactive)
  (set-face-attribute 'default nil
                      :height
                      (+ (face-attribute 'default :height)
                         10)))

(defun my/zoom-out ()
  "Decrease font size by 10 points"
  (interactive)
  (set-face-attribute 'default nil
                      :height
                      (- (face-attribute 'default :height)

                         10)))


;; change font size, interactively
(global-set-key (kbd "C->") 'my/zoom-in)
(global-set-key (kbd "C-<") 'my/zoom-out)

(add-hook 'mail-mode-hook 'turn-on-auto-fill)
(defun my-mail-mode-hook ()
  (auto-fill-mode 1)
  (abbrev-mode 1)
  (local-set-key "\C-Xk" 'server-edit))
(add-hook 'mail-mode-hook 'my-mail-mode-hook)

  (add-to-list 'auto-mode-alist '(".*mutt.*" . message-mode))                                                                   
  (setq mail-header-separator "")                                                                                               
  (add-hook 'message-mode-hook
          'turn-on-auto-fill
          (function
           (lambda ()
             (progn
               (local-unset-key "\C-c\C-c")
               (define-key message-mode-map "\C-c\C-c" '(lambda ()
                                                          "save and exit quickly"
                                                          (interactive)
                                                          (save-buffer)
                                                          (server-edit)))))))


;; define a function that runs the given command line
(defun email-cleanup ()
   (call-process-shell-command "for f in /tmp/mutt-* ;do email-process $f ;done"))

;; add the above function to the hook
(add-hook 'kill-emacs-hook #'email-cleanup)


;;https://endlessparentheses.com/ispell-and-abbrev-the-perfect-auto-correct.html
(define-key ctl-x-map "\C-i"
  #'endless/ispell-word-then-abbrev)

(defun endless/simple-get-word ()
  (car-safe (save-excursion (ispell-get-word nil))))

(defun endless/ispell-word-then-abbrev (p)
  "Call `ispell-word', then create an abbrev for it.
With prefix P, create local abbrev. Otherwise it will
be global.
If there's nothing wrong with the word at point, keep
looking for a typo until the beginning of buffer. You can
skip typos you don't want to fix with `SPC', and you can
abort completely with `C-g'."
  (interactive "P")
  (let (bef aft)
    (save-excursion
      (while (if (setq bef (endless/simple-get-word))
                 ;; Word was corrected or used quit.
                 (if (ispell-word nil 'quiet)
                     nil ; End the loop.
                   ;; Also end if we reach `bob'.
                   (not (bobp)))
               ;; If there's no word at point, keep looking
               ;; until `bob'.
               (not (bobp)))
        (backward-word)
        (backward-char))
      (setq aft (endless/simple-get-word)))
    (if (and aft bef (not (equal aft bef)))
        (let ((aft (downcase aft))
              (bef (downcase bef)))
          (define-abbrev
            (if p local-abbrev-table global-abbrev-table)
            bef aft)
          (message "\"%s\" now expands to \"%s\" %sally"
                   bef aft (if p "loc" "glob")))
      (user-error "No typo at or before point"))))

(setq save-abbrevs 'silently)
(setq-default abbrev-mode t)


;;https://bugzilla.redhat.com/show_bug.cgi?id=2109745#38




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-12 17:39       ` Globe Trotter
@ 2023-11-12 18:05         ` Globe Trotter
  2023-11-12 18:22         ` Manuel Giraud via Users list for the GNU Emacs text editor
  1 sibling, 0 replies; 17+ messages in thread
From: Globe Trotter @ 2023-11-12 18:05 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Just to update on some more things I tried, to not much use, and that is, I removed both my .emacs and .emacs.d directories.

However, the behavior of nothing loading persists when I do not use `emacs -Q` but only `emacs`.

Also, exiting creates  a file in: .emacs.d/eln-cache/29.1-4c106e1f which is as follows:



$ file subr--trampoline-64656c6574652d63686172_delete_char_0.eln
subr--trampoline-64656c6574652d63686172_delete_char_0.eln: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=7f26b8d38ee003d7f505b345aabb3e85734886c8, not stripped

I don't know what this is, or what to do with this.

It may be a Fedora 39 problem, of course, but thanks for any further suggestions and help.




On Sunday, November 12, 2023 at 11:39:15 AM CST, Globe Trotter <itsme_410@yahoo.com> wrote: 






On Sunday, November 12, 2023 at 10:46:06 AM CST, Eli Zaretskii <eliz@gnu.org> wrote: 





> Date: Sun, 12 Nov 2023 15:30:39 +0000 (UTC)

> From: Globe Trotter <itsme_410@yahoo.com>
> 
> I am a long-term emacs user (for 31 years) but I have a strange problem since my recent upgrade to 29.1 (as part of my Fedora distribution upgrade from 38 to 39).
> 
> 
> I try:
> 
> $ emacs test.txt
> 
> And I get a window that simply loads the following:
> 
> https://i.stack.imgur.com/ecDDL.png


> Chrystal ball says something is wrong with your customizations.  Try

>  $ emacs -Q test.txt

> nstead.  If that behaves as you are used to, then look into your init
> file(s) for the culprit(s).


Hi,

Thanks for this! Yes, this loads the existing file, however it does not load my default font (size is too  small).

Init files: I have a .emacs file, but I do not have a init.el file. What should I be looking at?

Here is my .emacs file. What should I be 



;; Added by Package.el.  This must come before configurations of
;; installed packages.  Don't delete this line.  If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
;; (package-initialize)
(setq load-path (append load-path (list "~/lisp")))

;; Startup settings for ESS (this is borrowed from VM)
;;
;; For some reason, native compilation breaks VM. As a workaround until the
;; problem is understood and fixed, disable native compilation of all VM
;; lisp files.
;; (eval-after-load "comp"
;;'(if (boundp 'native-comp-deferred-compilation-deny-list)
;;     (add-to-list 'native-comp-deferred-compilation-deny-list "*/ess\*.el"))

(setq TeX-default-mode 'latex-mode)
(setq text-mode-hook '(lambda ()
            (auto-fill-mode 1)(abbrev-mode 1)
            ))
(define-key esc-map "#" 'goto-line)
(setq default-major-mode 'text-mode)
(setq auto-save-interval 1000)
(setq ask-about-buffer-names t)
(defun rec0() (interactive)(recenter 0))
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(auto-compression-mode t nil (jka-compr))
 '(case-fold-search t)
 '(column-number-mode t)
 '(current-language-environment "Latin-1")
 '(default-input-method "latin-1-prefix")
 '(font-use-system-font t)
 '(global-font-lock-mode t nil (font-lock))
 '(send-mail-function 'mailclient-send-it)
 '(show-paren-mode t nil (paren))
 '(text-mode-hook
   '(turn-on-auto-fill
     (lambda nil
       (auto-fill-mode 1)
       (abbrev-mode 1))))
 '(warning-suppress-log-types '((comp)))
 '(warning-suppress-types '((comp))))


(defun linux-c-mode ()
  "C mode with adjusted defaults for use with the Linux kernel."
  (interactive)
  (c-mode)
  (c-set-style "K&R")
  (setq tab-width 8)
  (setq indent-tabs-mode t)
  (setq c-basic-offset 8))

(setq auto-mode-alist (cons '(".*\\.[ch]$" . linux-c-mode) auto-mode-alist))

(setq inhibit-startup-message t)
(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
(add-hook 'message-mode-hook 'turn-on-flyspell)
(add-hook 'text-mode-hook 'turn-on-flyspell)
(add-hook 'c-mode-common-hook 'flyspell-prog-mode)
(add-hook 'tcl-mode-hook 'flyspell-prog-mode)
(defun turn-on-flyspell ()
  "Force flyspell-mode on using a positive arg.  For use in hooks."
  (interactive)
  (flyspell-mode 1))


;;Flyspell is compatible with TeX editing. That is, Flyspell tries, as much as possible, to avoid highlighting TeX command. In order to automate the starting of Flyspell when editing LaTeX source files, one may add the following expression in his .emacs file:

(add-hook 'LaTeX-mode-hook 'flyspell-mode)


;;Flyspell proposes corrections for miss-spelled words by the means of pop-up menus. Clicking Mouse-2 on a highlighted word will raise a menu that proposes corrections. Alternatively you will be able to store the word in the global dictionary, to add it to the current document dictionary or to ignore the miss-spelling for the current session.

;;Flyspell also proposes automatic corrections. With M-\t, Flyspell replaces current miss-spelled word with a possible correction. If several corrections are made possible, they are sorted and M-\t proposes a new correction each time hit. Corrections may be sorted by alphabetical ordering (the default) or by likeness to the current word ordering. To enable the likeness criteria, uses:

(setq flyspell-sort-corrections nil)


;;Flyspell considers that a word repeated twice is an error (for instance, the second word word is highlighted). This feature can be disable with:

(setq flyspell-doublon-as-error-flag nil)

;(add-to-list 'default-frame-alist '(font .  10x20 ))
;(set-face-attribute 'default t :font  10x20 )

(set-frame-font "10x20")

;; auto-complete taken from https://emacs.stackexchange.com/questions/5938/how-to-make-auto-complete-work-in-auctex-mode
(require 'package)
(package-initialize)
(ac-config-default)

;; Activate auto-complete for latex modes (AUCTeX or Emacs' builtin one).

;; https://raw.githubusercontent.com/vitoshka/ac-math/master/ac-math.el

(require 'unicode-math-input)

(require 'ac-math) ; This is not needed when you install from MELPA

(add-to-list 'ac-modes 'latex-mode)   ; make auto-complete aware of `latex-mode`

(defun ac-latex-mode-setup ()         ; add ac-sources to default ac-sources
  (setq ac-sources
     (append '(ac-source-math-unicode ac-source-math-latex ac-source-latex-commands)
         ac-sources)))

(setq ac-math-unicode-in-math-p t)

;; Activate autocomplete with ess from: https://stackoverflow.com/questions/16075012/emacs-ess-auto-complete

(setq ess-use-auto-complete t)

;; https://stackoverflow.com/questions/24106099/emacs-ess-indentation-and-auto-completion?rq=1

(define-key ess-mode-map [tab] 'ess-indent-or-complete)
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:family "DejaVu Sans Mono" :foundry "PfEd" :slant normal :weight normal :height 162 :width normal)))))

;(add-to-list 'default-frame-alist '(font ."Terminus-20"))
;(set-face-attribute 'default t :font "Terminus-20")


;; http://blog.vivekhaldar.com/post/4809065853/dotemacs-extract-interactively-change-font-size
(defun my/zoom-in ()
  "Increase font size by 10 points"
  (interactive)
  (set-face-attribute 'default nil
                      :height
                      (+ (face-attribute 'default :height)
                         10)))

(defun my/zoom-out ()
  "Decrease font size by 10 points"
  (interactive)
  (set-face-attribute 'default nil
                      :height
                      (- (face-attribute 'default :height)

                         10)))


;; change font size, interactively
(global-set-key (kbd "C->") 'my/zoom-in)
(global-set-key (kbd "C-<") 'my/zoom-out)

(add-hook 'mail-mode-hook 'turn-on-auto-fill)
(defun my-mail-mode-hook ()
  (auto-fill-mode 1)
  (abbrev-mode 1)
  (local-set-key "\C-Xk" 'server-edit))
(add-hook 'mail-mode-hook 'my-mail-mode-hook)

  (add-to-list 'auto-mode-alist '(".*mutt.*" . message-mode))                                                                   
  (setq mail-header-separator "")                                                                                               
  (add-hook 'message-mode-hook
          'turn-on-auto-fill
          (function
           (lambda ()
             (progn
               (local-unset-key "\C-c\C-c")
               (define-key message-mode-map "\C-c\C-c" '(lambda ()
                                                          "save and exit quickly"
                                                          (interactive)
                                                          (save-buffer)
                                                          (server-edit)))))))


;; define a function that runs the given command line
(defun email-cleanup ()
   (call-process-shell-command "for f in /tmp/mutt-* ;do email-process $f ;done"))

;; add the above function to the hook
(add-hook 'kill-emacs-hook #'email-cleanup)


;;https://endlessparentheses.com/ispell-and-abbrev-the-perfect-auto-correct.html
(define-key ctl-x-map "\C-i"
  #'endless/ispell-word-then-abbrev)

(defun endless/simple-get-word ()
  (car-safe (save-excursion (ispell-get-word nil))))

(defun endless/ispell-word-then-abbrev (p)
  "Call `ispell-word', then create an abbrev for it.
With prefix P, create local abbrev. Otherwise it will
be global.
If there's nothing wrong with the word at point, keep
looking for a typo until the beginning of buffer. You can
skip typos you don't want to fix with `SPC', and you can
abort completely with `C-g'."
  (interactive "P")
  (let (bef aft)
    (save-excursion
      (while (if (setq bef (endless/simple-get-word))
                 ;; Word was corrected or used quit.
                 (if (ispell-word nil 'quiet)
                     nil ; End the loop.
                   ;; Also end if we reach `bob'.
                   (not (bobp)))
               ;; If there's no word at point, keep looking
               ;; until `bob'.
               (not (bobp)))
        (backward-word)
        (backward-char))
      (setq aft (endless/simple-get-word)))
    (if (and aft bef (not (equal aft bef)))
        (let ((aft (downcase aft))
              (bef (downcase bef)))
          (define-abbrev
            (if p local-abbrev-table global-abbrev-table)
            bef aft)
          (message "\"%s\" now expands to \"%s\" %sally"
                   bef aft (if p "loc" "glob")))
      (user-error "No typo at or before point"))))

(setq save-abbrevs 'silently)
(setq-default abbrev-mode t)


;;https://bugzilla.redhat.com/show_bug.cgi?id=2109745#38



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-12 17:39       ` Globe Trotter
  2023-11-12 18:05         ` Globe Trotter
@ 2023-11-12 18:22         ` Manuel Giraud via Users list for the GNU Emacs text editor
  2023-11-12 18:32           ` Globe Trotter
  1 sibling, 1 reply; 17+ messages in thread
From: Manuel Giraud via Users list for the GNU Emacs text editor @ 2023-11-12 18:22 UTC (permalink / raw)
  To: Globe Trotter; +Cc: help-gnu-emacs@gnu.org

Globe Trotter <itsme_410@yahoo.com> writes:

[...]

> Here is my .emacs file. What should I be 

[...]

By commenting the following lines, I could make your configuration work
and opening a filename argument correctly.  So the offender is here:

> (ac-config-default)
[...]
> (require 'unicode-math-input)
> (require 'ac-math) ; This is not needed when you install from MELPA
> (add-to-list 'ac-modes 'latex-mode)   ; make auto-complete aware of `latex-mode`
[...]
> (define-key ess-mode-map [tab] 'ess-indent-or-complete)
-- 
Manuel Giraud



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-12 18:22         ` Manuel Giraud via Users list for the GNU Emacs text editor
@ 2023-11-12 18:32           ` Globe Trotter
  2023-11-12 18:47             ` Manuel Giraud via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 17+ messages in thread
From: Globe Trotter @ 2023-11-12 18:32 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org








On Sunday, November 12, 2023 at 12:23:39 PM CST, Manuel Giraud via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote: 





Globe Trotter <itsme_410@yahoo.com> writes:

[...]

> Here is my .emacs file. What should I be 

[...]

By commenting the following lines, I could make your configuration work
and opening a filename argument correctly.  So the offender is here:


> (ac-config-default)
[...]
> (require 'unicode-math-input)
> (require 'ac-math) ; This is not needed when you install from MELPA
> (add-to-list 'ac-modes 'latex-mode)   ; make auto-complete aware of `latex-mode`
[...]
> (define-key ess-mode-map [tab] 'ess-indent-or-complete)

-- 
Manuel Giraud



Thanks for this! However, for me, it has no effect.  Indeed, removing the local .emacs and .emacs.d did not change the behaviour at all.

However, downgrading to Emacs 28.3 (on Fedora 38) downgrades the following four files,    

emacs-1:28.3-0.rc1.fc38.x86_64                                                
emacs-common-1:28.3-0.rc1.fc38.x86_64                                         
emacs-filesystem-1:28.3-0.rc1.fc38.noarch                                     
libotf-0.9.13-22.fc38.x86_64                                                  

and for me brings back the old behavior (of file loading correctly).

So, the problem may be with the newer versions of one of those files.

Thanks again for your help!  Let me know if I can provide more information.

Best wishes!



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-12 18:32           ` Globe Trotter
@ 2023-11-12 18:47             ` Manuel Giraud via Users list for the GNU Emacs text editor
  2023-11-12 21:07               ` Globe Trotter
  0 siblings, 1 reply; 17+ messages in thread
From: Manuel Giraud via Users list for the GNU Emacs text editor @ 2023-11-12 18:47 UTC (permalink / raw)
  To: Globe Trotter; +Cc: help-gnu-emacs@gnu.org

Globe Trotter <itsme_410@yahoo.com> writes:

> Thanks for this! However, for me, it has no effect.  Indeed, removing
> the local .emacs and .emacs.d did not change the behaviour at all.

This is strange because it worked with "emacs -Q", right?  Could you try
this:

$ emacs --no-site-file test.txt
-- 
Manuel Giraud



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-12 18:47             ` Manuel Giraud via Users list for the GNU Emacs text editor
@ 2023-11-12 21:07               ` Globe Trotter
  2023-11-13  9:57                 ` Manuel Giraud via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 17+ messages in thread
From: Globe Trotter @ 2023-11-12 21:07 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

On Sunday, November 12, 2023 at 12:48:14 PM CST, Manuel Giraud via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote: 





Globe Trotter <itsme_410@yahoo.com> writes:

> Thanks for this! However, for me, it has no effect.  Indeed, removing
> the local .emacs and .emacs.d did not change the behaviour at all.

This is strange because it worked with "emacs -Q", right?  Could you try
this:

$ emacs --no-site-file test.txt

-- 
Manuel Giraud


Thank you for this! I do get a split window, one with the file (with no customizations) and the other with Warnings:

Warning (initialization): An error occurred while loading ‘/home/gt/.emacs’:

Symbol's function definition is void: ac-config-default

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.


OK, let me try:


$ emacs --no-site-file  --debug-init test.txt

First window has the file.In the second window, I get:

Debugger entered--Lisp error: (void-function ac-config-default)
  (ac-config-default)
  load-with-code-conversion("/home/gt/.emacs" "/home/gt/.emacs" t t)
  load("~/.emacs" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode -0x1810ee4c1b34cb8>) #f(compiled-function () #<bytecode -0x1f3c61addc0b39f5>) t)
  command-line()
  normal-top-level()


OK, remove the line 

(ac-config-default)

and the line

with ess-mode-map


$ emacs --no-site-file  --debug-init test.txt

opens in one window, as with -Q.

Howver, not 

$ emacs test.txt

(crickets, nothing in the emacs window).

All right, lets remove the .emacs file completely:

$ emacs test.txt

(crickets, nothing in the emacs window). ie Same as before.

$ emacs --no-site-file test.txt

I get a split window and have the emacs splash screen in the second window. The first window has the file.

Thanks again for your help!

GT



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-12 21:07               ` Globe Trotter
@ 2023-11-13  9:57                 ` Manuel Giraud via Users list for the GNU Emacs text editor
  2023-11-13 12:39                   ` Globe Trotter
  0 siblings, 1 reply; 17+ messages in thread
From: Manuel Giraud via Users list for the GNU Emacs text editor @ 2023-11-13  9:57 UTC (permalink / raw)
  To: Globe Trotter; +Cc: help-gnu-emacs@gnu.org

Hi,

So it seems to you had 2 issues:

   - the one in your .emacs about 'ac-config-default': so you have to
     find out how to load this correctly (or remove it, as you did)
     
   - the one in a site file on your system.  To find where it is: you
     should read the following info node: (emacs) Init File
-- 
Manuel Giraud



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-13  9:57                 ` Manuel Giraud via Users list for the GNU Emacs text editor
@ 2023-11-13 12:39                   ` Globe Trotter
  2023-11-13 17:15                     ` Manuel Giraud via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 17+ messages in thread
From: Globe Trotter @ 2023-11-13 12:39 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: help-gnu-emacs@gnu.org








> On Monday, November 13, 2023 at 03:57:57 AM CST, Manuel Giraud via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote: 





> Hi,

> So it seems to you had 2 issues:

>  - the one in your .emacs about 'ac-config-default': so you have to  find out how to load this correctly (or remove it, as you did)
    
>  - the one in a site file on your system.  To find where it is: you  should read the following info node: (emacs) Init File

Apologies, what do I do here? Sorry, I do not know.

Btw, I am using X, and the openbox window manager. In case that makes a difference. 

Thanks!




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-13 12:39                   ` Globe Trotter
@ 2023-11-13 17:15                     ` Manuel Giraud via Users list for the GNU Emacs text editor
  2023-11-13 22:10                       ` Globe Trotter
  0 siblings, 1 reply; 17+ messages in thread
From: Manuel Giraud via Users list for the GNU Emacs text editor @ 2023-11-13 17:15 UTC (permalink / raw)
  To: Globe Trotter; +Cc: help-gnu-emacs@gnu.org

Globe Trotter <itsme_410@yahoo.com> writes:

[...]

>>  - the one in a site file on your system.  To find where it is: you  should read the following info node: (emacs) Init File
>
> Apologies, what do I do here? Sorry, I do not know.

I gave you a hint to be able to learn for yourself.  Do you don't know
how to read info from Emacs?  If not, you should!  It is a vast
invaluable resource of documentation for Emacs (among other things)!

When you have a running Emacs, the following key sequence should take
you to where I was talking:

    - C-h r
    - m Init File <RET>

You could even learn how to navigate this documentation:

    - C-h i
    - d
    - m Info <RET>
    - h

> Btw, I am using X, and the openbox window manager. In case that makes
> a difference.

This is not relevant AFAIK.
-- 
Manuel Giraud



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-13 17:15                     ` Manuel Giraud via Users list for the GNU Emacs text editor
@ 2023-11-13 22:10                       ` Globe Trotter
  2023-11-14  8:26                         ` Manuel Giraud via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 17+ messages in thread
From: Globe Trotter @ 2023-11-13 22:10 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: help-gnu-emacs@gnu.org








On Monday, November 13, 2023 at 11:16:35 AM CST, Manuel Giraud via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote: 





Globe Trotter <itsme_410@yahoo.com> writes:

[...]

>>  - the one in a site file on your system.  To find where it is: you  should read the following info node: (emacs) Init File
>
> Apologies, what do I do here? Sorry, I do not know.

I gave you a hint to be able to learn for yourself.  Do you don't know
how to read info from Emacs?  If not, you should!  It is a vast
invaluable resource of documentation for Emacs (among other things)!

When you have a running Emacs, the following key sequence should take
you to where I was talking:

    - C-h r
    - m Init File <RET>

You could even learn how to navigate this documentation:

    - C-h i
    - d
    - m Info <RET>
    - h

> Btw, I am using X, and the openbox window manager. In case that makes
> a difference.

This is not relevant AFAIK.

-- 
Manuel Giraud

Thanks! I was not aware of all this.

Other than the .emacs and .emacs.d files, it apears that the only relevant init files I have are:

/usr/share/emacs/site-lisp/site-start.el

/usr/share/emacs/site-lisp/default.el

Both are system files dated Apr 13 2023.

Thanks!




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-13 22:10                       ` Globe Trotter
@ 2023-11-14  8:26                         ` Manuel Giraud via Users list for the GNU Emacs text editor
       [not found]                           ` <2043704325.3413213.1699966770466@mail.yahoo.com>
  0 siblings, 1 reply; 17+ messages in thread
From: Manuel Giraud via Users list for the GNU Emacs text editor @ 2023-11-14  8:26 UTC (permalink / raw)
  To: Globe Trotter; +Cc: help-gnu-emacs@gnu.org

>> You could even learn how to navigate this documentation:
>>
>>    - C-h i
>>    - d
>>    - m Info <RET>
>>    - h

Correcting myself:  'C-h i h' is sufficient here.

> Thanks! I was not aware of all this.
>
> Other than the .emacs and .emacs.d files, it apears that the only
> relevant init files I have are:
>
> /usr/share/emacs/site-lisp/site-start.el
>
> /usr/share/emacs/site-lisp/default.el
>
> Both are system files dated Apr 13 2023.

So now you have to look what is into those files.  AFAIK (Eli?), Emacs
does not install them by default.  So it may the something the Emacs
package of Fedora does or some other package that install Emacs support.
-- 
Manuel Giraud



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
       [not found]                           ` <2043704325.3413213.1699966770466@mail.yahoo.com>
@ 2023-11-14 13:00                             ` Globe Trotter
  2023-11-14 13:19                               ` Manuel Giraud via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 17+ messages in thread
From: Globe Trotter @ 2023-11-14 13:00 UTC (permalink / raw)
  To: Help-gnu-emacs


On Tuesday, November 14, 2023 at 02:27:36 AM CST, Manuel Giraud via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote: 

> Thanks! I was not aware of all this.
>
> Other than the .emacs and .emacs.d files, it apears that the only
> relevant init files I have are:
>
> /usr/share/emacs/site-lisp/site-start.el


Taking the heavy-handed step of removing this file "solves" my problem in that I can load the file.

This is the file, btw:


;;; loaded before user's ".emacs" file and default.el

;; load *.el and *.elc in /usr/share/emacs/site-lisp/site-start.d on startup
(mapc
 'load
 (delete-dups
  (mapcar 'file-name-sans-extension
          (directory-files
           "/usr/share/emacs/site-lisp/site-start.d" t "\\.elc?\\'"))))
(setq source-directory "/usr/share/emacs/29.1/")



The above file is, however also there in 28.3 (with the appropriate version).



>
> /usr/share/emacs/site-lisp/default.el
>
> Both are system files dated Apr 13 2023.


Thanks for all your help!



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-14 13:00                             ` Globe Trotter
@ 2023-11-14 13:19                               ` Manuel Giraud via Users list for the GNU Emacs text editor
  2023-11-14 14:10                                 ` Globe Trotter
  0 siblings, 1 reply; 17+ messages in thread
From: Manuel Giraud via Users list for the GNU Emacs text editor @ 2023-11-14 13:19 UTC (permalink / raw)
  To: Globe Trotter; +Cc: Help-gnu-emacs

Globe Trotter <itsme_410@yahoo.com> writes:

> Taking the heavy-handed step of removing this file "solves" my problem
> in that I can load the file.
>
> This is the file, btw:
>
>
> ;;; loaded before user's ".emacs" file and default.el
>
> ;; load *.el and *.elc in /usr/share/emacs/site-lisp/site-start.d on startup
> (mapc
>  'load
>  (delete-dups
>   (mapcar 'file-name-sans-extension
>           (directory-files
>            "/usr/share/emacs/site-lisp/site-start.d" t "\\.elc?\\'"))))
> (setq source-directory "/usr/share/emacs/29.1/")

Ok.  So you should not remove this site-start.el.  It is related to how
Fedora install its package with Emacs code in it.

Now, we can go one step further.  What that the above code does is to
load each and every ".el" and ".elc" file located in the directory
"/usr/share/emacs/site-lisp/site-start.d"

So now, you have to look what those files are.  Most probably, it is
code from other Fedora packages.  Maybe one of those package was not
updated correctly, not tested correctly with Emacs 29,... I don't know.
-- 
Manuel Giraud



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt
  2023-11-14 13:19                               ` Manuel Giraud via Users list for the GNU Emacs text editor
@ 2023-11-14 14:10                                 ` Globe Trotter
  0 siblings, 0 replies; 17+ messages in thread
From: Globe Trotter @ 2023-11-14 14:10 UTC (permalink / raw)
  To: Manuel Giraud; +Cc: Help-gnu-emacs

Thanks!


 On Tuesday, November 14, 2023 at 07:20:24 AM CST, Manuel Giraud via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote: 





Globe Trotter <itsme_410@yahoo.com> writes:

> Taking the heavy-handed step of removing this file "solves" my problem
> in that I can load the file.
>
> This is the file, btw:
>
>
> ;;; loaded before user's ".emacs" file and default.el
>
> ;; load *.el and *.elc in /usr/share/emacs/site-lisp/site-start.d on startup
> (mapc
>  'load
>  (delete-dups
>   (mapcar 'file-name-sans-extension
>           (directory-files
>            "/usr/share/emacs/site-lisp/site-start.d" t "\\.elc?\\'"))))
> (setq source-directory "/usr/share/emacs/29.1/")

Ok.  So you should not remove this site-start.el.  It is related to how
Fedora install its package with Emacs code in it.

Now, we can go one step further.  What that the above code does is to
load each and every ".el" and ".elc" file located in the directory
"/usr/share/emacs/site-lisp/site-start.d"

So now, you have to look what those files are.  Most probably, it is
code from other Fedora packages.  Maybe one of those package was not
updated correctly, not tested correctly with Emacs 29,... I don't know.

-- 
Manuel Giraud

I have tracked down the problem: this was caused by emacs-common-ess. Despite the fact that I was not calling it, something was being messed up. So I removed that package and it sort of works.

I say sort of, because I get very tiny fonts and I have to manually go in and change for every session to 14, (does not last beyond the session, which is kind of irritatting).

Even bringing back my .emacs does not help.



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-11-14 14:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1741095947.686890.1699803039311.ref@mail.yahoo.com>
2023-11-12 15:30 ` help: how to load existing file after upgrading to Emacs 29.1 from 28.3, or save it without prompt Globe Trotter
2023-11-12 16:44   ` Manuel Giraud via Users list for the GNU Emacs text editor
2023-11-12 16:44   ` Eli Zaretskii
     [not found]     ` <878765838.2608508.1699810245902@mail.yahoo.com>
2023-11-12 17:39       ` Globe Trotter
2023-11-12 18:05         ` Globe Trotter
2023-11-12 18:22         ` Manuel Giraud via Users list for the GNU Emacs text editor
2023-11-12 18:32           ` Globe Trotter
2023-11-12 18:47             ` Manuel Giraud via Users list for the GNU Emacs text editor
2023-11-12 21:07               ` Globe Trotter
2023-11-13  9:57                 ` Manuel Giraud via Users list for the GNU Emacs text editor
2023-11-13 12:39                   ` Globe Trotter
2023-11-13 17:15                     ` Manuel Giraud via Users list for the GNU Emacs text editor
2023-11-13 22:10                       ` Globe Trotter
2023-11-14  8:26                         ` Manuel Giraud via Users list for the GNU Emacs text editor
     [not found]                           ` <2043704325.3413213.1699966770466@mail.yahoo.com>
2023-11-14 13:00                             ` Globe Trotter
2023-11-14 13:19                               ` Manuel Giraud via Users list for the GNU Emacs text editor
2023-11-14 14:10                                 ` Globe Trotter

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).