General :: Emacs Equivalent Of Xcode's #pragma Mark?
Oct 4, 2010
I'm coming to emacs from Xcode. An Xcode feature I really like is the ability to type the lines#pragma mark -#pragma mark Section Heading Nameto mark the subsequent part of my code as belonging to a particular section. I can then jump to that section from a drop-down menu.Does a similar ability to break up code into named sections and to jump to a section by name exist in emacs?
Is there some kind of universally recognized pragma that one can insert at the beginning of a text document to designate it to be UTF-8 encoded (or any other encoding)? I've seen certain editors insert encoding comments, and one or two compilers that have an encoding pragma. But I was wondering if anyone has tried to establish some kind of universal tag format for text documents.
I know the #pragma pack(2); but how to use #pragma comment ,#pragma message , #pragma XXX .... etc..even only one example would be OK, well, let's assume the compiler is GCC, alright ? for that GCC is my favorite compiler, for a very little time i gonna use VC.
When should I use pragma pack? I found this code on some source files while other sources do not have the pragma pack()
Code: #pragma pack (1) typedef struct _net_ip_header_t { uint8 hdr_len:4;// header length uint8 version:4;// version uint8 tos;// type of service uint16 tot_len;// total length uint16 id;// identification uint16 flags_offset;// fragment offset field uint8 ttl;// time to live uint8 proto;// protocol uint16 cksum;// checksum ip_addr src_ip;// source ip address ip_addr dst_ip;// destination ip address } net_ip_header_t; #pragma pack ()
Is there a functional equivalent to xcode for the new Lucid Lynx release of Ubuntu (10.04)? I'm just beginning to write a IPHONE app and require a proper IDE, but don't want to use mac os.
I am new to using 'pragma pack' and here is what I am running into :
Process A: a.h -> defines a struct XYZ as PACKED and is of size 44bytes a.c -> includes a.h and is able to print the size as 44 bytes.
Process B b.c -> includes a.h, b.c -> gets a message from process A, with struct XYZ in the message as data. b.c -> After getting message, it is unable to print the elements of struct correctly. This is because the sizof (XYZ) in b.c is seen as 48 bytes.
I suspect, in b.c, the local variable of struct XYZ is being padded and not PACKED.
I have a laptop of which a large part of the screen is broken (shows garbage). Fortunately the broken area is a clean rectangle, the bottom 1/3 of the screen or so.
The laptop is running Ubuntu 8.04, but I plan to reinstall it with 10.10. The graphics are provided by an Intel 915GM or something in that direction.
Knowing this, do you know of a way to tell the system about the broken part of the screen, so it will simply not use it? I don't really care whether it's done at the hardware, X or window manager level, though as low as possible is preferred.
I uninstalled mplayer w/ apt-get (and with it mplayerthumbs + mozilla-mplayer) for the purpose of running a 'make install' on an SVN version I compiled - that worked out fine. Now I want to reinstate mplayerthumbs + mozilla-mplayer, but of course in doing so, mplayer is marked as a dep. How then do I mark mplayer to be ignored using the aforementioned package managers? Additionally, why isn't dpkg referencing my sources list?
Code:
[stuart8.5@mepis1 ~]$ sudo dpkg -i --ignore-depends=mplayer install mplayerthumbs mozilla-mplayer [sudo] password for stuart8.5: dpkg: error processing install (--install): cannot access archive: No such file or directory
I tried Google search and reading man page options for emacs but couldn't find... If I run emacs in GUI, it starts GUI for emacs. I want to run it in CLI in rxvt. How do I do it?
If I want to use the locate command on a Linux machine, I usually run sudo updatedb first to update the database. I can run the locate command on OS X 10.5 but I can't find updatedb. What's the corresponding updatedb for the mac?
Under unix/linux, there is this extremely useful program screen: it's for bash, text-only, and I can detach a session, log out (the session is still running though), log in later (even from a different computer) and resume the session exactly as I left it. My question is, is there an equivalent to screen for X? So what I want to do is: work remotely with ssh -X in an X-session on a remote linux machine, log out, then later log in from a different computer again with ssh -X and then re-attach the X-session; practically resuming work from the moment when I logged out before. Is this possible?
i want to start a project in my spare time. Starting with 2 PC's and expanding to a few more in the future how can I create my own GRID? I was pointed in the location of Uni-core which i have just started having a look at. Anyway could any offer any advice if you have tried soemthing similar. If I could host my own Virtual Environment using the processors/memory of more than 1 pc ill be a happy chappy. Let me know if it isn't worth the hastle, feel free to suggest something else to try
I want to create a bootable flash drive that will boot and install the slackware 13.0 distro, except that I need to be able to do it from a Windows system for a Linux install. Here's what the Linux version does(from a web page written by Eric Hameleers, who also wrote the script):
"This directory contains a script (create_multipartboot.sh) and several other files that will transform your USB stick into a bootable Slackware installer. The script creates an multi-partition image file (hence the script's filename), which you need to copy onto a USB stick.A (small) FAT partition contains the slackware setup program and the bootable code, while the rest of the available space will be used up by a 'ext2' formatted partition in which as much Slackware packages are stored as can fit."
The following declaration is presenting a compilation problem using Xcode on OS X: ostringstream cmd; The error is as follow: Implicit instantiation of undefined template 'std::basic_ostringstream<char, std::char_traits<char>,std::allocator<char> >; The exact same code will compile and run on Linux - same imports and everything. What could be causing the issue?
I am currently interested in switching from vim to emacs.One of the more compelling reasons for this is the smooth integration with a unix environment. The most experienced emacs users I have seen have a bash prompt at the bottom of their window, with stdout going to a buffer right above it. They then interact with the output of programs such as grep in interesting ways.I am on Ubuntu 10.04 and the default emacs environment does not seem to do much for me in the way of integration. For example, in the M-x shell mode, output from basic commands like ls produce lots of strange characters and hitting the up arrow does not go to previous commands.
I am doing some project work and for that using the server at college with ssh connection. Every time I try to open emacs on the terminal after connecting, it opens emacs in the terminal itself i.e. not its own window. On my laptop on which ubuntu is installed, emacs always opens up in its own window an thats how I am used to it. There are several problems when it opens in the terminal like when I try to use commands such as M-V, actually terminal's view menu opens up, its very frustrating. Also I am pretty sure that the college server runs on red hat and has X installed on it. So what do I need to do to get my emacs window back.
I was reading how you could browse the net with Emacs but then it was stated that it was done with another application like Firefox so this would imply that Emacs is an interpreter would it not? What is Emacs capable of? Is it an interpreter that runs a text editor?
I'm using emacs to write documents in latex. But, I would like to set the spell checker to use english or portuguese language. I've installed the ispell package for english and for portuguese. Now, I would like to set the emacs to use the english or the portuguese language. I can I do that?