all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Xterm and Readline (was: select large text with mouse)
  2008-06-13 21:18         ` imputerate
@ 2008-06-14  3:19           ` Joel J. Adamson
       [not found]           ` <mailman.13226.1213413853.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Joel J. Adamson @ 2008-06-14  3:19 UTC (permalink / raw
  To: imputerate; +Cc: help-gnu-emacs

imputerate <imputerate@gmail.com> writes:

>>  first i want to fix it so i use only the bash shell and only the
>> xterm
>> terminal emulator, no matter which defaults are set for the os or
>> window
>> manager i'm dealing with;
>
>>  i'll log my progress with each step in the next couple of days;
>> thanks
>> again,imputerate
>
> o.k. already i've run into problems;
>
>
[...]

Interesting you should have these problems, because I just switched to
bash last night and I ran into a little confusion myself.  I put "source
~/.profile" in my .bashrc to make sure that the environment was carried
over to a new xterm session.  Xterm should start with whatever your
default shell is (man chsh).

> this is  a problem:
>   i have essential emacs keymappings in readline's config file, so

So you mean you put your Emacs (the text editor) mappings into inputrc,
instead of into .emacs?  You should find that the default Emacs bindings
for bash are Emacs-y enough.

> since i have these lines in both .bashrc and .bash_profile, they
> should
> work no matter how xterm invokes bash [i.e., as an interactive shell
> (login or normal), or even non-interactive shell]; or so i understand;

Hmmm... this is a good question for a bash expert: I've spent a lot more
time studing how Z Shell loads its configuration, and as I said I've
just switched (back) to bash.

> SO, how do i get bash in xterm to behave the way bash in 'gnometerm'
> did, i.e. so that i have my readline customizations on the command
> line in the bash shell?

Have you tried an empty inputrc?

> i'll surely be back soon, as i plow through the .Xresources,
> .Xdefaults configurations for xterm and emacs;

X resources are not the only way to configure the Emacs display,
although they are the best I've found for setting the default face and
background.  Same goes in xterm: it's much better than putting "-fg
white -bg black -geometry..." in every desktop icon or making it an
alias.

Joel

-- 
Joel J. Adamson
(303) 880-3109
Public key: http://pgp.mit.edu
Homepage: http://www.unc.edu/~adamsonj
Please read http://www.unc.edu/~adamsonj/roe.html




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Xterm and Readline (was: select large text with mouse)
       [not found]           ` <mailman.13226.1213413853.18990.help-gnu-emacs@gnu.org>
@ 2008-06-14  5:01             ` imputerate
  2008-06-14  5:39               ` imputerate
                                 ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: imputerate @ 2008-06-14  5:01 UTC (permalink / raw
  To: help-gnu-emacs

On Jun 13, 10:19 pm, adams...@email.unc.edu (Joel J. Adamson) wrote:

> imputerate <imputer...@gmail.com> writes:
> >>  first i want to fix it so i use only the bash shell and only the
> >> xterm
> >> terminal emulator, no matter which defaults are set for the os or
> >> window
> >> manager i'm dealing with;

joel replies:
> Interesting you should have these problems, because I just switched to
> bash last night and I ran into a little confusion myself.  I put "source
> ~/.profile" in my .bashrc to make sure that the environment was carried
> over to a new xterm session.  Xterm should start with whatever your
> default shell is (man chsh).


imputerate writes:
i put the line "source ~/.profile" in my .bashrc;
when i loaded xterm i got a blank screen with no login prompt;

here's the .profile file; notice that it also includes the "export..."
lines for
.inputrc:


~/.profile:
--------------snip----------------
# the default umask is set in /etc/profile
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f ~/.bashrc ]; then
	. ~/.bashrc
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
    PATH=~/bin:"${PATH}"
fi

export INPUTRC=/etc/inputrc
export INPUTRC=/home/hodgson/.inputrc
--------------------------------------

imputerate had written:
> >   i have essential emacs keymappings in readline's config file,

joel answered:
> So you mean you put your Emacs (the text editor) mappings into inputrc,
> instead of into .emacs?  You should find that the default Emacs bindings
> for bash are Emacs-y enough.

imputerate replies:
 to clear up a point: i live in emacs with an elaborate set of
keyboard
customizations [inspired in part by the old Wordstar principle: use
geometry instead of mnemotics];

i have them set in my .emacs file;

i also put a small batch of them in .inputrc, so that i would have the
same experience writing on the command line as i do writing in an
emacs
buffer [i also write email messages in gnus];

so, i'm still up a tree about how to get xterm/bash to read .inputrc;

imputerate had written:
> > since i have these lines in both .bashrc and .bash_profile, they
> > should
> > work no matter how xterm invokes bash [i.e., as an interactive shell
> > (login or normal), or even non-interactive shell]; or so i understand;

joel replied:
> Hmmm... this is a good question for a bash expert: I've spent a lot more
> time studing how Z Shell loads its configuration, and as I said I've
> just switched (back) to bash.

