Currently I'm using:

emacsclient +12:34 some_file.txt

This works for the line but not for the column, since tabs are expanded when calculating the offset.

Is there a way to open a file at the correct column based on the character offset instead of white space width?


Posting own answer which works but is a little clumsy.

emacsclient --eval \
    "(progn (find-file \\"some_file.txt\\") (goto-line 12) (forward-char 34) (recenter))" \
    --no-wait \

Then have a shell-script since it seems there is no way to pass command line args to alterante-editor.
Update, emacs 26 will support this.


exec emacs --eval "$@"
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.