Misskiss | 1 Feb 2008 03:22
Picon

How to dispaly hh:mm:ss in mode line?

Dear Friends,
Now my emacs mode line can display time like "Thu Jan 31 21:19", what if
I want to display second, too? just like: Thu Jan 31 21:19:23, and it
also can update per second?

Thanks a lot.
Misskiss
--

-- 

You have an unusual understanding of the problems of human relationships.

Nikos Apostolakis | 1 Feb 2008 02:10
Picon

Re: Apply a saved macro to region

"Ankur Jain" <ankurj <at> gmail.com> writes:

> Hi
>
> I saved a macro which appends a comma(,) at the end of a line. I want to apply
> this saved macro to a region now. I mean, I select a region in emacs and do
> "append_comma" macro command to apply this to the whole region.
>
> If that's possible, kindly reply.
>

There are two solutions that come to mind.  The first one is to use
"C-x C-k C-n" etc to bring the desired macro at the front of the
keyboard macro ring (yes, emacs has one of those) and then call
"apply-macro-to-region-lines" as usual.

Also, looking at the documentation of "apply-macro-to-region-lines"
we see that it takes an optional argument "macro", the problem is
that the this argument cannot be given interactively.  So one could
do something like

(defun my-apply-macro-to-region-lines (start end macro)
  "Wrapper of apply-macro-to-region-lines."
(interactive "r\nCnamed kboard macro to apply: ")
(apply-macro-to-region-lines start end macro))

and then provide the name of the saved macro at the prompt.  Note
that this hasn't being really tested, and my elisp skills are not
that great, but it should work.

(Continue reading)

Eli Zaretskii | 1 Feb 2008 12:04
Picon

Re: opening large files (few hundred meg)

> Date: Thu, 31 Jan 2008 14:55:07 -0800 (PST)
> From: Ilya Zakharevich <nospam-abuse <at> ilyaz.org>
> 
> > The problem is not with the buffer size per se, it's with the fact
> > that Emacs needs to be able to address each byte of the file's text
> > with an Emacs integer data type, which is 29 bit wide on 32-bit
> > machines.
> 
> Are you sure?

See src/buffer.h, where it defines `struct buffer_text'.  It has these
members:

    EMACS_INT gpt;              /* Char pos of gap in buffer.  */
    EMACS_INT z;                /* Char pos of end of buffer.  */
    EMACS_INT gpt_byte;         /* Byte pos of gap in buffer.  */
    EMACS_INT z_byte;           /* Byte pos of end of buffer.  */
    EMACS_INT gap_size;         /* Size of buffer's gap.  */

and then `struct buffer' has this:

    /* Char position of point in buffer.  */
    EMACS_INT pt;
    /* Byte position of point in buffer.  */
    EMACS_INT pt_byte;
    /* Char position of beginning of accessible range.  */
    EMACS_INT begv;
    /* Byte position of beginning of accessible range.  */
    EMACS_INT begv_byte;
    /* Char position of end of accessible range.  */
(Continue reading)

David | 1 Feb 2008 13:54
Picon
Favicon

Re: Mysterious hidden end of line characters.


