spacemacs icon indicating copy to clipboard operation
spacemacs copied to clipboard

"dotspacemacs-line-numbers t" does not work

Open douglas-raillard-arm opened this issue 3 years ago • 7 comments

Description :octocat:

"dotspacemacs-line-numbers t" does not work. Setting it to any value does not bring line numbers. I checked with the .spacemacs.template file to avoid any custom conf issue.

Reproduction guide :beetle:

  • Start Emacs
  • install the template as .spacemacs
  • modify it so that you get "dotspacemacs-line-numbers t"

Observed behaviour: :eyes: :broken_heart: No line numbers displayed when opening a text file.

Expected behaviour: :heart: :smile: Line numbers displayed when opening a text file.

System Info :computer:

  • OS: gnu/linux
  • Emacs: 26.3
  • Spacemacs: 0.300.0
  • Spacemacs branch: develop (rev. fa514c6ac)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(emacs-lisp helm multiple-cursors treemacs)
  • System configuration features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LIBSYSTEMD LCMS2

douglas-raillard-arm avatar Jul 26 '21 10:07 douglas-raillard-arm

Seems to actually work for most file. The one for which it did not work was without any extension, so maybe it was not recognized as code by emacs

douglas-raillard-arm avatar Jul 26 '21 11:07 douglas-raillard-arm

Please provide more details on how to reproduce the issue.

lebensterben avatar Aug 23 '21 23:08 lebensterben

Hi @lebensterben , sorry for the delay. To reproduce:

  1. load my emacs config (attached)
  2. echo 42 > foo
  3. emacs foo # No line number displayed by default
  4. mv foo foo.rs
  5. emacs foo.rs # After adding a recognized extension, emacs displays line numbers

.spacemacs conf: spacemacs.txt

douglas-raillard-arm avatar Sep 27 '21 11:09 douglas-raillard-arm

Hi @douglas-raillard-arm , I believe what you experienced is the expected behavior.

When a file without an extension is opened, it is by default in the Fundamental mode. When the dotspacemacs-line-numbers is toggled in your ~/.spacemacs, it automatically toggles line numbers in all prog-mode and text-mode buffers, but not a fundamental-mode buffer.

You can change the default mode of a no-extension file to the text-mode if you want. Check here for more details.

Check the Documentations for more details about dotspacemacs-line-numbers:

Line numbers can be toggled on in all prog-mode and text-mode buffers by setting the dotspacemacs-line-numbers variable in your ~/.spacemacs to t.

swang251 avatar Nov 11 '21 18:11 swang251

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

github-actions[bot] avatar Nov 11 '22 18:11 github-actions[bot]

That makes sense, I'll try to fix my conf, thanks for the insights.

douglas-raillard-arm avatar Nov 15 '22 09:11 douglas-raillard-arm

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

github-actions[bot] avatar Dec 20 '23 10:12 github-actions[bot]