[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]

Re: Emacs daemon [was "Re: [SPAM?] Re: [slightly OT] pulseaudio, Orca, and Emacs"]



Thanks Tim, between picking and choosing from this and some googling I've got Emacs running as a daemon, I'm able to connect to that daemon with Emacsclient and it's all working with Emacspeak. I'm probably still quite a ways away from any best practices but I can iterate to get there.

I have two things I still need to investigate:

When I start Emacs on the desktop, it's as if Orca isn't running in my Emacs session. I can still hear Orca events from other applications, but I don't hear Orca echo anything I'm doing in Emacs. If I start emacsclient on the desktop, Orca and Emacsclient seem like they're both still running. As I arrow up and down, I hear both Orca and Emacspeak read the new line to me. This reminds me of JAWS where I could put it to sleep when a particular application was in the foreground. I'd like Emacsclient on the desktop to behave the same way Emacs does. Like I said, I still need to look into this, and it's probably an Orca thing and not an Emacspeak thing. This may also be what Bill reported earlier in this thread.

Second, when I start Emacs on the desktop, copying and pasting between Emacs and other desktop applications just works. When I start Emacs as a daemon, I can't seem to get this to work. I've googled around for some answers, and I've tried a few things, but I haven't come up with the right incantation yet.

Thanks for the help and the pointers so far.

On 04/15/2013 10:04 PM, Tim Cross wrote:

I don't use the emacspeak shell script to start emacs. What I do is
have the following in my .emacs startup file

