Spacemacs - split & automatic buffer selection - emacs

I would like to press SPC w / or SPC w s and Spacemacs should select the new buffer and let me search for a file, simulating SPC f f. Does anybody know how to do it?

Related

What function is C-c C-v bound to in org-mode?

I am new to Emacs working through the Org-mode beginning at the basics tutorial.
The "Working with todo items" part of the tutorial uses a C-c C-v binding.
But C-c C-v is not working on my Spacemacs. And it is not listed in describe-bindings:
SPC h d b
pattern: C-c C-v
"Prefix Command" is a keyboard macro.
Macro: P r e f i x SPC C o 2*m a n d
Similar results in emacs mode:
C-z
C-h b
pattern: C-c C-v
"Prefix Command" is a keyboard macro.
Macro: P r e f i x SPC C o 2*m a n d
C-c C-v doesn't work in Spacemacs mode nor Emacs mode.
What function is C-c C-v supposed to be bound to?
Is "C-c C-v" deprecated or a typo?
Is there an on-line resource that lists all the default Emacs key bindings?
I am running Emacs 25.2.1 with Spacemacs on Linux.
It used to be bound to org-show-todo-tree, but the binding was changed back in 2010: C-c C-v is now a prefix key for various org-babel functions.
You can call org-show-todo-tree with M-x org-show-todo-tree RET or you can install your own binding to org-show-todo-tree (the function is still around); or you can use C-c / t which shows a sparse tree of TODO items in the current buffer. In this last case, C-c / is bound to org-sparse-tree which gives you a bunch of options: t selects the TODO case, but you might want to experiment with the other options.
EDIT: BTW, I found all this using some git commands in my clone of the org-mode git repo. I used
git log --oneline --grep='C-c C-v'
to find commits that mention that key combo. The actual commit was
commit 3d8b6de2ad00220e164f226fb0dde5ada831d21b
Author: Carsten Dominik
Date: Wed May 12 08:04:27 2010 +0200
Free up the `C-c C-v' key for Org Babel
TODO sparse trees are also accessible with `C-c / t'.
Isn't git wonderful?

org-mode: how to input command

Just try org-mode and global todo list.
I tried the command: "C-c a t" as press Ctrl+c, and immediate press a, and then t. But there is error.
When C-c a, there is a buffer, asking me to:
select a attachment command (many options, but no 't').
Note that 'C-c a' and 'C-c C-a' are different keystrokes: C-c a t
means press c while holding Control down, then release the Control key and then press a and t. In particular, the attachment menu that you are getting is because you are invoking the org-attach command which is bound to C-c C-a.

Emacs, How can I display only current task and hide others in org-mode?

Org-mode.
I have a big tasks tree and I want to select only 1 in buffer (write notes just for it) and hide others while editing.
How can I do this?
task-1
subtask-1.1
subtask-1.2
task-2
subtask2.1
...
...
For example I want to display for me only:
subtask-1.2
(notes for this subtask)
Use narrow-to-defun or org-narrow-to-subtree command with point in task. (widen to move back to whole buffer content).
Default shortcuts:
C-x n s # org-narrow-to-subtree (bound in org-mode)
C-x n d # narrow-to-defun
C-x n w # widen
Manual
You also have org-tree-to-indirect-buffer, or C-c C-x b, which will create a new buffer with only this subtree, and reflect any change in one buffer into the other.

emacs isearch lazy highlight for whole buffer

the default behavior of isearch was highlighting the world that matched in current windows.
how can i change that behavior, let it highlighting the world that matched in the whole current buffer.
Perhaps you are looking for the highlight-* commands, to keep things highlighted throughout the buffer whilst you perform other actions?
M-shC-h lists:
Global Bindings Starting With M-s h:
key binding
--- -------
M-s h l highlight-lines-matching-regexp
M-s h p highlight-phrase
M-s h r highlight-regexp
M-s h u unhighlight-regexp
You can also use M-shr during an isearch to invoke highlighting for the current search term.
Tangentially, you can likewise invoke occur on the current search term with M-so
Use C-hC-hb during isearch to see all of the isearch bindings.

Running a macro till the end of text file in Emacs

I have a text file with some sample content as shown here:
Sno = 1p
Sno = 2p
Sno = 3p
What i want is to remove the p from each of the columns.
With this intention i write a macro:
M-x //go to buffer
C-x (//start the macro
C-s = // search for equalto sign
RET C-f C-f // reach to te alphabet 'p'
DEL // Delete
C-n C-x )//go to new line and Close the macro definition
C-x e
Pressing e twice will remove p, but in case i want to do the same stuff till the end of file, how can i do it i can't keep pressing e if i have 20000 such lines. What should be done??
Please donot suggest regex, as this is a sample example, not the actual case.
Please donot suggest any elisp, i am comfortable with remembering shortcutf for emacs.
M-0 C-x e to repeat last macro until an error happens (after the final line, either C-s = or C-n will be an error).
You may hear an annoying beep.
You can use the "apply-macro-to-region-lines" function to apply the last defined keyboard macro to all lines in a region. So, the steps you follow are:
Define your keyboard macro (which you had already done but I've added another C-f to the 3rd line):
C-x (
C-s =
RET C-f C-f C-f
DEL
C-n C-x )
Select the whole buffer with the "mark-whole-buffer" command (by default, it's bound to C-x h). Alternatively, if you just want to change a certain number of lines, just select the lines you want changed.
Run the "apply-macro-to-region-lines" function (by default, it's bound to C-x C-k r).
All the p's will be removed.
I usually give a name to the macro after defining it with M-x name-last-kbd-macro, so I can call it with M-x conveniently. And then I call it with a numeric prefix. E.g.
M-1000 M-x macroname
The files I work on usually don't have 1000 places where the macro can act, so 1000 is large enough and it will stop automatically at the end of the file. You can use, say, 1000000 as a prefix if you have larger files, and if it's still not enough then you can call it again with 1000000 as prefix.
you may try: M-20000 C-x e so as to do the stuff for 20000 times, after you define the macro.