My emacs version is GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-18 on MARVIN.
If I start emacs with '-q' option, I'll use the built-in org-mode 7.9.3f, and for following text
* Level 1
** Level 2
Some text for level2.
if I press M-RET at the end of the last line, I'll get a new heading in a new line.
* Level 1
** Level 2
Some text for level2.
**
However, in org mode 8.0.3(from ELPA), it makes the last line a new heading instead of inserting a new one.
* Level 1
** Level 2
** Some text for level2.
It's very intrusive and I'm wondering whether it's a bug or something. Could you tell me how to get M-RET behave like version 7.9.3f?
This is known new behavior which was introduced just recently and a possible bug, see
http://thread.gmane.org/gmane.emacs.orgmode/72172
http://thread.gmane.org/gmane.emacs.orgmode/72399
Related
Similar to this question except I want this as ideally a per-document setting or mode line. The ideal would be something like:
#+STARTUP: showlevels 3
Or if needed as a mode line:
# -*- org-showlevels: 3 -*-
And be equivalent to running C-3 S-tab when loading the file.
This does not appear to be directly supported in the initial visibility settings in the org-mode manual: https://orgmode.org/manual/Initial-visibility.html
New startup options for this are available in Emacs Org mode master since today.
The implementation is slightly different than your suggestion Elliott, since startup keywords cannot have argument (to the best of my knowledge). But the following will now work if you are using Org mode master:
#+STARTUP: show3levels
(3 can be changed to any of 2,3,4,5)
You can replicate what C-3 S-tab does with the org-content command:
# -*- eval:(org-content 3) -*-
From the docstring:
Show all headlines in the buffer, like a table of contents. With
numerical argument N, show content up to level N.
I am using emacs 24.5.1 and do not understand how to shift outlines up/down in org-mode
Let's say I have the following list:
* Title 1
** section a
** section b
** section c
I would like to swap sections b and c. According to the manual this is achieved by using the keys M-up/down for items or M-S-up/down for subtree items. If I try M-down on "section b" for instance, I expect the following:
* Title 1
** section a
** section c
** section b
But instead I get:
* Title 1
** section a
** section c
The command deletes the current line ! It seems to work only with tickbox lists...
I checked my key-bindings with C-h k and they are calling the right commands. They are also displayed properly in the org-mode menu. I also tried to execute the commands
(org-shiftmetadown)
(org-move-subtree-down)
(org-move-item-down)
directly in the minibuffer but always get the same behaviour (line is deleted). I thought about a conflict with cua-mode but disabling it does not help.
I am missing something ? How to move outline items up/dow in org-mode ?
It shows M-up is bounded to command org-metaup in my case. And it moves subtree or table row up depending the context. Could you please try the command org-metaup and see if it works?
I'm using the most recent version of Emacs on Windows 7. Let's say I type the following code in my .emacs:
;test|
| means the cursor position. Now if I press Enter, the text will be moved to the right and it will look like:
;test
How to disable this feature?
This is done in accordance with the Emacs Lisp style guide:
Comments that start with a single semicolon, ';', should all be aligned to the same column on the right of the source code. Such comments usually explain how the code on that line does its job. For example:
(setq base-version-list ; There was a base
(assoc (substring fn 0 start-vn) ; version to which
file-version-assoc-list)) ; this looks like
; a subversion.
If you use two or more semicolons you will see other behaviour:
Comments that start with two semicolons, ';;', should be aligned to the same level of indentation as the code. Such comments usually describe the purpose of the following lines or the state of the program at that point.
...
Comments that start with three semicolons, ';;;', should start at the left margin. We use them for comments which should be considered a “heading” by Outline minor mode.
...
Comments that start with four semicolons, ';;;;', should be aligned to the left margin and are used for headings of major sections of a program.
The automatic indentation is done by electric-indent-mode. If you wish to disable it entirely, put something like
(electric-indent-mode -1)
in your init file. You could also disable it for specific modes using something like
(electric-indent-local-mode -1)
in the appropriate init hooks.
Simply using two semi-colons as suggested by the style guide should also prevent the behaviour, which will let you benefit from electric-indent-mode on other code.
Hi i have the following issue with my emacs:
When typing a long line, sometimes, when I type a space at the end of a line the line automatically gets split into multiple lines.
e.g. Line I am typing emacs: 'This is my line 1. This is my line 2. This is my line 3'%space%
emacs automatically formats this to:
'This is my line 1. %emacs adds new line%
This is my line 2. %emacs adds new line%
This is my line 3 %space%
Please help me fix this annoyance :)
What you are seeing is a feature (grin). "Auto Fill" mode is a buffer-local minor mode in
which lines are broken automatically when they become too wide. "Minor mode" means it is additional functionality which is associated with a buffer.
If you look at the emacs mode line, it will say "Auto Fill" if this is active. To turn it off for that buffer, M-x auto-fill-mode.
If for a particular major mode you would always like it on, you can turn it on by modifying the hook for that. For example, if every time you edit a text file, you would like auto-fill on, you can customize the variable text-mode-hook to turn it on.
M-x customize-variable
when prompted for the variable, say:text-mode-hook. You can use the same mechanism to turn it on (or off) for other modes.
Turn off auto-fill-mode: Put this in your init file, or do it for a particular mode on the mode hook: (auto-fill-mode).
I have a file open called test.scss, and when I press RET on a line, emacs will add 2 spaces to the current line and 4 extra spaces to the next line.
I've highlighted what the file looks like with whitespace-mode.
before pressing RET
after pressing RET
You can see that the .my-element row was auto-indented by 2 spaces, and the new line is indented by 4 spaces too many.
I want the output to look like this instead
desired output
What can I do to make emacs produce my desired output?
Here is the output of describe-mode:
Enabled minor modes: Auto-Composition Auto-Compression Auto-Encryption
Electric-Indent File-Name-Shadow Font-Lock Global-Eldoc
Global-Font-Lock Line-Number Menu-Bar Tooltip Whitespace
(Information about these minor modes follows the major mode info.)
SCSS mode defined in `css-mode.el':
Major mode to edit "Sassy CSS" files.
In addition to any hooks its parent mode `css-mode' might have run,
this mode runs the hook `scss-mode-hook', as the final step
during initialization.
Although in this case I'm in scss-mode, I see similar behavior with most of the other modes I use, such as ruby-mode, sgml-mode, js.el mode and others. I'd like to make the behavior match the desired output shown above.
Each mode can handle indentation in its own way, and you may have to look for mode-specific settings to get two-space indentation working everywhere.
For starters, you can set css-indent-offset, which should cover css-mode and scss-mode:
(setq css-indent-offset 2)
You can set the basic indenting of many other modes similarly. ruby-mode seems to use ruby-indent-level, sgml-mode uses sgml-basic-offset, and js-mode uses js-indent-level.