Permanently display line numbers in emacs
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I am asking this after having read this post:
How do I display line numbers in emacs (not in the mode line)?
I have tried using:M-x linum-mode
and display-line-numbers-mode
After closing emacs and reopening, they are gone. Is there not a way to have emacs permanently display the line numbers?
line-numbers
New contributor
add a comment |Â
up vote
1
down vote
favorite
I am asking this after having read this post:
How do I display line numbers in emacs (not in the mode line)?
I have tried using:M-x linum-mode
and display-line-numbers-mode
After closing emacs and reopening, they are gone. Is there not a way to have emacs permanently display the line numbers?
line-numbers
New contributor
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am asking this after having read this post:
How do I display line numbers in emacs (not in the mode line)?
I have tried using:M-x linum-mode
and display-line-numbers-mode
After closing emacs and reopening, they are gone. Is there not a way to have emacs permanently display the line numbers?
line-numbers
New contributor
I am asking this after having read this post:
How do I display line numbers in emacs (not in the mode line)?
I have tried using:M-x linum-mode
and display-line-numbers-mode
After closing emacs and reopening, they are gone. Is there not a way to have emacs permanently display the line numbers?
line-numbers
line-numbers
New contributor
New contributor
New contributor
asked 1 hour ago
leeym
63
63
New contributor
New contributor
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
In order for your changes to persist, you need to add them to your init file. If you've used any customize functionality, it probably generated one for you, and it's saved in ~/.emacs
. If that isn't the case, you're better off putting it in ~/.emacs.d/init.el
.
In order to have line numbers in all buffers and have them persistently, you can put
(global-display-line-numbers-mode)
into your init file.
Both of those files are empty for me. And adding that line did nothing in both cases.
â leeym
51 mins ago
You either have to evaluate contents of your new init file to see the changes right away, or restart Emacs. Also, if you have both files,~/.emacs
will take precedence if I recall correctly, so make sure you have only one of these files.
â DoMiNeLa10â¦
25 mins ago
Thank you for your continued help. I restarted everything. I am putting that line in an empty ~/.emacs file. And getting this error: Symbol's function definition is void: global-display-line-numbers-mode
â leeym
21 mins ago
add a comment |Â
up vote
0
down vote
Menu
Options
>Show/Hide
>Line Numbers for All Lines
>Global Line Numbers Mode
Menu
Options
>Save Options
Menus are your friends. They can be a good way to discover Emacs features.
You can also alternatively use Customize to set the equivalent option directly: M-x customize-option global-display-line-numbers-mode
.
I only have a 'Line Numbers' completion (I do not see a 'Line Numbers for All Lines') under 'Show/Hide' and choosing that one simply toggles line number mode.
â leeym
10 mins ago
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
In order for your changes to persist, you need to add them to your init file. If you've used any customize functionality, it probably generated one for you, and it's saved in ~/.emacs
. If that isn't the case, you're better off putting it in ~/.emacs.d/init.el
.
In order to have line numbers in all buffers and have them persistently, you can put
(global-display-line-numbers-mode)
into your init file.
Both of those files are empty for me. And adding that line did nothing in both cases.
â leeym
51 mins ago
You either have to evaluate contents of your new init file to see the changes right away, or restart Emacs. Also, if you have both files,~/.emacs
will take precedence if I recall correctly, so make sure you have only one of these files.
â DoMiNeLa10â¦
25 mins ago
Thank you for your continued help. I restarted everything. I am putting that line in an empty ~/.emacs file. And getting this error: Symbol's function definition is void: global-display-line-numbers-mode
â leeym
21 mins ago
add a comment |Â
up vote
3
down vote
In order for your changes to persist, you need to add them to your init file. If you've used any customize functionality, it probably generated one for you, and it's saved in ~/.emacs
. If that isn't the case, you're better off putting it in ~/.emacs.d/init.el
.
In order to have line numbers in all buffers and have them persistently, you can put
(global-display-line-numbers-mode)
into your init file.
Both of those files are empty for me. And adding that line did nothing in both cases.
â leeym
51 mins ago
You either have to evaluate contents of your new init file to see the changes right away, or restart Emacs. Also, if you have both files,~/.emacs
will take precedence if I recall correctly, so make sure you have only one of these files.
â DoMiNeLa10â¦
25 mins ago
Thank you for your continued help. I restarted everything. I am putting that line in an empty ~/.emacs file. And getting this error: Symbol's function definition is void: global-display-line-numbers-mode
â leeym
21 mins ago
add a comment |Â
up vote
3
down vote
up vote
3
down vote
In order for your changes to persist, you need to add them to your init file. If you've used any customize functionality, it probably generated one for you, and it's saved in ~/.emacs
. If that isn't the case, you're better off putting it in ~/.emacs.d/init.el
.
In order to have line numbers in all buffers and have them persistently, you can put
(global-display-line-numbers-mode)
into your init file.
In order for your changes to persist, you need to add them to your init file. If you've used any customize functionality, it probably generated one for you, and it's saved in ~/.emacs
. If that isn't the case, you're better off putting it in ~/.emacs.d/init.el
.
In order to have line numbers in all buffers and have them persistently, you can put
(global-display-line-numbers-mode)
into your init file.
answered 56 mins ago
DoMiNeLa10â¦
1,8041516
1,8041516
Both of those files are empty for me. And adding that line did nothing in both cases.
â leeym
51 mins ago
You either have to evaluate contents of your new init file to see the changes right away, or restart Emacs. Also, if you have both files,~/.emacs
will take precedence if I recall correctly, so make sure you have only one of these files.
â DoMiNeLa10â¦
25 mins ago
Thank you for your continued help. I restarted everything. I am putting that line in an empty ~/.emacs file. And getting this error: Symbol's function definition is void: global-display-line-numbers-mode
â leeym
21 mins ago
add a comment |Â
Both of those files are empty for me. And adding that line did nothing in both cases.
â leeym
51 mins ago
You either have to evaluate contents of your new init file to see the changes right away, or restart Emacs. Also, if you have both files,~/.emacs
will take precedence if I recall correctly, so make sure you have only one of these files.
â DoMiNeLa10â¦
25 mins ago
Thank you for your continued help. I restarted everything. I am putting that line in an empty ~/.emacs file. And getting this error: Symbol's function definition is void: global-display-line-numbers-mode
â leeym
21 mins ago
Both of those files are empty for me. And adding that line did nothing in both cases.
â leeym
51 mins ago
Both of those files are empty for me. And adding that line did nothing in both cases.
â leeym
51 mins ago
You either have to evaluate contents of your new init file to see the changes right away, or restart Emacs. Also, if you have both files,
~/.emacs
will take precedence if I recall correctly, so make sure you have only one of these files.â DoMiNeLa10â¦
25 mins ago
You either have to evaluate contents of your new init file to see the changes right away, or restart Emacs. Also, if you have both files,
~/.emacs
will take precedence if I recall correctly, so make sure you have only one of these files.â DoMiNeLa10â¦
25 mins ago
Thank you for your continued help. I restarted everything. I am putting that line in an empty ~/.emacs file. And getting this error: Symbol's function definition is void: global-display-line-numbers-mode
â leeym
21 mins ago
Thank you for your continued help. I restarted everything. I am putting that line in an empty ~/.emacs file. And getting this error: Symbol's function definition is void: global-display-line-numbers-mode
â leeym
21 mins ago
add a comment |Â
up vote
0
down vote
Menu
Options
>Show/Hide
>Line Numbers for All Lines
>Global Line Numbers Mode
Menu
Options
>Save Options
Menus are your friends. They can be a good way to discover Emacs features.
You can also alternatively use Customize to set the equivalent option directly: M-x customize-option global-display-line-numbers-mode
.
I only have a 'Line Numbers' completion (I do not see a 'Line Numbers for All Lines') under 'Show/Hide' and choosing that one simply toggles line number mode.
â leeym
10 mins ago
add a comment |Â
up vote
0
down vote
Menu
Options
>Show/Hide
>Line Numbers for All Lines
>Global Line Numbers Mode
Menu
Options
>Save Options
Menus are your friends. They can be a good way to discover Emacs features.
You can also alternatively use Customize to set the equivalent option directly: M-x customize-option global-display-line-numbers-mode
.
I only have a 'Line Numbers' completion (I do not see a 'Line Numbers for All Lines') under 'Show/Hide' and choosing that one simply toggles line number mode.
â leeym
10 mins ago
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Menu
Options
>Show/Hide
>Line Numbers for All Lines
>Global Line Numbers Mode
Menu
Options
>Save Options
Menus are your friends. They can be a good way to discover Emacs features.
You can also alternatively use Customize to set the equivalent option directly: M-x customize-option global-display-line-numbers-mode
.
Menu
Options
>Show/Hide
>Line Numbers for All Lines
>Global Line Numbers Mode
Menu
Options
>Save Options
Menus are your friends. They can be a good way to discover Emacs features.
You can also alternatively use Customize to set the equivalent option directly: M-x customize-option global-display-line-numbers-mode
.
answered 18 mins ago
Drew
45.7k460102
45.7k460102
I only have a 'Line Numbers' completion (I do not see a 'Line Numbers for All Lines') under 'Show/Hide' and choosing that one simply toggles line number mode.
â leeym
10 mins ago
add a comment |Â
I only have a 'Line Numbers' completion (I do not see a 'Line Numbers for All Lines') under 'Show/Hide' and choosing that one simply toggles line number mode.
â leeym
10 mins ago
I only have a 'Line Numbers' completion (I do not see a 'Line Numbers for All Lines') under 'Show/Hide' and choosing that one simply toggles line number mode.
â leeym
10 mins ago
I only have a 'Line Numbers' completion (I do not see a 'Line Numbers for All Lines') under 'Show/Hide' and choosing that one simply toggles line number mode.
â leeym
10 mins ago
add a comment |Â
leeym is a new contributor. Be nice, and check out our Code of Conduct.
leeym is a new contributor. Be nice, and check out our Code of Conduct.
leeym is a new contributor. Be nice, and check out our Code of Conduct.
leeym is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f45604%2fpermanently-display-line-numbers-in-emacs%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password