imputerate:
 BUT the variable which has changed is not that my shell is bash, but
that my terminal emulator is xterm [instead of gnometerm];
   [NB on the slackware box, xterm/bash DOES retain the readline
customizations]

imputerate's initial plea:
> > SO, how do i get bash in xterm to behave the way bash in 'gnometerm'
> > did, i.e. so that i have my readline customizations on the command
> > line in the bash shell?

joel answered:
> Have you tried an empty inputrc?

imputerate:
if i take my eccentric customizations out of inputrc, then they will
only be in .emacs, which neither xterm nor bash is apt to read; is
this not so?

imputerate promised to:
>> plow through the .Xresources,
> > .Xdefaults configurations for xterm and emacs;

joel replied:
> X resources are not the only way to configure the Emacs display,
> although they are the best I've found for setting the default face and
> background.  Same goes in xterm: it's much better than putting "-fg
> white -bg black -geometry..." in every desktop icon or making it an
> alias.

imputerate writes:
yes; i think so too; i have only face and background for xterm and
emacs in .Xresources, but i wonder if .Xdefaults is also sourced by
some of xterm/bash, anyway for root.

can someone direct me to a discussion of the priorities which obtain
among all these config files; for, example, i understand from several
posts here and there that .Xresources preempts .emacs; thanks,
imputerate


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Xterm and Readline (was: select large text with mouse)
  2008-06-14  5:01             ` imputerate
@ 2008-06-14  5:39               ` imputerate
  2008-06-14 18:24               ` pturing
  2008-06-14 18:29               ` pturing
  2 siblings, 0 replies; 7+ messages in thread
