unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Frédéric Giquel via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 53451@debbugs.gnu.org
Subject: bug#53451: 28.0.91; Different behavior with native-compilation
Date: Sat, 22 Jan 2022 18:20:38 +0100	[thread overview]
Message-ID: <548b819e4f578de0f98a3e59a873514be560e451.camel@laposte.net> (raw)

Hi all,

I noticed a weird indentation using fish-mode (from MELPA). I tried to
understand the root cause and found that the problem only appears when
using native-compilation.
So I open a bug here (and not in the fish-mode repository).


Here is the procedure to repoduce :

With the following init.el :
(require 'package)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")))
(package-initialize)
(unless package-archive-contents
  (package-refresh-contents))
(unless (package-installed-p 'fish-mode)
  (package-install 'fish-mode))

Open the "foobar.fish" file with the following content (no indentation
at this step) :
function foobar
if test -n "$argv[1]"
echo foobar
end
end

Indent the whole buffer with :
- M-x mark-whole-buffer
- M-x indent-region


Here is the result I see :

With Emacs 28.0.91 without native-compilation (or with Emacs 27), the
buffer is indented correctly :
function foobar
    if test -n "$argv[1]"
	echo foobar
    end
end

With Emacs 28.0.91 with native-compilation (after ensuring that the
compilation has been done [*]), the indentation is not the same (and
not correct) :
function foobar
    if test -n "$argv[1]"
	echo foobar
end
end

[*] There is 2 warnings about "docstring wider than 80 characters"
during the native compilation of fish-mode


Best regards,
Frédéric Giquel

In GNU Emacs 28.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.31, cairo version 1.16.0)
 of 2022-01-22 built on guiriden
Repository revision: e58ecd01d51471e7e63d20ee059a5c26251220b7
Repository branch: emacs-28
Windowing system distributor 'The X.Org Foundation', version
11.0.12014000
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure --prefix=/opt/emacs28-native --with-native-compilation'

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

Important settings:
  value of $EMACSLOADPATH: 
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fish

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug sendmail mule-util vc-git diff-mode
easy-mmode vc-dispatcher fish-mode cus-edit pp cus-start cus-load
wid-edit compile comint ansi-color ring find-func autoload radix-tree
lisp-mnt mm-archive message dired dired-loaddefs rfc822 mml mml-sec epa
derived gnus-util rmail rmail-loaddefs text-property-search time-date
mailabbrev gmm-utils mailheader mm-decode mm-bodies mm-encode mail-
utils
gnutls network-stream url-http mail-parse rfc2231 rfc2047 rfc2045
mm-util ietf-drums mail-prsvr url-gw nsm rmc puny url-cache url-auth
epg
rfc6068 epg-config finder-inf package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap url-handlers url-parse auth-source eieio eieio-core
eieio-loaddefs password-cache json map url-vars comp comp-cstr warnings
subr-x rx cl-seq cl-macs cl-extra help-mode seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 320362 12926)
 (symbols 48 17171 1)
 (strings 32 94792 3943)
 (string-bytes 1 2484930)
 (vectors 16 30341)
 (vector-slots 8 526241 44385)
 (floats 8 62 308)
 (intervals 56 511 0)
 (buffers 992 17))






             reply	other threads:[~2022-01-22 17:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-22 17:20 Frédéric Giquel via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-01-24  9:31 ` bug#53451: 28.0.91; Different behavior with native-compilation Andrea Corallo
2022-01-24 19:04   ` Frédéric Giquel via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-08 21:22     ` Frédéric Giquel via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-09  9:51       ` Andrea Corallo
2022-02-09 17:16         ` Andrea Corallo
2022-02-09 20:35           ` Frédéric Giquel via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-09 21:05             ` Andrea Corallo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=548b819e4f578de0f98a3e59a873514be560e451.camel@laposte.net \
    --to=bug-gnu-emacs@gnu.org \
    --cc=53451@debbugs.gnu.org \
    --cc=frederic.giquel@laposte.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).