(add-to-list 'load-path "~/.emacs.d")

(require 'tx-emacspeak)

and then, in my .emacs.d directory, I have the file tx-emacspeak.el,
which has the following


(add-to-list 'Info-default-directory-list
				"/home/tcross/git/emacspeak/trunk/info")

(when (and (not noninteractive)
            (not (featurep 'emacspeak))
            (getenv "RUN_EMACSPEAK"))
   (let ((src-path "/home/tcross/git/emacspeak/trunk/"))
     (add-to-list 'load-path src-path)
     (setenv "EMACSPEAK_DIR" src-path)
     (setq emacspeak-aumix-multichannel-capable-p nil)
     (setq tts-default-speech-rate 90)
     (setq outloud-default-speech-rate 90)
     (setq emacspeak-vm-use-raman-settings nil)
     (add-hook 'emacspeak-startup-hook
               (lambda ()
                 (dtk-set-rate tts-default-speech-rate 1)
                 (dtk-interp-sync)
                 (emacspeak-sounds-select-theme "chimes-stereo/")
                 (emacspeak-toggle-auditory-icons t)))
     (load-file (concat src-path "/lisp/emacspeak-setup.el"))))

(provide 'tx-emacspeak)

Note that I have an exported shell variable called RUN_EMACSPEAK in my
.profile. If this is set, then emacspeak will startup when I start
emacs. Otherwise emacspeak is not loaded. My actual setup is a little
bit more complex because I sometimes run speechd instead of emacspeak.

Note also that I don't install emacspeak in
/usr/local/share/emacs/site-lisp as is normally the case when you run
make install. In fact, I don't run make install at all. I just keep
emacspeak in a directory (in my case /home/tcross/git/emacspeak/trunk)
and run it from out of there. I use git-svn to interface to the svn
repo on google.

I can then just run emacs or emacs --daemon etc.

Also, note that you can start the emacs server even after running
emacs by using the M-x server-start. Possibly a good way to try out
using emacsclient and chekcing you have things setup before making the
final switch.

Tim


Christopher Chaltain writes:
  > Wow and thanks for the great advice.
  >
  > Right now, I start Emacs with /usr/bin/emacspeak, so starting emacs
  > --daemon and running emacsclient doesn't give me Emacspeak. I'm looking
  > around, but I"m wondering how others start Emacspeak. Is it just a
  > matter of copying the right variables from /usr/bin/emacspeak into my
  > .bashrc file and making sure emacspeak-setup.el is loaded from my .emacs
  > file or is there more or less to it than that?
  >
  > On 04/15/2013 09:30 PM, Tim Cross wrote:
  > >
  > > Oh I like that - I've always just used tramp to access sudo
  > >
  > > Tim
  > >
  > >
  > > T. V. Raman writes:
  > >   >
  > >   > And I also have the following for editing files as root:
  > >   > alias V='SUDO_EDITOR="emacsclient -c -a emacs" sudoedit'
  > >   >
  > >   > V <filename>  at an emacs shell will pop up the edit buffer with
  > >   > the file opened as root
  > >   > >>>>> "Tim" == Tim Cross <tcross@xxxxxxxxxxx> writes:
  > >   >     Tim> Just support Raman's point here. You can even have emacs
  > >   >     Tim> start in daemon mode as part of your login process and
  > >   >     Tim> then just use emacsclient whenever you want to use emacs
  > >   >     Tim> - either from within X or from the console.
  > >   >     Tim>
  > >   >     Tim> I also have the following in my profile
  > >   >     Tim>
  > >   >     Tim> EDITOR='emacsclient -c ' export EDITOR
  > >   >     Tim>
  > >   >     Tim> VISUAL='emacsclient -c' export VISUAL
  > >   >     Tim>
  > >   >     Tim> TEXEDIT='emacsclient -c +%d +%s' export TEXEDIT
  > >   >     Tim>
  > >   >     Tim> ALTERNATE_EDITOR='' export ALTERNATE_EDITOR
  > >   >     Tim>
  > >   >     Tim> The last one is quite important. If you have
  > >   >     Tim> alternate_editor set to '' i.e. null, then if you run
  > >   >     Tim> emacsclient and there is no emacs daemon running, one
  > >   >     Tim> will be automatically started for you. The other three
  > >   >     Tim> are nice to ensure programs which use an editor default
  > >   >     Tim> to using emacs via emacsclient.
  > >   >     Tim>
  > >   >     Tim> Tim
  > >   >     Tim>
  > >   >     Tim>
  > >   >     Tim> T. V. Raman writes:
  > >   >     >> If you're running both on the text console and the X
  > >   >     >> desktop, then make sure you dont run two emacs sessions;
  > >   >     >> instead, start emacs as a daemon -- do emacs --daemon and
  > >   >     >> then start emacsclient where you want emacs. This means
  > >   >     >> you'll be able to share all of your context between the
  > >   >     >> graphical desktop and the text console. >>>>>
  > >   >     >> "Christopher" == Christopher Chaltain <chaltain@xxxxxxxxxxx>
  > >   >     >> writes:
  > >   >     Christopher> I use this work around when using Speakup in a
  > >   >     Christopher> console, but actually, I've been running Emacs
  > >   >     Christopher> more and more on the desktop. I like the
  > >   >     Christopher> integration between the clipboard and kill
  > >   >     Christopher> ring. BTW, is there a way to easily copy thing
  > >   >     Christopher> between Emacs running in a console and an
  > >   >     Christopher> application on the desktop?
  > >   >     Christopher>
  > >   >     Christopher> On 04/15/2013 08:37 AM, Josà Vilmar EstÃcio de
  > >   >     Christopher> Souza wrote:
  > >   >     >> >> At least for me the solution is login in the console
  > >   >     >> using >> a login different than the login used in X.
  > >   >     >> >>
  > >   >     >> >> After that you can 'su' to your X login if desired.
  > >   >     >> >>
  > >   >     >> >>
  > >   >     >> >> On 04/15/2013 10:12 AM, Bill Dengler(Ubuntu) wrote:
  > >   >     >> >>>
  > >   >     >> >> > -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA1
  > >   >     >> >>>
  > >   >     >> >>> Hello, I have run into a slight problem. Here's what
  > >   >     >> >>> happens : I log into my Ubuntu box I press ctrl+alt+f1
  > >   >     >> I >>> enter my username and press enter I enter my
  > >   >     >> password and >>> press enter I type emacspeak -e and press
  > >   >     >> enter I use >>> emacs for a while, then either close it or
  > >   >     >> go back to X >>> with CTRL+ALT+F7 I lose speech in X What
  > >   >     >> appears to be >>> happening is that processes are locking
  > >   >     >> the pulseaudio >>> server in a way that no other processes
  > >   >     >> can use it. Do >>> you know how to fix this? Or am I
  > >   >     >> better off continuing >>> to run emacs from inside X?
  > >   >     >> >>>
  > >   >     >> >>> Bill -----BEGIN PGP SIGNATURE----- Version: GnuPG
  > >   >     >> v1.4.12 >>> (GNU/Linux) Comment: Using GnuPG with
  > >   >     >> undefined - >>> http://www.enigmail.net/
  > >   >     >> >>>
  > >   >     >> >>>
  > >   >     >> iQIcBAEBAgAGBQJRa/zMAAoJEE15pHlYNXW/mJMP/RecDJ8VdBnKIeVoaemT6gGf
  > >   >     >> >>>
  > >   >     >> fm98m87/nYLEjfiEX8M0cF0KwKdncL+ELWXskof4jAMTgU5xethpF2ED4zXioQhi
  > >   >     >> >>>
  > >   >     >> 9octOL8qPxKqsFP97fazPrfMJx3ddhSsfrJaR1D/qpQU7StDagI/2SuwemZ4mkqL
  > >   >     >> >>>
  > >   >     >> KHxE3IGvDMcTf04id8h+cFyXTankjKirXbPJUUVLPlqSqVTWqFvq5CZG9Om/D4po
  > >   >     >> >>>
  > >   >     >> eaHa2rFUaaBwp3s8pOXaB+PcZrVYmego4Ianb2X1MO1WqoQ2N6atakDaiO4AZRmf
  > >   >     >> >>>
  > >   >     >> mRYHgFAB4TkgF/kFeJMdg7lBL3I9ZfN0Hqu05McYD1q2DuhYn6Woq75HvSK4k9mI
  > >   >     >> >>>
  > >   >     >> RUx2648TSMcaxtDyUSNvS6VX4akViOl3MPQJ9xQW0SZ9Syl3bAo5BOFxRyMmUSSx
  > >   >     >> >>>
  > >   >     >> 4JyzBjTZQ7F4szb/e85dPHZddxnPY5Aj+rOy8J5I3+SDUGyYnivV/6/Mi6s5vo+N
  > >   >     >> >>>
  > >   >     >> gwZmBanFnbMiLDuf5E/0OgHqLDYfpNKclrkg3Et6epqqzXE9DzNyfVAiE731JnL4
  > >   >     >> >>>
  > >   >     >> RlK7x8/sVosJ8lHSNlpBkwqjvgJAaYUJNNOrSul19R8sElsc0x6BsWltHHJmEK/B
  > >   >     >> >>>
  > >   >     >> j0V+0yR5VJlNdYln/ABNaBjPzmbzK9MyEZkC/nHH/ECuylFlDDm4O5ZWmqxNeBAC
  > >   >     >> >>> bJ5G05jpl+x37GViXikH =aecg -----END PGP SIGNATURE-----
  > >   >     >> >>>
  > >   >     >> >>> -----------------------------------------------------------------------------
  > >   >     >> >>>
  > >   >     >> >>> To unsubscribe from the emacspeak list or change your
  > >   >     >> >>> address on the emacspeak list send mail to >>>
  > >   >     >> "emacspeak-request@xxxxxxxxxxx" with a subject of >>>
  > >   >     >> "unsubscribe" or "help".
  > >   >     >> >>>
  > >   >     >> >>>
  > >   >     >> >>
  > >   >     Christopher>
  > >   >     Christopher> -- Christopher (CJ) chaltain at Gmail
  > >   >     Christopher>
  > >   >     Christopher> -----------------------------------------------------------------------------
  > >   >     Christopher> To unsubscribe from the emacspeak list or change
  > >   >     Christopher> your address on the emacspeak list send mail to
  > >   >     Christopher> "emacspeak-request@xxxxxxxxxxx" with a subject
  > >   >     Christopher> of "unsubscribe" or "help".
  > >   >     >>
  > >   >     >> --
  > >   >     >> Best Regards, --raman
  > >   >     >>
  > >   >     >> -----------------------------------------------------------------------------
  > >   >     >> To unsubscribe from the emacspeak list or change your
  > >   >     >> address on the emacspeak list send mail to
  > >   >     >> "emacspeak-request@xxxxxxxxxxx" with a subject of
  > >   >     >> "unsubscribe" or "help".
  > >   >     >>
  > >   >     Tim>
  > >   >     Tim> -- Tim Cross IT Security Manager Information Technology
  > >   >     Tim> University of New England Phone: +61 2 6773 3210 Mobile:
  > >   >     Tim> 0428 212217 E-Mail: tcross@xxxxxxxxxxx Web:
  > >   >     Tim> http://www.une.edu.au/itd --- Please avoid sending me
  > >   >     Tim> Word or PowerPoint attachments. See
  > >   >     Tim> http://www.gnu.org/philosophy/no-word-attachments.html
  > >   >     Tim>
  > >   >     Tim> Any fool can make things bigger, more complex, and more
  > >   >     Tim> violent. It takes a touch of genius (and a lot of
  > >   >     Tim> courage) to move in the opposite direction. âAlbert
  > >   >     Tim> Einstein
  > >   >     Tim>
  > >   >     Tim>
  > >   >     Tim>
  > >   >     Tim>
  > >   >     Tim>
  > >   >
  > >   > --
  > >   > Best Regards,
  > >   > --raman
  > >
  >
  > --
  > Christopher (CJ)
  > chaltain at Gmail
  >
  > -----------------------------------------------------------------------------
  > To unsubscribe from the emacspeak list or change your address on the
  > emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
  > subject of "unsubscribe" or "help".
  >


--
Christopher (CJ)
chaltain at Gmail

-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help".



If you have questions about this archive or had problems using it, please send mail to:

priestdo@xxxxxxxxxxx No Soliciting!

Emacspeak List Archive | 2010 | 2009 | 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 | 2001 | 2000 | 1999 | 1998 | Pre 1998

Emacspeak Files | Emacspeak Blog