Find .emacs file on Windows bash - emacs

I would like to change few things in my .emacs configuration file. The problem is that I cannot find it.
Does anyone have any idea where it could be on Windows bash?
Is it even called .emacs on windows Bash? Do I have to create it myself?
Thanks in advance

After some researches, here is what I understood :
As Varro said in the commnent, .emacs file will not be created by default, since it will only contain cuztomizations you want. So you have to create it yourself. By the way, apparently it is a good practice to call it init.el. To find where to create it, type env in the terminal and look for the HOME variable. This value will show you the path considered as the home directory, where emacs created .emacs.d/ folder. You must create init.el file in this folder, and emacs will load it automatically.
This is not related to the question but it might help you :
I needed this file in order to change the cursor on emacs. At first, I thought that emacs was not loading the file correctly, because the cursor was not changing. I made some tests, and I was able to change background color, so it was not the problem. But, in fact, you can NOT change the cursor, since it is defined by the terminal itself, not emacs.

Related

Emacs changes buffer when autosaving other window using tramp

I have two windows open in my Emacs session. Both are remote files opened using tramp. I make a change in window A and switch to window B without saving file in window A. When Emacs decides to autosave, the buffer displayed in window B is switched to the buffer from window A that was autosaved. This only happens when using tramp, not local files.
Another thing I have noticed is, that if I have the same file opened in two windows, because I need to reference something at another position in the file and save the file, the buffer I'm in sometimes jumps to the position that the point is in the other window, so I have to move around to get back to the place where I was editing.
Is this a bug or is there some setting that I have(n't) set? I suspect it is something related to refreshing the windows when saving.
i'm using Emacs 24.3 on OSX, but I have seen this using Linux too.
Sounds very much like a bug, to me. Can you reproduce this starting from emacs -Q (i.e., with no init file)?
If so, use M-x report-emacs-bug to give Emacs Dev the recipe. If not, bisect your init file recursively until you locate the culprit code. Then ask for more help here, if it's not clear how to fix the problem.

Is there a guide to changing emacs colorscheme?

In the terminal when I try to use emacs the colors are not good, most of the times I can't properly see the text.
In vim I know I can change the colorscheme with :colo <colorscheme_name>
Is there something similar in emacs?
A tutorial on the proper steps to change the colors would be appreciated.
I'm not sure of tutorial, but off top of my head, what you probably will want to do is: M-x customize then navigate to the section called "Faces" - you'll get a bunch of settings related to the color scheme and other font-related settings.
But Emacs has tons of customizations related to how text is displayed. I'm using this http://www.nongnu.org/color-theme/ but you can find a lot of info here: http://emacswiki.org/emacs/ColorTheme (emacswiki is basically the resource to be consulted first when you have any Emacs-related problem).
Obviously, you can do that in your .emacs file by adding different settings, but I'd suggest to use what's generated by the changed settings first, see how it works and then add on top of that yourself (once you modify settings from the customization buffer, it will save the changes into .emacs file - you can then open it and see what exactly did it do).
M-x load-theme
then use arrows to select a theme.
Adding here for easy reference ( #deong shared this answer via comment under the accepted answer).

Removing DocView Welcome Page on Emacs

Emacs 23 can view PDF files inside the editor which is great. However it also shows a welcome page, for every PDF page, like this:
How can I remove this welcome page? I understand Emacs is doing some processing for the PDF page, and it probably does not want the user to try to open the file over and over again while it is doing that, but I'd prefer and hourglass instead of a whole page.
I tried setting doc-view-conversion-refresh-interval to nil BTW, it didnt work.
I am on GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4).
Thanks,
WRT your answer, it sounds like you either edited the original file, or made a replacement copy of that entire library.
The first way will be lost when you update Emacs. The second way means you won't get any improvements to that library when you update Emacs. Neither is a very good option.
Instead you can tell Emacs that if and when it loads the original library, it should re-define that one function at that time.
This minimises the potential problems associated with upgrades, and does not require you to load the library unconditionally in your .emacs (which would increase your start-up time unnecessarily for sessions where you didn't load any PDFs).
(eval-after-load 'doc-view
'(defun doc-view-buffer-message ()
;; your definition here
))
I think you need to press C-c C-c
I found doc-view.el source for Emacs 23, and I removed the message from doc-view-buffer-message function. So now when PDF is loaded an empty page is shown which is less confusing, welcome page made it look like the PDF was loaded.
After the changes I did byte-compile-file on the el file, and at the end of my .emacs I load this overriding the original doc-view.

IntelliJ Macro menu

I've just started playing with macros in IntelliJ. I recorded several then played back until I decided to add keymap shortcuts to my macros. I went to Settings and pressed Alt+C to add a new child map because I couldn't edit the parent. Since then the macros are no longer accessible from the Tools menu, not to mention that the shortcuts don't work. I tried removing the shortcuts from the keymap but even though I press Alt+R or Alt+L, it still does not revert them back. And TAB has stopped working .. when writing sout +TAB ..nothing happens anymore... HELP
Sorted! sout+TAB is part of live templates..
If you open the IDE Settings window, you will see Live Templates.. Under output you should find sout(Prints a string to System.out).. if not, click Add and then type sout for the Abbreviation section, type in a description and then for the template text put System.out.println("$END$");
I use the Default keymap in IntelliJ now...
Thought this might help someone...
You can try to use the default keymap. When you modify the default keymap, a copy is created with your settings.
If that is not working, you can try to quit IntelliJ and to delete this file:
/.IntelliJIdea90/config/options/macros.xml
and check also for the folder
/.IntelliJIdea90/config/keymaps
To find the location of the config folder you should look for the file : idea.properties in the folder where the main executable for idea is.
Look for the line:
# path to IDEA config folder. Make sure you're using forward slashes
idea.config.path=${idea.home}/.IntelliJIdea90/config
And this is the location of the config. folder.
Restart IntelliJ.
Take a copy of any file you are going to delete!

Icons in dired mode for Emacs

I would like to use the dired mode of emacs as my file browser. I am very much addicted to see an icon for file/folder rather that to see the extension and color. The icons give me a very quick visual feedback. I have searched the web for display of icons in dired but found none. So I wonder whether it is even possible to do this and if yes how?
To put my question clearly
How can I display icons for files and folders in dired mode of Emacs?
all-the-icons-dired is a more current solution. Another option that looks quite nice is to use treemacs-icons-dired
I just switched to treemacs-icons-dired and recommend it. Simply install the package and add a mode hook like:
(add-hook 'dired-mode-hook 'treemacs-icons-dired-mode)
If you are using Windows, you can try dired-dispicon.el.
Get the relevant files from here.
See http://wiki.gohome.org/teranisi/?EmacsOnWindows for what it looks like. Note that you will probably need a version of emacs that supports images (e.g. for Windows you could try EmacsW32).
Use the dired-icon extension, which works for GTK (on Linux).
Disclaimer: I'm the author of the extension.