0

So, after adding fallowing line in to my .emacs file I see no result, whether I'm running emacs in the X window or an terminal.

(custom-set-variables
 ;;; CUSTOM-SET-VARIABLES INSTANCE
 ;; Init file should contain only one such instances.
 ;; If there is more than one, they won't work right.
 '(custom-enabled-themes (quote (misterioso)))
 '(scroll-bar-mode nil)
 '(tooltip-mode nil)
 '(tool-bar-mode nil))

I been trying this pretty long time ago and I still see no explanation to where I could make an error in this short line ('(tooltip-mode nil)). The emacs debug shows no errors, every thing else runs well in my .emacs file and that tool-tip is turning me mad covering the top of my small laptop screen. If that helps, I'm running Emacs 24.5.1 on Debian 9.

SCREEN:

enter image description here

  • Can you show us the offending tooltip? – Stefan Dec 20 '17 at 1:47
  • You mean a screen-shoot? Sure. – siery Dec 20 '17 at 1:51
  • I don't see any tooltip in that screenshot. What am I missing? – Stefan Dec 20 '17 at 2:38
  • Oh.. that coast of my misunderstanding. I meant to hide menu-bar not tooltip. That seems pretty obvious now, but I'm not an English native speaker. Sorry for waisting your time but that help me finally to think about this and not be stack with this ugly menu bar on top of my screen, thank you. – siery Dec 20 '17 at 3:22
  • @Stefan Okay. The OP just mixed up the menu-bar and tooltips. What are we going to do with this question? Is the misunderstanding a general source of error for non-native speakers so that the question makes sense in its current form? Should we use the question to show the user what can go wrong if they interfere with the customization interface as I did in my answer? Should we close/delete the question now after the misunderstanding has been resolved? – Tobias Dec 20 '17 at 7:26
0

Maintaining custom-set-variables by hand in your init file can be tricky. As the comment in your lisp snippet says there may only be one custom-set-variables for an emacs session. It may be that the custom-set-variables form is already in some other file like ~/.emacs.d/custom.el and not in ~/.emacs.

You can determine where your customization information is by the function custom-file, e.g., use M-: (custom-file) RET and you can set that file name by setting the value of the variable custom-file. But that is also tricky. Consult the help of the variable custom-file via C-h v custom-file (I cite that help for convenience below).

I suggest that you set tooltip-mode only over the custom interface or delete the customization of tooltip-mode (over the customization interface) and use the command (tooltip-mode -1) in your init file.

Help of custom-file:

File used for storing customization information. The default is nil, which means to use your init file as specified by user-init-file. If the value is not nil, it should be an absolute file name.

You can set this option through Custom, if you carefully read the last paragraph below. However, usually it is simpler to write something like the following in your init file:

(setq custom-file "~/.emacs-custom.el")
(load custom-file)

Note that both lines are necessary: the first line tells Custom to save all customizations in this file, but does not load it.

When you change this variable outside Custom, look in the previous custom file (usually your init file) for the forms (custom-set-variables ...) and (custom-set-faces ...), and copy them (whichever ones you find) to the new custom file. This will preserve your existing customizations.

If you save this option using Custom, Custom will write all currently saved customizations, including the new one for this option itself, into the file you specify, overwriting any custom-set-variables and custom-set-faces forms already present in that file. It will not delete any customizations from the old custom file. You should do that manually if that is what you want. You also have to put something like (load "CUSTOM-FILE") in your init file, where CUSTOM-FILE is the actual name of the file. Otherwise, Emacs will not load the file when it starts up, and hence will not set custom-file to that file either.

  • My custom-file file variable is set to nil and no other file containing custom-set-variables exists in my user directory just ~/.emacs. – siery Dec 20 '17 at 1:47
  • @siery I read in the comments that the question just resulted from a misunderstanding (mixing up tooltip and menubar). I wrote this answer with my own experiences in mind from the time when I was an emacs-newbie. This answer lists some things that may go wrong if one interferes with the custom interface. Note, that it is best, either to use the custom interface as it is intended to or to leave it alone. custom-set-variables should never be edited manually. I am just discussing with Stefan and maybe you what we are going to do with this question and therefore also with its answer. – Tobias Dec 20 '17 at 7:37
  • In my opinion, your answer is valuable and this seems to be the solution in most cases when someone are not using wrong variable name like I did. Maybe we should just delete the last comments and you could expand your answer (add some useful Unix shell commands etc.) .. ? That probably will help for most people looking for this topic. – siery Dec 21 '17 at 11:55

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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