shell-send-input and the ">" character

shell-send-input and the ">" character

Post by Rob Sarge » Sun, 02 Dec 1990 09:31:26



I use shells within emacs constantly. In particular a use Ingres. Thus
I frequently use the ">" character. Everything works fine... except
when I wish to re-do a quel command that has a ">" in it. ( I do this
by putting the cursor on the old command (which is of course somewhere
upstream from end-of-buffer), and then hitting return (which in
shell-mode is bound to shell-send-input. Invariable what gets sent is
only that part of the line after the ">"! I suspect shell-send-input
is treating everything to the left of the ">" as part of some supposed
prompt. Is there any way of undoing this special meaning of the ">"
vis shell-send-input.

Thanks in advance.

 
 
 

shell-send-input and the ">" character

Post by Dion Hollenbe » Wed, 05 Dec 1990 01:13:34



> I use shells within emacs constantly. In particular a use Ingres. Thus
> I frequently use the ">" character. Everything works fine... except
> when I wish to re-do a quel command that has a ">" in it. ( I do this
> by putting the cursor on the old command (which is of course somewhere
> upstream from end-of-buffer), and then hitting return (which in
> shell-mode is bound to shell-send-input. Invariable what gets sent is
> only that part of the line after the ">"! I suspect shell-send-input
> is treating everything to the left of the ">" as part of some supposed
> prompt. Is there any way of undoing this special meaning of the ">"
> vis shell-send-input.

What is going on is controlled by shell-prompt-pattern which is a
regular expression to be looked for and cast aside everything before
and including it.  My pattern is here and takes account of my
"hostname ->" prompt dbx's ")" prompt, and the "#" promopt when
I am root.  Since I am not real good at regular expressions, I
will not attempt to give you the correct one, but you should be
able to come up with one which either will suit all types of
prompts, or you can change the value of the constant as you
move from system to system as appropriate.  Here is mine as an
example:

(defconst shell-prompt-pattern "^.*[x-][>#)] *" "\
*Regexp used by Newline command in shell mode to match subshell prompts.
Anything from beginning of line up to the end of what this pattern matches
is deemed to be prompt, and is not reexecuted.")

--
        Dion Hollenbeck             (619) 455-5590 x2814
        Megatek Corporation, 9645 Scranton Road, San Diego, CA  92121


 
 
 

1. (setenv "LANGUAGE" "da_DK") + dired -> "No file on line"

I am using xemacs version 20.4; fra Feb 1998 (debian potato) , and I
had a problem. When I used auc-tex my viewer wrote

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "c",
        LC_ALL = "c",
        LANG = "c"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

It seems that outside xemacs I had the right language settings
(da_DK), but inside xemacs something was wrong. Therefore I added the
following lines to my .emacs

(setenv "LANG" "da_DK")
(setenv "LANGUAGE" "da_DK")
(setenv "LC_ALL" "da_DK")

Sadly that gave me a new problem. When I used dired and tried to open
a file, xemacs wrote : "No file on line". I found a faq on the web

http://www.lerner.co.il/emacs/faq_6.html#SEC89

It says:

 Dired uses a regular expression to find the beginning of a file
 name. In a long Unix-style directory listing ("ls -l"), the file name
 starts after the date. The regexp has thus been written to look for
 the date, the format of which can vary on non-US systems.

 There are two approaches to solving this. The first one involves
 setting things up so that "ls -l" outputs US date format. This can be
 done by setting the locale. See your OS manual for more information.

 The second approach involves changing the regular expression used by
 dired, dired-move-to-filename-regexp.

Now I am somewhat baffled. I don't know how to do any of the two. If
someone has a quick solution please help me. (I use bash)

        Thanks in advance
        Niels

PS: I realise upgrading would probably be a quick solution, but I am
not the sysadm, and I don't have the skill to install a new xemacs
myself.

--
Niels L Ellegaard  http://dirac.ruc.dk/~gnalle/
SPECIAL OFFER! I proofread unsolicited commercial email sent to this
address at a rate of US $500.00 per incident!  Include billing address
in your message and save US $500.00 per hour off ordinary address
resolution and tracking charge!

2. ViaVoice and OS2 voice recognition files??

3. Replace "// <text>" with "/* <text> */"

4. Self-modifying code

5. NT4: Emacs displays "short filename" when started by "send-to"

6. Is anyone doing NEW development for DPMI32?

7. XEmacs with JDE,"Run App" I get "java -v <myclassfile>"

8. Curious re: SimLife

9. telnet "start" and "stop" characters

10. "helloyouallthere" --> "helloYouAllThere" EASILY?

11. problems with "point", "mark" and "region"

12. Q: How to highlight the "++", "--", "==" ... for C or C++

13. "file mode spec error"+"emacs" & "emacs-20.6"