Results 1 to 5 of 5

Thread: 'emacs' blank files...but 'sudo emacs' works

  1. #1
    Join Date
    Jul 2011
    Beans
    57

    Question 'emacs' blank files...but 'sudo emacs' works

    I've tried apt-get purging and reinstalling emacs, but if I run:

    Code:
    emacs ~/.bashrc
    I get a blank file (emacs.d) that looks like this:



    If I run the same command as root:

    Code:
    sudo emacs ~/.bashrc
    I get the correct file that looks like this:



    I've never understood the buffer thing, but emacs has worked great for me in the past. I don't know why it keeps going to this emacs.d file. Note that this is the same for any file (even new ones), I just used .bashrc for an example.

    Thanks for the help!



    P.S. Switching to VI/VIM might work, but let's not try that
    Last edited by amhainen; November 23rd, 2012 at 01:06 PM.

  2. #2
    Join Date
    Nov 2005
    Location
    Lincolnshire, UK
    Beans
    1,461
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 'emacs' blank files...but 'sudo emacs' works

    Quote Originally Posted by amhainen View Post
    ...P.S. Switching to VI/VIM might work, but let's not try that
    IMHO both emacs and vim are far too complex and are overkill for simple text editing jobs.

    I recommend nano for these jobs because it "just works"!
    Code:
    nano ~/.bashrc

  3. #3
    Join Date
    Jul 2011
    Beans
    57

    Re: 'emacs' blank files...but 'sudo emacs' works

    I recommend nano for these jobs because it "just works"!
    Thanks, but no thanks...just trying to fix my emacs.



    I do agree that nano is great!

  4. #4
    Join Date
    Aug 2011
    Location
    52° N 6° E
    Beans
    2,258
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: 'emacs' blank files...but 'sudo emacs' works

    Purging and reinstalling resets system-wide configuration, but doesn't remove/reset the user's configuration file. Try removing your .emacs.d manually.

  5. #5
    Join Date
    Jul 2011
    Beans
    57

    Smile Re: 'emacs' blank files...but 'sudo emacs' works

    Quote Originally Posted by Impavidus View Post
    Purging and reinstalling resets system-wide configuration, but doesn't remove/reset the user's configuration file. Try removing your .emacs.d manually.
    Worked great! Thanks so much!

    I just ran:

    Code:
    rm -rf .emacs.d/
    Not sure what was in that folder, but now 'emacs .bashrc' works fine.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •