Ke Lu | 1 Dec 2007 02:00
Picon

Re: Interative batch query-replace question

> Do want to change filenames in a directory or the contents of files in that 
> directory?
I don't want to change filenames. 
I want to change contents of files in a directory.

Andreas Röhler <andreas.roehler <at> online.de> writes:

> Am Freitag, 30. November 2007 10:25 schrieb Ke Lu:
>> I want do it only once.
>
> Then probably you are right with dired.
>
> Do want to change filenames in a directory or the contents of files in that 
> directory?
Johan Bockgård | 1 Dec 2007 02:18
Picon
Picon

Re: Ellipsis "..." from outline-mode: how to react to mouse-1 events?

Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> The outline overlay (which adds the `invisible' property) could simply
> have a `keymap' property (as well as a mouse-face property).
>
> I think this currently wouldn't do anything

And do know what "this" refers to. Anyway, my tries seemed to indicate
that bindings for mouse buttons have no effect but that ordinary
keyboard keys work.

--

-- 
Johan Bockgård
Stefan Monnier | 1 Dec 2007 05:19
Picon

Re: Ellipsis "..." from outline-mode: how to react to mouse-1 events?

>> The outline overlay (which adds the `invisible' property) could simply
>> have a `keymap' property (as well as a mouse-face property).
>> 
>> I think this currently wouldn't do anything

> And do know what "this" refers to.

"this" refers to adding those two properties to outline-mode's overlays.

> Anyway, my tries seemed to indicate that bindings for mouse buttons
> have no effect but that ordinary keyboard keys work.

Oh, so you're saying that the `keymap' property is obeyed for keyboard
keys (on text replaced by an ellipsis)?  I didn't know.
I do know that it doesn't work for mouse events.

        Stefan
Andreas Röhler | 1 Dec 2007 09:19
Picon

Re: Interative batch query-replace question

Am Samstag, 1. Dezember 2007 02:00 schrieb Ke Lu:
> > Do want to change filenames in a directory or the contents of files in
> > that directory?
>
> I don't want to change filenames.
> I want to change contents of files in a directory.
>

So let's start with the first task:

If you want to add a "2" at all endings in that directory,

as  "jp.co" => "jp.co2" let's assume,

you can perform this

with

M-x wdired-change-to-wdired-mode

M-x query-replace-regexp $ RET 2 !

If everything looks fine, do C-c C-c to write down your
changing or quit (with C-c ESC or C-d).

With quit nothing is changed.

Andreas Röhler
Eli Zaretskii | 1 Dec 2007 10:21
Picon

Re: Disable automatic line breaks

> From: Bettina Kraus <bettinakraus1 <at> gmx.de>
> Date: Fri, 30 Nov 2007 06:53:40 -0800 (PST)
> 
> when I'm in TeX mode and write lines that have more than 70
> or so characters, emacs automatically breaks the line. This
> makes me crazy!! Does anyone know how to disable this?

M-x auto-fill-mode RET
Ke Lu | 1 Dec 2007 10:11
Picon

Re: Interative batch query-replace question

Perhaps my explain is not quite enough.

I want to query-replace some files.(not filename)

1. Use find-dired to Find some files.(M-x find-dired)
In "*File" buffer,it looks like:
  /home/lu/workspace/:
  find . \( -name "*.java" \) -exec ls -ld \{\} \;
  -rw-r--r--  1 lu lu 215  1月 21  2003 ejbdemo/DemoEntity.java
  -rw-r--r--  1 lu lu 178  1月 21  2003 ejbdemo/DemoSession.java
  -rw-r--r--  1 lu lu 146  1月 21  2003 ejbdemo/DemoSessionLocal.java
  -rw-r--r--  1 lu lu 573  1月 21  2003 ejbdemo/DemoSessionEJB.java
  -rw-r--r--  1 lu lu 194  1月 21  2003 ejbdemo/DemoSessionHome.java

2. Mark some file in "*Find*" buffer
In "*File" buffer,it looks like:
  /home/lu/workspace/:
  find . \( -name "*.java" \) -exec ls -ld \{\} \;
  -rw-r--r--  1 lu lu 215  1月 21  2003 ejbdemo/DemoEntity.java
* -rw-r--r--  1 lu lu 178  1月 21  2003 ejbdemo/DemoSession.java
* -rw-r--r--  1 lu lu 146  1月 21  2003 ejbdemo/DemoSessionLocal.java
* -rw-r--r--  1 lu lu 573  1月 21  2003 ejbdemo/DemoSessionEJB.java
  -rw-r--r--  1 lu lu 194  1月 21  2003 ejbdemo/DemoSessionHome.java
* -rw-r--r--  1 lu lu 159  1月 21  2003 ejbdemo/DemoSessionLocalHome.java

3. call batch-query-replace-regexp.

>>  (defun batch-query-replace-regexp()
>>    (interactive)
>>      (switch-to-buffer "*Find*")
(Continue reading)

David Kastrup | 1 Dec 2007 11:16
X-Face
Picon
Picon

Re: Disable automatic line breaks

Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Bettina Kraus <bettinakraus1 <at> gmx.de>
>> Date: Fri, 30 Nov 2007 06:53:40 -0800 (PST)
>> 
>> when I'm in TeX mode and write lines that have more than 70
>> or so characters, emacs automatically breaks the line. This
>> makes me crazy!! Does anyone know how to disable this?
>
> M-x auto-fill-mode RET

With Emacs 22, a right click on the "Fill" in the mode line should make
it possible to toggle fill-mode, too.

--

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Peter Dyballa | 1 Dec 2007 11:48
Picon

Re: Disable automatic line breaks


Am 30.11.2007 um 15:53 schrieb Bettina Kraus:

> when I'm in TeX mode and write lines that have more than 70
> or so characters, emacs automatically breaks the line. This
> makes me crazy!! Does anyone know how to disable this?

Why does it make you crazy? TeX does not get confused by spaces or  
line breaks. Anyway, another option is to use (file) local variables  
at the end:

%%% Local Variables:
%%% mode: LaTeX
%%% fill-column: 99999
%%% coding: iso-8859-15
%%% End:

Invoking M-x describe-mode RET can deliver some clue(s).

--
Mit friedvollen Grüßen

   Pete

There are two major products that come out of Berkeley: LSD and UNIX.  
We don't believe this to be a coincidence.
                                          - Jeremy S. Anderson
Peter Dyballa | 1 Dec 2007 11:54
Picon

Re: Emacs Environment Variables


Am 25.11.2007 um 12:36 schrieb Harald Hanche-Olsen:

> Time to blow the dust off an old classic?
>
>   http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

Is this also known?

	http://www.grymoire.com/Unix/CshTop10.txt

--
Greetings

   Pete

"America believes in education: the average professor earns more money
in a year than a professional athlete earns in a whole week." – Evan
Esar
Ivan Kanis | 1 Dec 2007 10:51
Face
Picon

Re: align file name with find-dired

Billy O'Connor <billyoc <at> gmail.com> writes:

> Ivan Kanis <expire-by-2007-12-06 <at> kanis.fr> writes:
>
>> I am finally trying out find-dired. It looks neat except that filename
>> are not aligned:
>>
>> -rw-r--r-- 1 ivan ivan 0 2007-10-30 21:36 auto-save-list/saves-1471-zen~
>> -rw-r--r-- 1 ivan ivan 134 2007-11-30 03:07 auto-save-list/saves-5829-zen~
>
> I see what's happening, the find command is getting the output of one
> "ls" command at a time via the "-exec" action.  the regular dired
> doesn't have this problem, for it doesn't use that "one at a time"
> method of listing the files

I could not find an option in ls to format the size of the file so
that it would line up. 

Maybe a better way would be to use find to list directories and then
execute ls on each directories.
--

-- 
Ivan
http://kanis.fr

  "If the designers of X-Windows built cars, there would be no fewer
than five steering wheels hidden about the cockpit, none of which
followed the same principles -- but you'd be able to shift gears with
your car stereo. Useful feature, that."
    -- Marus J. Ranum , Digital Equipment Corporation
(Continue reading)


Gmane