Subject: Emacspeak discussion list
List archive
- From: Tim Cross <theophilusx AT gmail.com>
- To: Victor Tsaran <vtsaran AT gmail.com>
- Cc: Dhruv <darbaga10 AT gmail.com>, Andrew Leland <emacspeak AT emacspeak.net>, Andrew Leland <aleland AT gmail.com>
- Subject: Re: [Emacspeak] Setting global prefs in init file
- Date: Sat, 07 Jun 2025 10:03:54 +1000
The emacs-startup-hook is OK for configuring emacspeak provided you are
using the 'toggle' commands to set things. It will give inconsistent
results with respect to things like setq-default because the hook is run
after processing of your init file and command line switches. By the
time emacs-startup-hook is running, all of emacspeak startup and other
packages
your are loading, will already be loaded. However, remember that
emacspeak and other packages also use autoloads, require and
eval-after-load, so in many cases, some parts of emacspeak and otehr
packages won't be completely loaded until you try to use that functionality.
I think it is unlikely that threading is the source of load problems. In
emacs, threading is really only used for sub processes i.e. playing
icons, running the speech server. The main repl loop where lisp is
loaded is not threaded.
One thing you could try is to use M-x customize-group and put as much of
your emacspeak customization in there as possible and see if that makes
any difference. There will likely be some bits you may still need to do
in your init.el file, but this may help.
Emacspeak does significantly slow down the startup of emacs. However, I
find it is only a few seconds and as I only start when I first log in
and run until I shutdown, it doesn't bother me. I also start emacs as a
daemon using systemd, so it is started as part of my login process. I
then use emacs-client to open a new frame. As I use a tiling window
manager under Wayland, I open new frames on their own virtual desktop
and they take up the whole screen. Everything is keyboard driven, so no
darn mouse to deal with. This is somewhat easier under Linux because
everything runs as a sub-process of your log8in where under macOS,
things like the dock are run as a separate process which does not
automatically inherit all your environment variables or shell profile
settings. While there are ways to fix this, it does represent additional
steps/complexities and makes things a little less flexible.
I think, in general, Apple has done a pretty good job with respect to
accessibility. Certainly way better than Microsoft and certainly more
consistent than Linux. When I had to be part of 'corporate land' and
needed to interact with MS Office, Outlook and other corporate
applications, macOS was my goto platform, but now I'm retired and can
avoid all that nonsense, I've reverted back to my roots and just run
Linux. I haven't even booted my 2016 mac book pro for nearly 2 years!
Victor Tsaran <vtsaran AT gmail.com> writes:
> In my init file I set most of the Emacspeak variables in the
> emacs-startup-hook. I can't say anything about Linux,but on Mac OS, for
> some reason,
> things are not loading in the right order, quite possibly because of the
> multi-thread nature of Emacs. I am seeing the emacspeak-prepare routines
> are sometimes loading out of order which delays the time before you can
> interact with Emacspeak.
>
> On Fri, Jun 6, 2025 at 12:33 AM Tim Cross <emacspeak AT emacspeak.net> wrote:
>
> It isn't wrong, but it can also depend on how/when the local variable is
> created and whether any hooks or post-init processes are run which might
> effect the value. For example, setq-default will have no effect on a
> buffer local variable if that variable already has a value, so it is
> important that your setq-default is evaluated before the variable is set
> in some buffer. Then you also have the situation where the init code of
> the package/code which creates the local variable explicitly sets it to
> a value, possibly overriding your default setting and then you have the
> possible complication of hooks which can run after code is loaded or a
> mode is used etc which might also set local variables.
>
> My main reason for not mentioning it was just to keep things simple to
> start with and reduce the risk for the OP of being caught 'down in the
> weeds'. It is also worth noting that one of the benefits of using the
> suggested customize interface is that often customize definitions will
> include a 'setter' that will ensure a new value is correctly applied,
> further smoothing over some of the unexpected side effects which can
> occur when writing your own init code in init.el
>
> > Everything that Tim says here is correct, but can't you use
> (setq-default...) to set the default value of a variable for each buffer?
> that's what I've
> been
> > doing, and it has been working well for me. Let me know if that's wrong.
> >
> > On Fri, Jun 6, 2025 at 6:58 AM Tim Cross <emacspeak AT emacspeak.net> wrote:
> >
> > Hi Andrew,
> >
> > there are quite a few things technically incorrect with what you are
> > attempting as well as a few which may indicate some conceptual issues as
> > well. There is a fairly steep learning curve for both Emacs and
> > emacspeak. To further challenge you, Emacs is extremely flexible and
> > offers multiple ways to achieve the same outcome. While this flexibility
> > is great, it can be somewhat overwhelming initially.
> >
> > The two main areas where I think you should focus initially are getting
> > proficient using the help and info systems. Emacs is extremely good when
> > it comes to documentation and help, but you do need to practice and get
> > to know the system to get the most out of it. Get familiar with the
> > options bound to the help ke, which is control H or C-h as it is often
> > referred to. In particular, C-h v for documentation on variables and C-h
> > f for documentation on functions. The C-h k and C-h b keys are very
> > useful for finding out about key bindings (sometimes referred to as key
> > shnortcuts).
> >
> > While writing elisp code and setting variables in your init file is what
> > most experienced Emacs users prefer, there is also a high level and easy
> > to use customization interface called custom which is probably a much
> > better wsay to start customising Emacs when you are beginning. I would
> > recommend you start with that to begin with. However, I would also
> > recommend that you keep customisation to a minimum initially. Emacs and
> > to some extent, emacspeak, are a little unique and approach common
> > things from a somewhat different perspective. Often the temptation is to
> > customize things to make them ore familiar. However, this comes at a
> > cost in that you don't get to experience the 'emacs way', which sounds a
> > little wanky. However, many people, after perceivering with these alien
> > approaches end up finding them more superior to what they were
> > accustomed to. Therefore, I highly recommend using the system as vanilla
> > as possible for a time and start customising only after you have used
> > both Emacs and emacspeak for a time. You will also find that with the
> > increased understanding and familiarity this will create, when you do
> > customise things, they way you do it will be better, plus often you will
> > find there is no need to customise anything as the behaviour you wsant
> > is already there, you just need to enabgle it.
> >
> > To get started, have a look at the Emacs info pages and in particular
> > the section on customisation and the easy customisation interface. You
> > can also try M-x customize or M-x customize-group <ret> emacspeak to get
> > just the emacspeak customisation group.
> >
> > Finally, some specific comments regarding the settings in your init.el
> >
> > > ;; trying to get org-agenda not to say ┄ a zillion times
> > I don't get bothered by this, but don't know if that is because of other
> > config settings I have or just due to my workflow being a bit
> > different. If you can, maybe just put up with it for a while and revisit
> > once you are more familiar wsith things. I suspect that once you are
> > better or more familiar with navigation and have applied some other
> > refinements to how org and the org agenda wsorks, this may no longer be
> > an issue.
> >
> > > (setq dtk-add-cleanup-pattern "┄”)
> >
> > dtk-add-cleanup-pattern is not a variable, it is a function. You only
> > use setq to set variables. This aside, I don't think this is actually
> > what you want. However, because this is a function and because it is
> > bound to a key, you can execute it when in the agenda buffer to see if
> > it does what you wqant, just enter C-e d a and at the prompt, add the
> > character you want removed.
> >
> > > (setq emacspeak-use-icons nil)
> >
> > For technical reasons which will likely cause more confusion at this
> > stage than help, this one is a bit tricky. I'm also not sure it is what
> > you really want. However, there is a command
> > emacspeak-toggle-auditory-icons which will reliably set this variable
> > for the current session. The command is bound to C-e C-a. Note that by
> > default, it toggles auditory icons in the current buffer. If you want to
> > toggle icons in all buffers, you need to call the command with the
> > universal argument, with is C-u, so the full command to toggle auditory
> > icons globally for the current session is C-u C-e C-a.
> >
> > > (setq emacspeak-character-echo nil)
> >
> > This is unlikley to be what you want to do. This will turn off echoing
> > of the character as you type. Again, due to technical issues, setting
> > this variable directly with setq is unreliable (see below). Instead, you
> > can use the binding C-e d k to toggle character echo and again, provide
> > the universal argument to toggle it globally.
> >
> > > (setq dtk-caps nil)
> > > (setq dtk-punctuation-mode 'some)
> >
> > The above have similar issues. The reason is a technical one. These
> > variables are what are referred to as buffer local variables. The
> > general concept is that they are variables which can have different
> > values in different buffers, but which start off with a common default
> > value. This makes them behave a little differently from other variables
> > and they need to be set using different mechanisms. I really don't want
> > to go into full on detail at this point as I fear you will be wading
> > into the wseeds and it will just make life much harder. Therefore, my
> > strong recommendation is either use the associated commands to toggle
> > these settings on a per session basis, possible adding the universal
> > argument to set them globally or use the M-x customize-group interface
> > to set the variables as this interface will ensure the variables are set
> > in such a way as to work correctly.
> >
> > You do have a fairly steep learning curve to face on multiple levels. I
> > think the benefits are worth the effort, but be prepared for some
> > frustration and a lot of reading. I would also recommend reading Micky
> > Petterson's Mastering Emacs book https://www.masteringemacs.org/ . It
> > has a fairly good overview of the concepts and rationale underlying
> > Emacs. ueThe emacspeak info page is pretty good as well as Robert
> > Chassell's Introduction to Emacspeak. Finally, there is a fairly good
> > info page called An Introducton to Programming in Emacs Lisp which might
> > help with some of thye basic emacs lisp concepts as wsell as simple
> > programming.
> >
> > HTH and good luck!
> > Emacspeak discussion list -- emacspeak AT emacspeak.net
> > To unsubscribe send email to:
> > emacspeak-request AT emacspeak.net with a subject of: unsubscribe
> Emacspeak discussion list -- emacspeak AT emacspeak.net
> To unsubscribe send email to:
> emacspeak-request AT emacspeak.net with a subject of: unsubscribe
>
> --
>
> --- --- --- ---
> Find my music on
> Youtube: http://www.youtube.com/c/victortsaran
> Spotify: https://open.spotify.com/artist/605ZF2JPei9KqgbXBqYA16
> Band Camp: http://victortsaran.bandcamp.com
- [Emacspeak] Setting global prefs in init file, Andrew Leland, 06/05/2025
- Re: [Emacspeak] Setting global prefs in init file, Tim Cross, 06/06/2025
- Re: [Emacspeak] Setting global prefs in init file, Dhruv, 06/06/2025
- Re: [Emacspeak] Setting global prefs in init file, Tim Cross, 06/06/2025
- Re: [Emacspeak] Setting global prefs in init file, Victor Tsaran, 06/06/2025
- Re: [Emacspeak] Setting global prefs in init file, Tim Cross, 06/07/2025
- Re: [Emacspeak] Setting global prefs in init file, Victor Tsaran, 06/07/2025
- Re: [Emacspeak] Setting global prefs in init file, Tim Cross, 06/07/2025
- Re: [Emacspeak] Setting global prefs in init file, Victor Tsaran, 06/06/2025
- Re: [Emacspeak] Setting global prefs in init file, Tim Cross, 06/06/2025
- Re: [Emacspeak] Setting global prefs in init file, Andrew Leland, 06/11/2025
- Re: [Emacspeak] Setting global prefs in init file, Dhruv, 06/06/2025
- Re: [Emacspeak] Setting global prefs in init file, Tim Cross, 06/06/2025
Archive powered by MHonArc 2.6.19+.