If I understood you correctly, you want follow-mode. It comes with emacs.
First, show the same buffer in two side by side windows (Ctl-x 3).
Then turn on follow-mode. Page up and down, and watch the magic.
Actually for org-table-copy-region it isn't necessary to mark the exact column width! Just mark the beginning of the column somewhere in a cell, then the end by going down the required number of rows and do C-c C-x M-w (for M-x o-t-c-r).
Then go to another cell, where you want to add the column and do C-c C-x C-y (for M-x org-table-paste-rectangle).
Just positioning at the column:
| Name |■Age |
| Tarzan | 40 |
| Jane | 39 |
and using M-S-right (org-table-insert-column) makes it:
| Name | | Age |
| Tarzan | | 40 |
| Jane | | 39 |
From the org-mode manual:
You can also achieve this using shell-command-on-region and the Unix utility cut.
Highlight the region.
Press C-u M-|, enter "cut -d= -f1", press RET. The prefix argument C-u tells shell-command-on-region to replace the region with results. If you don't want to (or can't) modify the current buffer, you can still use M-| (now without the prefix argument). In ...
I'm not sure whether the following will help in your case, but I hope it will be of some use (and it may be useful to others).
You can control the width of a column with cookies. The Tables/Column width and alignment section of the manual describes this as follows (and contains additional useful information):
Sometimes a single field or a few fields need ...
C-h f sort-columns:
sort-columns is an interactive autoloaded compiled Lisp function in
It is bound to menu-bar edit sort sort-columns.
(sort-columns REVERSE &optional BEG END)
Sort lines in region alphabetically by a certain range of columns.
For the purpose of this command, the region BEG...END includes
the entire line that point is in and ...
If the major mode works with font-lock-mode you can add a font-lock keyword in the major mode hook.
If you include newlines in the match the line is highlighted over the full width of the window (if that is what you actually want).
The following example does that for lines only consisting of a single percent character in LaTeX-mode buffers:
The two commands org-table-select-col and org-table-copy-col in the following lisp code allow the selection and the copying of the current table column. You can bind it to the key of your liking and/or insert it via easy-menu-define-key into org-tbl-menu.
(defun org-table-goto-col-beginning ()
"Go to beginning of current column and return `point'."
This is an answer to question 1 based on keyboard macros and calc.
Set calc to display in radix 16.
C-x * c d r 16 q
Record a suitable Macro
f3 f3 M-b C-x * w C-x * w C-e RET f4
Use the Macro
f4 f4 ...
Use e.g. search and replace to change the format of the list.
It feels as if the combination of the multiple-cursors and iy-go-to-char packages is to do exactly this kind of stuff. First of all, if you don't have those packages installed, they can be installed via MELPA.
Select all the lines you need and then do M-x mc/edit-lines (or the default binding C-S-c C-S-c).
Move all the cursors to the beginning of the lines (...
Emacs including the installed packages does itself some fancy matching between the two calls of M-:. With (match-data) and relatives you get the match data of the last search operation. That search-op was most certainly not yours.
If you want to get the end of your looking-at operation you should use the following command.
M-: RET (progn (looking-at "1\\. "...
You can do this with library Isearch+. As far as I know, this is the only library that offers this possibility.
Set or bind option isearchp-restrict-to-region-flag to non-nil. This means that when the region is active and you start isearching the search will be limited to the region.
Select the text between the upper-left and lower-right corners of the ...
You can use M-x align-regexp RET like RET.
Thereby like stands for the regexp identifying the part of the line that should be aligned.
Note that the variable align-to-tab-stop influences the alignment. If it is set to indent-tabs-mode tabs are inserted for alignment.
Set it to nil if you want spaces instead.
There is also the "expert mode" of align-regexp ...
It turns out that this is intentional and the fault of ert-batch-backtrace-right-margin which is set to 70 by default. Its docstring instructs you:
Use nil for no limit (caution: backtrace lines can be very long).
You don't really want to use rectangles for this, because the desired end result is not aligned as rectangles.
Either use a keyboard macro. e.g.:
<f3> - start recording
C-kC-ySPC=SPCC-y - transform the first line
<right><f4> - move to the next line, and stop recording
<f4><f4><f4> - replay for the remaining lines
This sounds like an X–Y problem, where someone has a detailed question that we could find an answer for but that seems to be leading them in the wrong direction. Since you haven’t said what you’re really trying to accomplish here, we can only guess.
My guess is that next-error (or other ways of navigating to error locations, such as clicking on them) is ...
If you are working on linux or Unix, you should have a sort command at the command line. Emacs has shell-command-on-region (on my machine, bound to M-|). Mark the region to sort, press M-|, and type sort -k 2. The sorted results appear in a buffer named *Shell Command Output*.
The -k option to sort tells what key (or field) to sort by.
the faces org-column and org-column-title had no font and size set. After setting it to a Monospace font, the columns align.
But I'm sure, it worked before without specifying. Don't know what changed.
As mentioned in my comment, you should look at the Capturing column view section of the Org manual for additional details, but doing
M-x org-insert-columns-dblock RET global RET
should give you a good beginning.
E.g. given this file:
* TODO bar
CLOCK: [2020-03-05 Thu 07:44]
if you position the cursor at the end ...
Q: How can I fix this?
A1: Now that you know that the environment variable makes the difference, see if you can get the intended effect without it. Searching the net for "LANG vs. LC_CTYPE", this question pops up: https://stackoverflow.com/questions/30479607/explain-the-effects-of-export-lang-lc-ctype-lc-all, which explains:
LC_CTYPE This variable ...
;; Here we create the concept of a 'tab-column.'
;; Set the tab column where you want by positioning the cursor and typeing M-+
;; Then move to another line and type M-=, and EMACS will insert enough spaces
;; to get you to the column. This is useful for alinging columns of text without tabs.
;; tab-column is a silly name; I need a better one.
Here is advice that should do what you want:
(defun goal-column-advice (&rest _args)
"Advice inserting spaces when needed to obey `goal-column'.
This advice is intended as :after advice for commands
`previous-line' and `next-line'. Normally, these commands will
attempt to obey any `goal-column' setting, but only on lines that
are long enough that ...
Sorry, as soon as I posted this, I found a response. tested on emacs 24.3.1.
Here's what you need to do:
You may have to install the appropriate package. You can then customize the face so that the color for vline is not too obtrusive.
You could also add the minor mode vline-mode to your major mode hooks like so (in your init.el):
There are many ways to do this.
1. Using built-in emacs stuff
Switch to a programming mode where aligning at the equal sign makes sense, e.g.: M-x python-mode
Place point right at the end of the line with the last =.
Call M-x align.
Call copy-rectangle-as-kill on the rectangle before the =.
Undo the alignment with C-x u
2. Using the versatile matches ...
"Point" means something in Emacs. It is the buffer position just before the text cursor - the position at which text is self-inserted. It is confusing to name a parameter POINT, since point typically does not correspond to whatever position might be passed to the function as argument. Better to call it POSITION or POS or POSN, following convention, or ...