Unformatting LaTeX code with Emacs & AUCTeX [closed] - emacs

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Emacs + AUCTeX provides all sort of commands for formatting text, but I can't find a way to "unformat" a snippet of code (unless undoing the change right after having run a formatting command).
For example, suppose you have the following snippet with LaTeX formatting
foo \whatever{bar} quux
I'd like to remove the \whatever{} wrapper by selecting the relevant text, or by placing the cursor at its beginning/end, and using a key combination to get
foo bar quux

Related

emacs: control where emacs starts from ~/.emacs [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 days ago.
Improve this question
Running emacs 28 On win10:
I'd like to see code for ~/.emacs that makes emacs start in ~/ unless otherwise
directed from the command line.
For instance: If I start emacs by pressing the start menu, and then typing e m a c s
I want to be sure it starts in my home directory unless I type
e m a c s

MatLab, missing ->> in command line [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I use MATLAB R2012b, and for some reason occasionally when I put "bad stuff" in the command line, it executes, but then the --> arrow thing besides the $$f_x$$ symbol disappears and I can't do anything in the command line.
For instance if I write an if statement with nothing else, it erases that arrow thing.
That's because you're starting a loop. It's waiting for you to type the code to go within the loop, and it is terminated when you type end to end the loop. For example:
if(x==0)
y = y + 1;
end
When you see this it typically means that you did not finish a command yet. This most commonly occurs with statements like for or if.
Example:
if 1
Now you are inside the if statement, and not simply at the basic prompt. Therefore you will not see anything happen. This can be tested by continuing with:
1+1 %Normally outputs 2
Obviously nothing happens. You now have two choices. Either you realize that the if was there by mistake, and you cancel with CTRL+C. In this case you will not see any output. Of course you can also choose to finish the statement:
end

How do I minimize the use of same-hand keyboard fingering? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I have been trying to rid myself of the bad habit of key-chording in Emacs using only one hand. That is, for C-x I want to use my right pinky to hit the right-Ctrl and a left-hand finger to hit x. My question is how do I type efficiently in all caps? For example, when I type an environment variable such as RAILS_ENV=test it's very tedious to switch between left and right hands holding Shift every time the key falls on the opposite side of the keyboard. It would seem that this is an ideal case for using CapsLk, but I've long remapped that key to Ctrl because of the scarcity of its use and potential for accidental triggering.
I found this related question but it deals more with enforcing the habit than the question of how to actually type efficiently using the opposite hand to hit modifier keys.
As the question appears to be targeted towards bash command lines, you can use Control-A Meta-U to capitalize the first word of the line, useful for typing
env_var=value some_command ...
prior to converting it to
ENV_VAR=value some_command ...
Instead of making CAPS LOCK an additional CTRL, you could simply swap CAPS LOCK and LEFT CTRL.

How to configure/customize emacs? (key bindings, windows nav bar, etc) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
OLD QUESTION: How To Kill Characters Before The Cursor in Emacs?
OLD COMMENTS: According to a reference, it should simply be the delete key, but the delete key as well as the C-d commands kill the character AFTER the cursor
EDITTED
I am running emacs via cli. Which file do I edit and how do I change key bindings for commands?
As for the nav/window bar, I was reading a link and here is a code snippet in it:
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "
What does the last line mean? How do I even begin to read it? What language is it written in?
I appreciate all responses!
The default configuration file for emacs is the ~/.emacs file. This file will be loaded and executed everytime you start emacs. You can check which file is used by running M-x describe-variable RET user-init-file. If the file does not exist you can simply create it.
To bind commands to keys you can use the global-set-key function. The following will bind control+h to the "backspace" command (put the following in the init file).
(global-set-key (kbd “C-h”) ‘backward-delete-char)
As for you code snippet it is not related to emacs, but seems to have to do with GNU Screen. See http://www.debian-administration.org/articles/560
Backspace? I.e. the key above Return. There's more detailed advice here:
http://www.emacswiki.org/emacs/BackspaceKey

How to customize emacs auc-tex function Tex-command-list? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm trying to use the latex package `nomencl' which allows one to easily create a Nomenclature section in an article. So far so good.
I'm using emacs with AucTeX and I added the nomenclature compile option to the emacs Tex-Command-list by editing my .emacs file, adding:
;;nomenclature for latex
(eval-after-load "tex"
'(add-to-list 'TeX-command-list
'("Nomenclature" "makeindex %s.nlo -s nomencl.ist -o %s.nls" TeX-run-command nil t :help "Create nomenclature file")))
to it, this works: when I press C-c C-c (the shortcut for TeX-command-list I can use the Nomenclature command and the appropriate file is generated. I am unhappy though, for the following reason:
When I run BibTex (using Tex-Command-list), and then press C-c C-c again, emacs offers to run LaTeX, as appropriate, and if references have changed, it will offer LaTeX again, finally, it will offer View, once the .log doesn't report references have changed.
However When I run Nomenclature, the next command offered by Tex-command-list is View, which is alway inappropriate, since one needs to compile again after recreating the nomenclature file.
How can I tell emacs to give LaTeX as the next TeX-command-list command after running Nomenclature (same behavior as BibTeX)?
The AUCTeX function TeX-command-query is responsible for that. Right now, it simply checks for the existence of .bbl, .pdf, .ps, .dvi files and guesses the next step. If Nomenclature also generates some new files that, when present determine that TeX must be run again, it should be easy to add that feature.
Update: The answer on TeX SE is even better. :-)