I have my emacs setup as an alias in the bashrc as

alias="emacsclient -t -s server alternate-editor="

in case this helps. The emacs version is 24.4.1 and AUCTeX is compiled from the git repo and was update just yesterday the version is 2015-04-02.

I am trying to trouble shoot an issue with emacs. When I run emacs --debug-init, I get the following message:

Debugger entered--Lisp error: (void-variable modes)
  eval-buffer(#<buffer  *load*> nil "/home/dustin/.emacs" nil t)  ; Reading at buffer position 1657
  load-with-code-conversion("/home/dustin/.emacs" "/home/dustin/.emacs" t t)
  load("~/.emacs" t t)
  #[0 "\205\262�    \306=\203�\307\310Q\202;�   \311=\204�\307\312Q\202;�\313\307\314\315#\203*�\316\202;�\313\307\314\317#\203:�\320\nB\321\202;�\316\322\323\322\211#\210\322=\203a�\324\325\326\307\327Q!\"\323\322\211#\210\322=\203`�\210\203\243�\330!\331\232\203\243�\332!\211\333P\334!\203}�\211\202\210�\334!\203\207�\202\210�\314\262\203\241�\335\"\203\237�\336\337#\210\340\341!\210\266\f?\205\260�\314\323\342\322\211#)\262\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()

When I M-x goto-char return 1657 return, it says "You can run the command got-char with M-g c" and that is it. How do I jump to position 1657 to see what the issue is?

  • 4
    I'm voting to close this question as off-topic because it is unlikely to help anyone. The problem was a simple user error in code that is not presented here. – Drew Apr 7 '15 at 20:29
  • @Drew the answer to this post helped learn to use goto-char since the documentation didn't help as much of the answer did. That is, there is a benefit to this post since others may have a similar problem with this feature. – dustin Apr 7 '15 at 22:04
  • Maybe so, but that's irrelevant to the question itself (and the answer, for that matter). Someone looking to learn what you learned is quite unlikely to stumble on this question. If you want to pose a question about goto-char (or about C-x =), and even answer it yourself, that might be useful. As it stands, this Q & A is generally not helpful. Just one opinion. – Drew Apr 7 '15 at 22:41

When I M-x goto-char return 1657 return, it says "You can run the command got-char with M-g c" and that is it.

Yes, that is standard behavior. Your point will now be on position 1657. You can verify this by hitting C-x = (this runs the extended command what-cursor-position).

The more important part of the error message is (void-variable modes). You're trying to access some variable that hasn't been set.

| improve this answer | |
  • When I hit C-x and begin to type 1657, it stops after I type 1. – dustin Apr 7 '15 at 14:59
  • @dustin No, you literally type C-x, then =. This runs the command what-cursor-position. – nanny Apr 7 '15 at 15:13
  • When I do that, nothing happens. – dustin Apr 7 '15 at 15:15
  • @dustin Start from the beginning by running emacs -Q. This will start Emacs without your init file. Open your .emacs file with C-x C-f. Type M-g c 1657 RET. This should jump to position 1657. Verify this by typing C-x =. It should echo a message containing the text point=1657 of .... Then figure out why the variable modes is void. – nanny Apr 7 '15 at 15:19
  • I found the problem. It is sort of funny. There was a line missing a comment that had the word mode. – dustin Apr 7 '15 at 15:21

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