I upgraded recently to OpenSuSE 12.1 from 11.3 and now when I open any files in emacs from inside a screen session, I get a blank buffer. Let's say I open it as:
emacs myFile.txt
it will open to an empty buffer, not the file, and when I attempt to save something, it will ask for a file name to write to.
One of the main features I miss about Vim, is that it always saves the filename of the current file in the % buffer (more info). That allows launching commands easily like:
;; compile current file
:! gcc %
;; source current file (useful when I'm editing .vimrc
:source %
;; get the size of current file
:!
In Emacs, how do I inspect what has been modified in a buffer (before saving and overwriting the file)?
(In a sense, the requested action is an analog of git status and git add -i showing what has been modified, only the comparison should be done between the buffer contents (in Emacs's memory) and the file on disk.)
Sometime, I forget what has been modified in a buffer, and would like to call a
I would like to associate the following function (which toggles on and off full-screen on the active buffer):
(defun toggle-maximize-buffer () "Maximize buffer"
(interactive)
(if (= 1 (length (window-list)))
(jump-to-register '_)
(progn
(set-register '_ (list (current-window-configuration)))
(delete-other-windows))))
with the keyboard shortcut Alt+Sfhit+o.
When I look u
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 made a function that tries to create a directory, and then write a simple file:
buffer = "Hello world!";
string url = "a/b/c/d/";
string tmp = "";
string done = "";
while((tmp = GetBaseDir(url)).compare("")!=0){
done+=tmp;
mkdir(done.c_str(), 0777);
} // GetBaseDir returns "a/", and changes url to "b/c/d/"
ofstream file;
file.open((url+"file.txt").c_str(),ios::trunc);
file << buff
Hello im having a problem with a project of mine, i have ubuntu server 12.04.1 lts, the problem i'm having is that i everytime i upload a file through ftp i need to modify file permissions otherwise it isnt available through browser.How can i modify the /var/www folder permissions to be seen by public through web browser and every new file/directory have the permissions of the www directory?
The /etc/crontab file has the permissions:
-rw-r--r--
I understand that this file is for system cron jobs and other users should not have permission to modify it. The current permissions allows all users read access to the file, enabling them to view the contents.
Is it necessary for all users to be able read /etc/crontab?
In the same spirit as this other question: cat line X to line Y on a huge file:
Is there a way to open from within Emacs (and
show on a buffer) a given set of lines (e.g. all lines between line X and Y) from a huge text file?
E.g.