> > ~ $ su
> > Password: 
> > dell-1 /home/dave # 
> >
> > What options are there for having a nicer prompt in eshell? It would
> > be nice to show the path in the prompt when the path is short or
> > abreviate the path in the prompt when the path is long. Am I dreaming?
> 
> Is it what you need ?
> 
> (setq eshell-output-filter-functions (list 'eshell-handle-ansi-color 
> 					   'eshell-handle-control-codes 
> 					   'eshell-watch-for-password-prompt))

Thanks Thiery, well not quite. Actually, something funny happened with
my last email, what I see at the prompt for the super user has some
code which looks like "^ [1;31m", but when I send this email from
emacs to mutt this code becomes converted so in the email it doesn't
look so bad and no one could see what the problem was.  To get around
this I have added a space after the ^ in this email. It's the "^
[1;31m" which really looks bad in the eshell. It looks like this short
piece of code isn't converted but just pronted as it is making the
prompt for the super user look ugly.

cheers
Dave

Thierry Volpiatto | 1 Feb 2008 15:07
Picon
Gravatar

Re: Mysterious hidden end of line characters.

David <dpleydel <at> univ-fcomte.fr> writes:

>> > ~ $ su
>> > Password: 
>> > dell-1 /home/dave # 
>> >
>> > What options are there for having a nicer prompt in eshell? It would
>> > be nice to show the path in the prompt when the path is short or
>> > abreviate the path in the prompt when the path is long. Am I dreaming?
>> 
>> Is it what you need ?
>> 
>> (setq eshell-output-filter-functions (list 'eshell-handle-ansi-color 
>> 					   'eshell-handle-control-codes 
>> 					   'eshell-watch-for-password-prompt))
>
> Thanks Thiery, well not quite. Actually, something funny happened with
> my last email, what I see at the prompt for the super user has some
> code which looks like "^ [1;31m", but when I send this email from
> emacs to mutt this code becomes converted so in the email it doesn't
> look so bad and no one could see what the problem was.  To get around
> this I have added a space after the ^ in this email. It's the "^
> [1;31m" which really looks bad in the eshell. It looks like this short
> piece of code isn't converted but just pronted as it is making the
> prompt for the super user look ugly.
>
> cheers
> Dave
>
I guessed that , it do the same here if i don't use 
(Continue reading)

shreevatsa | 1 Feb 2008 06:28
Picon
Gravatar

Re: A *real* auto-save-mode?

On Jan 23, 5:37 pm, martin rudalics <rudal... <at> gmx.at> wrote:
>  > Emacs has an auto-save-mode, which comes useful on rare occasions such
>  > as crashes. However, what I (and apparently, many others) would like
>  > is a feature that automatically saves your files for you -- not to
>  > another file but to the one your buffer is visiting, and such that you
>  > will not be prompted to save your file on exit.
>
[...]
>
> Setting `auto-save-visited-file-name' can be harmful.  See, for example,
>
> http://lists.gnu.org/archive/html/emacs-devel/2003-10/msg00306.html
>
> and
>
> http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-11/msg00077.html
>
> If these threads do not convince you feel free to send a bug report.
>
> Better yet: Help us find out why and how it doesn't work ;-)

Thanks for those. I was planning to post a detailed post summarising
those two threads and the issues that still exist (I'm convinced
setting `auto-save-visited-file-name' is harmful, not that the bugs
have been fixed), but I no longer feel as interested... I think that
feature should be removed if it's buggy; that's all I can say.

Anyway, for completeness, stating that this is the solution I'm using
now, and it seems to do what I want:

(Continue reading)

Bob Nelson | 1 Feb 2008 08:01

CRM in Buffer List

What do the letters ``CRM'' mean in the Buffer List (C-b C-x). The GNU Emacs
(22.1) info manual explains the contents of what's present but doesn't
treat the ``CRM''.

And where _should_ I have looked in the GNU Emacs manuals to avoid bothering
the contributors to this newsgroup?

Tim X | 1 Feb 2008 08:22

Re: Task list like Eclipse's that can keep track of TODOs in multiple source files

Michael Hoffman <b3i4old02 <at> sneakemail.com> writes:

> Is there a task list mode that will find tags like TODO/XXX/FIXME in source
> files in a directory, make them into tasks and allow me to edit
> them/reorder them in the task list?
>
> I understand that Eclipse and Visual Studio can provide at least some of
> the functionality listed above. The best I can do thus far is the use of
> M-x multi-occur, which is useful but does not allow me to simply
> reorder/sort/edit.
>

I don't know of one, but it sounds like a useful tool!

What I do is keep my 'todo' stuff in an .org file using remember
mode. This is quite useful as you get all the benefits of org mode (now
bundled with emacs 22) and using remember mode means you have links to
the document the todo refers to. The only downside is that the todo is
not actually in the file it is associated with (though you might be able
to make remember mode do this with some hacking).

Org mode provides some useful reporting tools that may provide the
sorting/presentation aspects you would like. 

Tim 

--

-- 
tcross (at) rapttech dot com dot au

(Continue reading)

Johan Bockgård | 1 Feb 2008 10:33
Picon
Picon

Re: CRM in Buffer List

Bob Nelson <bnelson <at> nelsonbe.com> writes:

> What do the letters ``CRM'' mean in the Buffer List (C-b C-x).

,----[ C-h k C-x C-b ]
| C-x C-b runs the command list-buffers
| [...]
| For more information, see the function `buffer-menu'.
`----

,----
| buffer-menu
| [...]
| The first column shows `>' for a buffer you have
| marked to be displayed, `D' for one you have marked for
| deletion, and `.' for the current buffer.
| 
| The C column has a `.' for the buffer from which you came.
| The R column has a `%' if the buffer is read-only.
| The M column has a `*' if it is modified,
| or `S' if you have marked it for saving.
| After this come the buffer name, its size in characters,
| its major mode, and the visited file name (if any).
`----

--

-- 
Johan Bockgård

Andreas Röhler | 1 Feb 2008 15:27
Picon

Re: Narrowing to non-adjacent regions

Am Mittwoch, 30. Januar 2008 20:42 schrieb davidjneu <at> gmail.com:
> Hi,
>
> Hi, I'm wondering if it's possible to narrow a buffer so that multiple
> non-adjacent
> regions are displayed.
>
> The code snippet below doesn't work, but conveys what I'm looking for.
>
> Many thanks!
>
> Cheers,
> David
>
> (defun narrow-two ()
>   (interactive "*")
>   (widen)
>   (goto-char (point-min))
>   (let ((start-1 (point))
> 	(end-1 (progn (next-line 5) (point)))
> 	(start-2 (progn (next-line 7) (point)))
> 	(end-2 (progn (end-of-buffer) (point))))
>   (narrow-to-region start-1 end-1)
>   (narrow-to-region start-2 end-2)))
> _______________________________________________

As GNU Emacs enables only a single region at time
AFAIK, you'll need another tool to do this.

Already exists block.el, look, if it is suitable.
(Continue reading)


Gmane