unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55257: 29.0.50; New command `scratch-buffer' inconsistent with startup
@ 2022-05-04  8:31 David Ponce
  2022-05-04 14:58 ` Sean Whitton
  0 siblings, 1 reply; 3+ messages in thread
From: David Ponce @ 2022-05-04  8:31 UTC (permalink / raw)
  To: 55257

Hello,

The new command `scratch-buffer' does not re-create the *scratch* buffer
like in startup.el.

The below patch fix this:
--- a/./installs/emacs/lisp/simple.el
+++ b/./emacs.d/simple.el
@@ -10221,7 +10221,8 @@ If the buffer doesn't exist, create it first."
        (pop-to-buffer-same-window "*scratch*")
      (pop-to-buffer-same-window (get-buffer-create "*scratch*"))
      (when initial-scratch-message
-      (insert initial-scratch-message))
+      (insert (substitute-command-keys initial-scratch-message))
+      (set-buffer-modified-p nil))
      (funcall initial-major-mode)))

Thanks!

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.17.4)
  of 2022-05-04
Repository revision: 268713e227e8b665b1874c96ea96d1e7fccaab11
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora Linux 35 (KDE Plasma)

Configured using:
  'configure --with-cairo --without-sqlite3
  PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
WEBP X11 XDBE XIM XPM GTK3 ZLIB

Important settings:
   value of $LC_TIME: fr_FR.utf8
   value of $LANG: fr_FR.UTF-8
   locale-coding-system: utf-8-unix





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

* bug#55257: 29.0.50; New command `scratch-buffer' inconsistent with startup
  2022-05-04  8:31 bug#55257: 29.0.50; New command `scratch-buffer' inconsistent with startup David Ponce
@ 2022-05-04 14:58 ` Sean Whitton
  2022-05-10  1:50   ` Sean Whitton
  0 siblings, 1 reply; 3+ messages in thread
From: Sean Whitton @ 2022-05-04 14:58 UTC (permalink / raw)
  To: David Ponce; +Cc: 55257

Hello,

On Wed 04 May 2022 at 10:31am +02, David Ponce wrote:

> Hello,
>
> The new command `scratch-buffer' does not re-create the *scratch* buffer
> like in startup.el.
>
> The below patch fix this:
> --- a/./installs/emacs/lisp/simple.el
> +++ b/./emacs.d/simple.el
> @@ -10221,7 +10221,8 @@ If the buffer doesn't exist, create it first."
>         (pop-to-buffer-same-window "*scratch*")
>       (pop-to-buffer-same-window (get-buffer-create "*scratch*"))
>       (when initial-scratch-message
> -      (insert initial-scratch-message))
> +      (insert (substitute-command-keys initial-scratch-message))
> +      (set-buffer-modified-p nil))
>       (funcall initial-major-mode)))

Thanks.  Let me try to fix this as part of factoring out the *scratch*
initialisation code, as discussed in an emacs-devel thread.

-- 
Sean Whitton





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

* bug#55257: 29.0.50; New command `scratch-buffer' inconsistent with startup
  2022-05-04 14:58 ` Sean Whitton
@ 2022-05-10  1:50   ` Sean Whitton
  0 siblings, 0 replies; 3+ messages in thread
From: Sean Whitton @ 2022-05-10  1:50 UTC (permalink / raw)
  To: 55257-done

Hello,

On Wed 04 May 2022 at 07:58am -07, Sean Whitton wrote:

> Hello,
>
> On Wed 04 May 2022 at 10:31am +02, David Ponce wrote:
>
>> Hello,
>>
>> The new command `scratch-buffer' does not re-create the *scratch* buffer
>> like in startup.el.
>>
>> The below patch fix this:
>> --- a/./installs/emacs/lisp/simple.el
>> +++ b/./emacs.d/simple.el
>> @@ -10221,7 +10221,8 @@ If the buffer doesn't exist, create it first."
>>         (pop-to-buffer-same-window "*scratch*")
>>       (pop-to-buffer-same-window (get-buffer-create "*scratch*"))
>>       (when initial-scratch-message
>> -      (insert initial-scratch-message))
>> +      (insert (substitute-command-keys initial-scratch-message))
>> +      (set-buffer-modified-p nil))
>>       (funcall initial-major-mode)))
>
> Thanks.  Let me try to fix this as part of factoring out the *scratch*
> initialisation code, as discussed in an emacs-devel thread.

This is now on master.

-- 
Sean Whitton





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

end of thread, other threads:[~2022-05-10  1:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04  8:31 bug#55257: 29.0.50; New command `scratch-buffer' inconsistent with startup David Ponce
2022-05-04 14:58 ` Sean Whitton
2022-05-10  1:50   ` Sean Whitton

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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