From: imputerate @ 2008-06-14  5:39 UTC (permalink / raw
  To: help-gnu-emacs


> imputerate promised to:
>
> >> plow through the .Xresources,
> > > .Xdefaults configurations for xterm and emacs;
>
> joel replied:
>
> > X resources are not the only way to configure the Emacs display,
> > although they are the best I've found for setting the default face and
> > background.  Same goes in xterm: it's much better than putting "-fg
> > white -bg black -geometry..." in every desktop icon or making it an
> > alias.
> imputerate writes:
>
> yes; i think so too; i have only face and background for xterm and
> emacs in .Xresources, but i wonder if .Xdefaults is also sourced by
> some of xterm/bash, anyway for root.
>
> can someone direct me to a discussion of the priorities which obtain
> among all these config files; for, example, i understand from several
> posts here and there that .Xresources preempts .emacs; thanks,
> imputerate

update from imputerate:
 i just set, in .Xresources, a distinctive face for both emacs and
xterm. the face showed up in emacs, buy NOT in the xterm/bash window;
does that say something about who's telling  whom what to do? imp.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Xterm and Readline (was: select large text with mouse)
@ 2008-06-14  5:43 imputerate
  0 siblings, 0 replies; 7+ messages in thread
From: imputerate @ 2008-06-14  5:43 UTC (permalink / raw
  To: help-gnu-emacs

On Jun 14, 12:39 am, imputerate <imputer...@gmail.com> wrote:
> > imputerate promised to:
>
> > >> plow through the .Xresources,
> > > > .Xdefaults configurations for xterm and emacs;
>
> > joel replied:
>
> > > X resources are not the only way to configure the Emacs display,
> > > although they are the best I've found for setting the default face and
> > > background.  Same goes in xterm: it's much better than putting "-fg
> > > white -bg black -geometry..." in every desktop icon or making it an
> > > alias.
> > imputerate writes:
>
> > yes; i think so too; i have only face and background for xterm and
> > emacs in .Xresources, but i wonder if .Xdefaults is also sourced by
> > some of xterm/bash, anyway for root.
>
> > can someone direct me to a discussion of the priorities which obtain
> > among all these config files; for, example, i understand from several
> > posts here and there that .Xresources preempts .emacs; thanks,
> > imputerate
>
> update from imputerate:
>  i just set, in .Xresources, a distinctive face for both emacs and
> xterm. the face showed up in emacs, buy NOT in the xterm/bash window;
> does that say something about who's telling  whom what to do? imp.

OUCH!  sorry; i was wrong. the changes DID show up in a new xterm/bash
window; does that mean i should have a "resource" line in
my .Xresources file? imp[ortunate].


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Xterm and Readline (was: select large text with mouse)
  2008-06-14  5:01             ` imputerate
  2008-06-14  5:39               ` imputerate
@ 2008-06-14 18:24               ` pturing
  2008-06-15  7:49                 ` imputerate
  2008-06-14 18:29               ` pturing
  2 siblings, 1 reply; 7+ messages in thread
From: pturing @ 2008-06-14 18:24 UTC (permalink / raw
  To: help-gnu-emacs



> export INPUTRC=/etc/inputrc
> export INPUTRC=/home/hodgson/.inputrc
> --------------------------------------

A couple things to note here:

* Each of these export INPUTRC=foo lines is setting the INPUTRC
variable, so the second one overwrites the value set by the first one.
* You should not need either of these lines, since programs using
readline will know to read in from the .inputrc file in your home
directory by default
* I think if you do have an .inputrc in your home directory, any
entries in /etc/inputrc will not get read


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Xterm and Readline (was: select large text with mouse)
  2008-06-14  5:01             ` imputerate
  2008-06-14  5:39               ` imputerate
  2008-06-14 18:24               ` pturing
@ 2008-06-14 18:29               ` pturing
  2 siblings, 0 replies; 7+ messages in thread
From: pturing @ 2008-06-14 18:29 UTC (permalink / raw
  To: help-gnu-emacs


> i put the line "source ~/.profile" in my .bashrc;
> when i loaded xterm i got a blank screen with no login prompt;
>
> here's the .profile file; notice that it also includes the "export..."
> lines for
> .inputrc:
>
> ~/.profile:
> --------------snip----------------
> # the default umask is set in /etc/profile
> #umask 022
>
> # if running bash
> if [ -n "$BASH_VERSION" ]; then
>     # include .bashrc if it exists
>     if [ -f ~/.bashrc ]; then
>         . ~/.bashrc
>     fi
> fi
>

Your .profile already has a line that loads .bashrc. A period at the
beginning of a line is the same as source. So you have your .profile
calling .bashrc and your .bashrc calling .profile, which means its in
an infinite loop, so that's why you got a blank screen.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Xterm and Readline (was: select large text with mouse)
  2008-06-14 18:24               ` pturing
@ 2008-06-15  7:49                 ` imputerate
  0 siblings, 0 replies; 7+ messages in thread
From: imputerate @ 2008-06-15  7:49 UTC (permalink / raw
  To: help-gnu-emacs

On Jun 14, 1:24 pm, pturing <ptur...@gmail.com> wrote:
> > export INPUTRC=/etc/inputrc
> > export INPUTRC=/home/hodgson/.inputrc
> > --------------------------------------
>
> A couple things to note here:
>
> * Each of these export INPUTRC=foo lines is setting the INPUTRC
> variable, so the second one overwrites the value set by the first one.
> * You should not need either of these lines, since programs using
> readline will know to read in from the .inputrc file in your home
> directory by default
> * I think if you do have an .inputrc in your home directory, any
> entries in /etc/inputrc will not get read

from pturing's next post:

Your .profile already has a line that loads .bashrc. A period at the
beginning of a line is the same as source. So you have your .profile
calling .bashrc and your .bashrc calling .profile, which means its in
an infinite loop, so that's why you got a blank screen.

imputerate replies:

i can't find a line in .bashrc which calls .profile, but anyway...

taking in all four of pturing's points together:
 i got rid of .profile, and /etc/inputrc;
 then i commented out both 'export INPUTRC' lines in .bashrc;
 when loaded Xterm/bash: the Readline customizations weren't active;

realizing that the line 'export INPUTRC=/etc/inputrc' WAS active in
the
.bashrc on the slackware box [where Readline IS active], i restored
that
line to my .bashrc on the ubuntu box: the customized keystrokes
delivered characters with
diacritical marks, like e with ` or ' on top [these are part of the
font
i 've set in .Xresources: "Emacs*font:
-*-lucida-medium-*-*-*-*-240-*-*-*-*-iso10646-* "
 [a problem, anyway, because the spacing is proportional]

so, i commented out that line, and uncommented the export INPUTRC=/
home/hodgson/.inputrc line: this
time there were no weird characters, also no Readline stuff;

so, i restored the file, /etc/inputrc: same thing as before;

so, i restored the file  ~/.profile [with no 'export INPUTRC' lines]:
same;

it looks like i have to tell somebody, somewhere to source some form
of
Readline configuration; i'll keep trying; any ideas? imputerate


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-06-15  7:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-14  5:43 Xterm and Readline (was: select large text with mouse) imputerate
  -- strict thread matches above, loose matches on Subject: below --
2008-06-08  1:26 select large text with mouse imputerate
     [not found] ` <mailman.12913.1212952149.18990.help-gnu-emacs@gnu.org>
2008-06-10  5:09   ` imputerate
     [not found]     ` <mailman.13030.1213149142.18990.help-gnu-emacs@gnu.org>
2008-06-13  4:27       ` imputerate
2008-06-13 21:18         ` imputerate
2008-06-14  3:19           ` Xterm and Readline (was: select large text with mouse) Joel J. Adamson
     [not found]           ` <mailman.13226.1213413853.18990.help-gnu-emacs@gnu.org>
2008-06-14  5:01             ` imputerate
2008-06-14  5:39               ` imputerate
2008-06-14 18:24               ` pturing
2008-06-15  7:49                 ` imputerate
2008-06-14 18:29               ` pturing

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.