Fedora :: Commenting Out Block Of Code In EMacs In Python Mode

Jan 13, 2010

I usually develop python code with emacs, emacs being in python code. On my desktop a version is installed and/or configured that way, so I easily can choose a region in the code and simply click on a menu option to comment out this block of code (i.e. at the begin of each line in the selected code two '##' are put). That is very convenient.

However, on my Laptop, running F12 and emacs 23.1.1, this menu option is missing! I searched within google and found the hint that by pressing 'C-c #' I also can comment out a selected region. But on my emacs it says: 'C-c # is undefined'. Am I missing something? Anyone any idea how to fix/install/update/solve this problem, so I can easily choose a couple of python lines and comment them out?

View 3 Replies


ADVERTISEMENT

General :: Function For Block Commenting Bash Scripts In Gedit

Apr 9, 2010

I just started writing bash scripts and have a little question about the text editors. I now use gedit which I really like (don't like emacs for some reason), but I do miss some function for inserting/removing comment signs (in this case # for bash scripts) on a whole block of text. For example in Matlab you can simply mark a whole block and comment/uncomment all of it at once. Is this possible in gedit (via some plug-in or something?), or maybe in some other nice editor you can recommend?

View 7 Replies View Related

Ubuntu :: Code In Emacs File To Start Emacs Maximized?

May 17, 2010

I was using the following code in my .emacs file to start emacs maximized:

Quote:
(defun toggle-fullscreen ()
(interactive)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32

[Code]...

View 2 Replies View Related

Fedora :: Emacs: Flyspell-mode Not Working In Tex Mode?

Jun 13, 2011

I am an emacs user, and I noticed that on my new machine (running F15, 64bit) flyspell-mode will not work in tex mode.

I get errors that look something like this:

Code:
Spell-checking inequality-model.tex using hunspell with default dictionary...
Spell-checking region using hunspell with default dictionary...done
ispell-send-string: Process ispell not running
When done with a buffer, type C-x #
code....

View 2 Replies View Related

Fedora :: How To Let Emacs Run In Text-mode In Gnome-terminal

Sep 11, 2010

I had Emacs installed in Fedora 11 and want to run it text-mode,but everytime when I type emacs command in gnome terminal,an emacs graphical window pop up. I want to emacs to back to text-mode by typing M-x text-mode, and it doesn't work.Can emacs run in text-mode in X11 environment?

View 2 Replies View Related

Applications :: Install Php Mode On Emacs?

Dec 23, 2010

I am just starting out with ubuntu.

I downloaded emacs, and wanted to use php-mode, so i downloaded something called php-mode. I would have posted a link, but this forum restricts me from doing that.

Inside are a bunch of files, and no readme. I tried to ask google how to install this, but found nothing that made sense to me (i am still a n00b).

View 8 Replies View Related

General :: Get Vim Insert Mode In Emacs?

Apr 20, 2010

Is it possible to get vim insert mode in Emacs?

View 2 Replies View Related

General :: Grep Exits Abnormally With Code 123 When Running Rgrep On Emacs

Oct 7, 2010

I'm running GNU Emacs 23.1.1 on "Ubuntu 10.04.1 LTS" and any search I perform using the built-in M-x rgrep on the standard Linux kernel source code (vanilla) ends prematurely with the following error printed to the emacs echo area:Grep exited abnormally with code 123.I have been seeing it for a while on Redhat systems as well, and with other (large) code bases.

View 2 Replies View Related

Ubuntu :: Emacs Org Mode Broke After Update

Jan 9, 2010

I just updated to emacs23 from emacs22 (sudo apt-get install emacs2). I find that I now have a problem with org mode structured lists not appearing. A single asteriks on a line by itself no longer appears highlighted and no longer collapses and expands using the tab key.

View 2 Replies View Related

OpenSUSE :: Using Emacs Shell-bash-mode-hook?

Feb 26, 2010

I want to show line numbers automatically in bash scripts (a habit of being a programmer) and when I load an emacs lisp file it works from the command below but the following command that sets up the same thing for bash scripts doesn't work. I played around with this for quite some time and couldn't find anything that would make work.This is the first time I have tried to customize emacs so it could easily be something ignorant on my part.

;; Load additional packages
(load-file "~/.elisp/whitespace.el")
(load-file "~/.elisp/setnu+.el")

[code]....

View 1 Replies View Related

General :: Deleting A Directory In Emacs' Dired Mode

Feb 16, 2011

I would like to delete a directory in emacs' dired-mode.

I mark the directory with the "d" key, and then hit "x" to deleted flagged.

I then get the following error:

Is there any way to get emacs to delete the directory and stop its whining?

View 1 Replies View Related

Ubuntu :: Emacs In Remote Machine In Term Mode?

Jun 15, 2011

I ssh connect with a remote machine and have to use emacs.But emacs run only in term-mode. does anyone have a solution how can i run emacs in graph mode in the remote machine

View 1 Replies View Related

Software :: Using EMacs Abbrev-Mode To Replace Symbols?

Jul 7, 2011

I want to use Emacs abbrev-mode to be able to replace certain programming symbols with their Unicode equivalents as I type. So, for starters, I added this to my abbrev_defs file:

Code:
(define-abbrev-table 'haskell-mode-abbrev-table '(
("->" "→" nil 0) ))

But it simply doesn't work when I am in abbrev-mode. No error message, the auto-abbreviation simply doesn't take place. If I adjust the above:

Code:
(define-abbrev-table 'haskell-mode-abbrev-table '(
("arrow" "→" nil 0) ))

Then auto-abbreviation works with the word "arrow". Why can't it auto-replace the symbol?

View 3 Replies View Related

Hardware :: Emacs Console Mode : Change Background Colour

Mar 11, 2011

I am using GNU Emcas 23.2.1 in console mode on Konsole. It has white background colour. I want to change it to black.

View 3 Replies View Related

Ubuntu :: Python - IndentationError - Expected An Indented Block

Aug 23, 2010

I am trying to do my first Python program and I am having a little bit of trouble. I get this "IndentationError: expected an indented block".

Here is the code:

Code:

View 8 Replies View Related

Debian Programming :: Python-TK Alloc - Invalid Block Error

Sep 23, 2015

Just installed Debian 8 last night and trying to run one a few of my scripts that use easygui (a front-end for python-tk basically) and I keep getting alloc: invalid block any time a file or folder selection dialog is presented. I'm able to select a file/folder with no issues, but once the dialog closes I get a variation of what appears to be a memory error followed by alloc: invalid block.

Here's one of my scripts that does it. This one pops up a file selection dialog pretty early on to ask for a file to check, and as soon as I select any file the dialog closes and that error appears in the terminal. It happens whether I run it with Python 2 or Python 3. You will need to install python3-easygui for this script to run properly if you want to check for yourself what happens. This is a first time encountering this error for me.

View 1 Replies View Related

Debian Programming :: Emacs And ECB Missing Python Methods In Methods Window

May 12, 2014

I work with python and I use emacs as my IDE tool. I have been running Debian Squeeze (6.0.9) for some time now with emacs 23.2.1 and ecb 2.32. I am able to access my python methods in the ecb-methods window with no problems. However I recently upgraded my desktop to Debian Wheezy (7.5) running emacs 23.4.1 and ecb 2.40 but I have lost access to the methods in the ecb-methods window. The window is just empty while the others (directories, sources and history) are all populated. I have a second laptop which I decided to upgrade to Debian Jessie, however Jessie recommends emacs 23.4.1 which is running with ecb 2.40 also. The result is the same as on Wheezy.

I have used the ecb menus and googled for a solution or even just a mention that such a problem exists but have come up with nothing. Either I have a unique situation here or am doing something really dumb.

I would like to upgrade to Wheezy or Jessie but I need access to methods in the ecb methods window. How to keep my upgrade and see the methods in the methods window of the ecb system ....

View 0 Replies View Related

Ubuntu :: Execute Python Code Before Shutdown

Dec 2, 2010

I have written a backup script backing up the data I have worked during the day with rsync and sends me a log in my email. now it works perfect but i want to execute it each time i shutdown my computer in the evening not during reboot or logout.It seems that i can not run it by putting it in init.d and softlinking in rc0.d as K00backup. I think it is because script uses many services like python or smtplib, gnome-keyrings that in that time might have been already shutdown.

View 2 Replies View Related

Ubuntu :: Changing Fortran Code To Python?

Aug 19, 2011

I have a big fortran code for FE analysis. I want to change the code to python. I am curious to know, whether I will get any advantage over speed, If not at least the speed should not be less than what fortran gives. Should I go for it.

View 2 Replies View Related

Programming :: Black Jack Code In Python?

Dec 16, 2008

i have attached a word doucment with black jack code, i want to know what things are wrong with it, and why it does not run, in python, as it keeps displying error messages such as "invalid syntax"

View 14 Replies View Related

Software :: Compile Python Source Code With 64 Bit?

Jun 28, 2010

I've taken the source code for Zlib1.2.3, built and installed in a 64 Bit linux machine. Then when i downloaded Python 2.5.4 source and tried to build(make), i got the following error

gcc -pthread -shared build/temp.linux-x86_64-2.5/opt/cinecert/Python-2.5.4/Modules/zlibmodule.o -L/usr/local/lib -lz -o build/lib.linux-x86_64-2.5/zlib.so /usr/bin/ld: /usr/local/lib/libz.a(adler32.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libz.a: could not read symbols: Bad value collect2: ld returned 1 exit status

View 3 Replies View Related

Debian :: Python-pkg-resources Returns Error Code

Apr 9, 2010

The system is Debian Squeeze/Sid with apt.conf set to Squeeze as the default. Most packages are from Squeeze.

I ran apt-get upgrade and it returned an error-code.

It might be it is this bug: Bug#574153: python-pkg-resources: Missing file leaves it unconfigured

I tried aptitude install -f, to hold it and to remove the package python-pkg-resources, but i am getting told the package would be in a very bad stage, and i should re-install it. That doesn't work.

View 1 Replies View Related

Software :: Shift A Block Of Code Backwards In KWrite?

Jul 13, 2011

For shifting forward, we select the required part and press tab the number of times we want to move forward.

What's to be done for shifting the same backwards other than pressing Ctrl-Z?

View 3 Replies View Related

Programming :: Measure CPU Time Spent On A Code Block (with C Or C++)?

Jul 31, 2011

I have a C program like this:

...
CODE_BLOCK;
...

I want to know how much CPU time spent on CODE_BLOCK. Since the process executing CODE_BLOCK may be preempted during execution, this CPU time may not be equal to the (wall-clock) time elapsed from the beginning of CODE_BLOCK to the end of it.

View 3 Replies View Related

Programming :: Stop Reading Process Without Be Hanged At The Code In Python?

Dec 11, 2010

I have a Python program looks like this one :

Code: import os
import time
process = os.popen("top").readlines()

[code]...

View 2 Replies View Related

Programming :: Python: Determine If Running In 32 Or 64bit Mode?

Jun 23, 2011

How can I programmatically determine if my python script is being run with a 32 or 64 bit interpreter? Better yet, is there a one-liner I can run that will print out the word size of the current python session?

View 6 Replies View Related

Hardware :: Change The ECC Code For A Block Of A File Stored On A Flash Drive By Any Means?

Jun 22, 2010

can I change the ECC code for a block of a file stored on a flash drive by any means ? of a file stored on a HDD (though I don't think there would be a difference between the two)Maybe , through some hardware interrupts or anything like that?Also if possible I need the solution to be in C/C++.

View 4 Replies View Related

General :: Getting Emacs Recognizing .tex As Latex And Even Running Latex-mode?

Jul 5, 2010

I am a semi-noob on this and I have problems getting my emacs recognizing .tex as latex and even running latex-mode. Usually when you run latex-mode (M-x : latex-mode) emacs should switch to latex-mode, but nothing happens in my case. The menu bar still show the TeX options, highlighting remains the same etc.

I am running emacs 23.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.10.4), this is on a university system so I don't know much about it.

> uname -a
Linux karakum 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 00:57:09 EST 2010 x86_64 x86_64 x86_64 GNU/Linux.

View 12 Replies View Related

Ubuntu :: Emacs Org-mode "C-c A A" Not Working?

Jan 15, 2011

I'm using 11.04. The agenda command C-a a a (agenda for current week or day) isn't working. When I press C-c a, it tells me that it doesn't know that command...

View 2 Replies View Related

General :: Commenting In A Wget List?

Apr 2, 2011

I need to download about 100 packages so I'm using wget-list to make it easier. My question however, is once I've made the list (I assume it's in a .txt format), is there a way I can insert comments into it that wget will ignore? Something like this:

#This is a comment
http://someurl.com
http://anotherurl.com

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved