Emacs EIN display file name without path - emacs

I'm very new to emacs and know next to nothing.
I would like to better use EIN but one thing which bugs me is that whenever I open a notebook, the modeline displays the entire path to the file which I've opened, followed by the filename.
enter image description here
This is way too long so as to make EIN very difficult to use, especially if the frame is split into 2 windows. I've tried setting all sorts of things in my init.el with the assistance of chatGPT but none of it works. Any suggestions would be greatly appreciated
I've tried setting all sorts of things in my init.el with the assistance of chatGPT but none of it works.

Related

Why is my text all black and not auto indenting in emacs

In one of my files, everything was working fine. Things were being color-coded and auto-intending perfectly for me. When I started a new file to work on some other code, I noticed that the text was black and nothing was being indented for me. I tried asking google a whole bunch of questions like, "how to turn on auto-indent for emacs" and "how to change the theme color." I tried following suggestions online, but none seem to work. Is there a way I could reset my settings to default?
When creating a name for the file I forgot to put .cpp at the end. Sorry for the waste of time and Thank you to everyone who tried to help me.

How to set position of the lsp-ui-doc in spacemacs

I'm new to spacemacs and am having trouble with LSP as I'm also unfamiliar with the elisp language. I have a few things set up, but I can't for the life of me figure out how to set the position of the lsp-ui-doc to be under/above the cursor. I referenced the lsp-ui module on Github and it says that this can be configured, but I don't see any examples and I also don't know where I'd set it in my .spacemacs file.
Also, if anyone has any clues as to how I could have figured this out by myself, please let me know as well. I'd rather not have to resort to stack overflow to answer these questions if I can help it.
Any help would be greatly appreciated
For reference, the lsp-ui-doc shows up in the top right when the cursor is over some artifact:
Ok, so I was able to find the answer in the issues page on the github repo.
Short answer for this is to put '(lsp-ui-doc-position 'at-point) in the .spacemacs file under the heading (custom-set-variables. It should look something like this:
(custom-set-variables
'(lsp-ui-doc-position 'at-point)
Possible values for lsp-ui-doc-position are: top, bottom, at-point.
Take note of the warning here:
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
The appropriate way to do it is by following the instructions linked in this issue:
https://github.com/emacs-lsp/lsp-ui/issues/508
For anyone unfamiliar with the Customization option page, The buttons didn't work for me when I clicked them (though I'm certain there's a way to set this in emacs to work with clicks) but I had to put the cursor on the buttons I wanted to click and press enter. This brought up a context menu that allowed me to set the varables when I pressed enter on `Value Menu'.
"Clicking" (placing cursor and pressing enter) State allowed me to save it.

Find .emacs file on Windows bash

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.

How to disable different face for empty lines in Emacs

In my Emacs, I have different face for empty lines with space/tab characters. How can I disable it?
This cause lot of distraction when trying to navigate through someone else's code which I cannot modify.
I would appreciate any pointers in this regard.

Mac OS X Emacs Does Not Highlight Comments Correctly

I'm pretty old school sometimes and I like working with Emacs in my terminal. (I work with IDEs all the time. But sometimes, when in the privacy of my own home, I just like a text editor a terminal and a beer)
However, the default Emacs that comes with OS X does not seem to highlight the comments in font-lock-mode. I've seen this behavior in both Python and C mode.
I've already searched some forums and I found one post where the person was having the same problem as me:
http://forums.macosxhints.com/showthread.php?p=512361
Is is there any way to fix this problem?
I had this exact same problem. The solution is to change the color used for the comment face as follows:
(set-face-foreground 'font-lock-comment-face "red")
Or, if you only want to do this for certain modes:
;;; Only do this for the common C mode (C, C++, Objective-C)
(add-hook 'c-mode-common-hook #'(lambda () (set-face-foreground 'font-lock-comment-face "red")))
For more information on faces, see http://www.gnu.org/software/emacs/manual/html_node/emacs/Faces.html.
I'm not sure exactly how to fix it, but I'm fairly certain there's something you can put in the .emacs file. In fact, I think I've done that before. I'll look for my file and let you know what I can find.
I'll try and get you my .emacs file when I get home from work tonight.
[edit] I've looked and looked, and can't find a .emacs file on either system that I use, and on my OS X install (Leopard default), it looks like it does it correctly by default. I did some research here, and it looks like the default installations no longer use .emacs files, because there's folks like me that mess around with them and break things, and they got tired of having to help us fix it. But, there is a set of menus that will let you tweak things. Start by typing "M-x customize RET", where M is the meta character (on my OSX install, this is the esc key. Don't hold it down, just type it like a regular character. That'll get you into a menu of stuff you can change. I didn't poke around too much, so I'm not sure where in the menu you'll find what you're looking for. Sorry I couldn't be more help.
In my experience this is usually related to a unpaired quote (single-, double-, or otherwise) somewhere in an existing comment.
Hunt those occurences down and eradicate them in your source code (or if you are more ambitious, see if you can update the fontlock code in your major modes' emacs source code)
When I have encountered this in editting Perl in emacs, I often switch major modes to cperl-mode as it typically handles parsing the perl better than the default perl-mode.