Skip to main content
7 votes

How to Organize Comments into a Grid on Emacs?

align-regexp is the interactive function that you can use. Here's how you do it Select the region that you want to apply the indent M-x align-regexp which will prompt you for a regexp Enter // and ...
shyam's user avatar
  • 170
5 votes
Accepted

What are the main differences between latexmk and C-c C-a from Auctex?

C-c C-a uses AuCTeX's heuristics for deciding which list of commands to run. The usual case is to use the function TeX-command-default which is defined in tex-buf.el. So no, latexmk is not used. ...
Andrew Swann's user avatar
  • 3,566
4 votes
Accepted

Repeat actions in slow motion, for presentation purposes

Actually, I've just discovered the tag screencast (I added it to my question as well), which contained 2 questions: how to repeat actions in slow motion, which contains a link to package-demo how to ...
Florent Georges's user avatar
4 votes
Accepted

After updating my packages, two packages are not working anymore. How to solve this? Downgrading it? Bug reporting to maintainers? Fixing?

byte-code: Symbol’s function definition is void: compat--inhibit-prefixed If this is the error, then running M-x pacakge-recompile compat RET (if you are on Emacs 29) or M-x package-reinstall compat ...
Philip K.'s user avatar
  • 146
3 votes

Compile and run C-Programs in Emacs

Since you are using Org-mode and all you want (according to your post), is to evaluate small C code examples, I'd use ob-C and just evaluate everything using org-babel. This is not an answer on how ...
Daniel's user avatar
  • 3,653
3 votes
Accepted

How can I automate the editing of a source file, switching to other window, recall and exec. previous shell command and switch back to starting buffer

Yes, you can record a macro. F3 to start recording, then F4 when you're finished. Then F4 will replay the macro. Of course, this macro will go away if you record another macro, or if you exit emacs. ...
db48x's user avatar
  • 18.3k
3 votes
Accepted

Automating magit

One way is to write a command that wraps those actions: (defun anw/magit-commit-file-wip () (interactive) (magit-with-toplevel (let ((file (or (magit-current-file) (user-...
Kyle Meyer's user avatar
  • 7,094
2 votes
Accepted

Highlight text equivalent to the marked region and search and replace on the fly

I'm mostly trying to address the "automatically highlight text matching region" part in this answer : I don't know if it exists, but it seemed pretty straightforward to write an initial rudimentary ...
YoungFrog's user avatar
  • 3,526
2 votes

How to Organize Comments into a Grid on Emacs?

Language modes usually work with the comment-* functions innewcomment.el to allow such things (and more). E.g. assume that the above is a snippet of Javascript code and that the buffer is indeed in ...
NickD's user avatar
  • 30.8k
1 vote
Accepted

Auto-answer "really edit the buffer"

If you trigger the stacktrace you'll see that the function that checks file modification and then asks you is userlock--ask-user-about-supersession-threat. The function is very short, just 4 lines. So ...
Hi-Angel's user avatar
  • 798
1 vote

After updating my packages, two packages are not working anymore. How to solve this? Downgrading it? Bug reporting to maintainers? Fixing?

I decided to try re-compiling everything, all packages. Thus, I typed M-: to eval an expression and then inserted: (byte-recompile-directory package-user-dir nil 'force). After re-starting Emacs, both ...
Pedro Delfino's user avatar
1 vote

How can I automate the editing of a source file, switching to other window, recall and exec. previous shell command and switch back to starting buffer

One-click operation in current file, and no need to switch, switch, switch: (defun bundle-exec-rails-runner-current-file () (interactive) (let ((file-name buffer-file-name)) (when file-name ...
SunDawning's user avatar
1 vote

Automating magit

You can use the magit-status buffer. Run M-x magit-status, and a buffer will open showing the status of the project. You can move point to the source file and press s to stage it -- or even move to ...
zck's user avatar
  • 9,112
1 vote
Accepted

How to paste to another app from a shell script

I'd expect that the problem will disappear if you run the process in the background with (shell-command "hunh.sh&")
Stefan's user avatar
  • 26.5k
1 vote

What's the name of the auto indent code?

As said in comments, the behaviour of tab changes often depending on the mode you are using. I suggest you read more how the indentation works in Emacs in the wiki Main variables are: c-basic-...
marcanuy's user avatar
  • 818
1 vote

Highlight text equivalent to the marked region and search and replace on the fly

Isearch+ provides these features. Optional restriction of search to the active region, controlled by option isearchp-restrict-to-region-flag. Deactivation of the active region is controlled by option ...
Drew's user avatar
  • 78k

Only top scored, non community-wiki answers of a minimum length are eligible