Previous Up Next
?>
Accueil
Accueil
Blog
Blog
GNU/Linux
GNU/Linux
Pierre L.
Pierre L.
Whist
Whist
Nous
Nous
Jabberwocky
Jabberwocky
LaTeX
LaTeX
la papessa il carro la muerte il sole

II  The subsystems

II.0  Overview

II.0.1  What is a subsystem?

We essentially call a subsystem an interface to an external engine like Mplayer or Ecasound (cf. II.2 ,) or a fully Emacs internal implemented engine like the j++ browser (cf. II.1 .) A subsystem can load its configuration from a given file. That’s why there is a special configuration and launching mechanism.

II.0.2  Launching

Before installing the subsystems manager that is required to launch the subsystems like j++ browser (cf. II.1 ,) or j++ sound system (cf. II.2 ,) j++ should itself be installed and configured (cf. I.2I.4.)

You should then launch the subsystem manager by completing the already given .emacs file (cf. I.4 ,) as follows :

(add-to-list ’load-path
      (expand-file-name "~/jabberwocky"))

(add-to-list ’load-path
      (expand-file-name "~/edext"))

(require ’j++)

(j++-autoload ’subsystems-start ’subsystems
       ’(packages subsystems)
       "Launch the subsystem manager" t)

(subsystems-start)

Once configuration has been done like recommended above you may start Emacs. If at this time, or later you are asked if you want to create .j++-subsystems/ in your home directory, answer ‘y’ to this question. Then if you want to be able to use one of the available subsystems (cf. II.1 or II.2 ) or whatever could be developed following same scheme, you should issue :

M-x subsystems-settings <RET>

. If everything goes fine you will be in front of a screen like :

[Accept]   [Apply]   [Reset]   [Cancel]

  Subsystems

Groups:    *Settings*    [Loading]    [Subsystem]    [Logging]    [Default]

Title : Subsystems

 
---------------------------------------------------------------
 
   Logging

Log-Buffer : [Value Menu] Buffer name: *subsystems.log*
Buffer into which log info are More

Log-File : [Value Menu] None
File to record log info in

Log buffer size : [Value Menu] Number: 16777216
Size of the log buffer. When this size is More

Log-Level : [Value Menu] Info
Log level

 
---------------------------------------------------------------
 
   Loading

File : [Value Menu] File: /home/devel/.j++-subsystems/subsystems.el.gz
File where the subsystem manager is stored

Directory : [Value Menu] Directory: /home/devel/.j++-subsystems/
Directory where subsystems settings are stored

 
---------------------------------------------------------------
 
   Subsystem

Shutdown : [Toggle]  off (nil)
Run a suitable method at emacs shutdown More

Subsystem list : [INS] [DEL] [Open] Name: Browser
 [INS] [DEL] [Open] Name: Festival
 [INS] [DEL] [Open] Name: Monde
 [INS] [DEL] [Open] Name: discid
 [INS] [DEL] [Open] Name: Cddb
 [INS] [DEL] [Open] Name: Cdrom
 [INS] [DEL] [Open] Name: Aplay
 [INS] [DEL] [Open] Name: Mplayer
 [INS] [DEL] [Open] Name: Amixer
 [INS] [DEL] [Open] Name: Radio
 [INS] [DEL] [Open] Name: Sound++
 
[INS]
Configured subsystems

 
---------------------------------------------------------------
 

[Accept]   [Apply]   [Reset]   [Cancel]

Many configurations might be done by this pannel but adding support for a given subsystem is done by hitting the [INS] button just after Subsystem list : . You will be asked if you want to configure a new subsystem automatically. If you do not really know how to do it manually answer ‘y’ to this question. Then choos a subsystem among the available ones. Completion is active at this point. For instance if you choose browser, after hitting [INS] and answering the questions an item will be added to the list if not already present.

After you add a new subsystem do not forget to hit the [Accept] or [Apply] button.

II.0.3  General settings

Generically a subsystem configuration pannel looks like that :

[Accept]   [Apply]   [Reset]   [Cancel]

  Generic

Groups:    *Settings*    [Loading]    [Subsystem]

Title : Generic

 
---------------------------------------------------------------
 
   Loading

File : [Value Menu] File: generic.el.gz
File where the subsystem manager is stored

Directory : [Value Menu] Directory: /home/devel/.j++-subsystems/
Directory where subsystems settings are stored

 
---------------------------------------------------------------
 
   Subsystem

Shutdown : [Toggle]  off (nil)
Run a suitable method at emacs shutdown More

 
---------------------------------------------------------------
 

%%% generic.scr.tex --- 
%% 
%% Project: General settings 0.8.6 
%% In: Subsystems Documentation 0.8.6 
%% In: Subsystems 0.8.6 
%% In: J++ Packages 0.8.5 
%% In: Jabberwocky++ 0.8.5 
%%  
%% Copyright (C) 2016 Pierre L. Nageoire 
%%  
%% Author: Pierre L. Nageoire <devel@pollock-nageoire.net> 
%% X-RCS: $Id: generic.scr.tex 920 2016-12-28 03:32:52Z devel $ 
%%  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
%%  
%% This program is free software; you can redistribute it 
%% and/or modify it under the terms of the GNU General Public 
%% License as published by the Free Software Foundation; 
%% either version 2, or (at your option) any later version. 
%%  
%% This program is distributed in the hope that it will be 
%% useful, but WITHOUT ANY WARRANTY; without even the implied 
%% warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
%% PURPOSE. 
%%  
%% See the GNU General Public License for more details. 
%%  
%% You should have received a copy of the GNU General Public 
%% License along with this program; see the file COPYING. 
%%  
%% If not, write to the Free Software Foundation, Inc., 51 
%% Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 
%%  
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
%%  
%%% Commentary: 
%%  
%%% Code: 
%%  
[Accept]   [Apply]   [Reset]   [Cancel]

involving following sections Loading (cf. II.0.3.1 ,) Subsystem (cf. II.0.3.2 .) But most of the time it looks more like that :

[Accept]   [Apply]   [Reset]   [Cancel]

  Log

Groups:    *Settings*    [Loading]    [Subsystem]    [Logging]

Title : Log

 
---------------------------------------------------------------
 
   Logging

Log-Buffer : [Value Menu] Buffer name: j++_log
Buffer into which log info are More

Log-File : [Value Menu] None
File to record log info in

Log buffer size : [Value Menu] Number: 16777216
Size of the log buffer. When this size is More

Log-Level : [Value Menu] Info
Log level

 
---------------------------------------------------------------
 
   Loading

File : [Value Menu] File: log.el.gz
File where the subsystem manager is stored

Directory : [Value Menu] Directory: /home/devel/.j++-subsystems/
Directory where subsystems settings are stored

 
---------------------------------------------------------------
 
   Subsystem

Shutdown : [Toggle]  off (nil)
Run a suitable method at emacs shutdown More

 
---------------------------------------------------------------
 

[Accept]   [Apply]   [Reset]   [Cancel]

involving a supplementary Logging (cf. II.0.3.3 ) section.

II.0.3.1  Loading

II.0.3.2  Subsystem

II.0.3.3  Logging

II.1  The j++ browser

II.1.0  History

I have always been using Emacs-implemented web-browsers since I wanted to be able to use Emacs-speech systems in conjunction with the web browser. Indeed I am blind and need speech support to worok with the computer.

At the beginning, at the end of the 1990s I started with Emacspeak and W3. But W3 soon appeared to be very slow since the html parser was elisp implemented and html pages became always more heavy. It seems that W3 still exists as an Emacs package but I do not know how it is implemented nowadays.

That’s why I decided to switch to W3m at the beginning of the 2000s. It was still Emacspeak compatible and parsing was done by an external c-implemented engine that made it much faster than W3.

Switching the speech support from Emacspeak to Speechd-el caused no problem, in the middle of the 2000s since W3m was perfectly usable with Speechd-el up to very minor improvements.

Anyway I recently encountered problem when many web sites migrate to html 5 that is not yet supported by W3m. Moreover I noticed that there was not much activity around the W3m project and hence that it was not very probable that it will be updated soon. I tried to use eww but encountered limitations as well since html implementation was partial and certain tags were not supported. I started hence writing small eww improvements but found finally that the stuff was not flexible enough to be hacked.

But the major change was that eww does not require any external engine to perform the parsing. More precisely between W3 story and now, Emacs has been involving the libxml2 library that implements a very powerful Xml, Html… parser. Hence it is not really an external engine but it is neither really Emacs native. Anyway there is no need to require to a external parser like W3m.

Parallely I was developing an Html to LATEX converter that precisely used the new Xml-parsing Emacs features as eww does. But I had a batch of classes that implements Html to LATEX translation. It appears to me that it was much more easy to give this classes display features than developing this converter that it is still in progress. In fact a web browser was almost implemented by the converter backhground. See II.1.6 for more details about this converter.

II.1.1  Requirements

At the moement the j++ browser is known to work with Emacs 25 or 26. It should certainly work with Emacs 24 up to minor hacks but not made at the moment.

Anyway this program is not yet completely independent and uses Emacs-W3m and eww subroutines. We hope that future versions will be selfcontained (cf. II.1.5.1 ;) but at the moement Emacs-W3m and eww should be available through the loadpath so that

(require ’w3m)

neither

(require ’eww)

does not produce any error.

II.1.2  Installing and starting

You should first install the subsystems manager (cf. II.0.2 ,) even if we may simplify the procedure in the future. Once you have added the browser subsystem, the subsystem manager buffer should look like that :

[Accept]   [Apply]   [Reset]   [Cancel]

  Subsystems

Groups:    *Settings*    [Loading]    [Subsystem]    [Logging]    [Default]

Title : Subsystems

 
---------------------------------------------------------------
 
   Logging

Log-Buffer : [Value Menu] Buffer name: *subsystems.log*
Buffer into which log info are More

Log-File : [Value Menu] None
File to record log info in

Log buffer size : [Value Menu] Number: 16777216
Size of the log buffer. When this size is More

Log-Level : [Value Menu] Info
Log level

 
---------------------------------------------------------------
 
   Loading

File : [Value Menu] File: /home/devel/.j++-subsystems/subsystems.el.gz
File where the subsystem manager is stored

Directory : [Value Menu] Directory: /home/devel/.j++-subsystems/
Directory where subsystems settings are stored

 
---------------------------------------------------------------
 
   Subsystem

Shutdown : [Toggle]  off (nil)
Run a suitable method at emacs shutdown More

Subsystem list : [INS] [DEL] [Open] Name: Browser
 [INS] [DEL] [Open] Name: Festival
 [INS] [DEL] [Open] Name: Monde
 [INS] [DEL] [Open] Name: discid
 [INS] [DEL] [Open] Name: Cddb
 [INS] [DEL] [Open] Name: Cdrom
 [INS] [DEL] [Open] Name: Aplay
 [INS] [DEL] [Open] Name: Mplayer
 [INS] [DEL] [Open] Name: Amixer
 [INS] [DEL] [Open] Name: Radio
 [INS] [DEL] [Open] Name: Sound++
 
[INS]
Configured subsystems

 
---------------------------------------------------------------
 

[Accept]   [Apply]   [Reset]   [Cancel]

Do not forget to hit the [Apply] button to validate the subsystem addition.

To test the browser functionality you may simply issue the

M-x browser-goto-url <RET>

command. At first time you issue this command you will be asked about certain directories creation : do not hesitate to answer ‘y’ to these questions. You will then be asked to enter an url which will be browsed after you validate. For a more advanced usage of the j++ browser you might configure it more precisely by issuing the

M-x browser-settings <RET>

command (cf. II.1.3 .)

II.1.3  j++ browser settings

You may enter the j++ browser configuration buffer by issuing

M-x browser-settings <RET>

. You will be in front of a buffer looking like that :

[Accept]   [Apply]   [Reset]   [Cancel]

  Browser

Groups:    *Settings*    [Loading]    [Subsystem]    [Logging]    [Keymap]    [Browsing]    [View]

Title : Browser

 
---------------------------------------------------------------
 
   Logging

Log-Buffer : [Value Menu] Buffer name: *html.log*
Buffer into which log info are More

Log-File : [Value Menu] None
File to record log info in

Log buffer size : [Value Menu] Number: 16777216
Size of the log buffer. When this size is More

Log-Level : [Value Menu] Info
Log level

 
---------------------------------------------------------------
 
   Loading

File : [Value Menu] File: /home/devel/.j++-subsystems/browser/browser.el.gz
File where the subsystem manager is stored

Directory : [Value Menu] Directory: /home/devel/.j++-subsystems/browser/
Directory where subsystems settings are stored

 
---------------------------------------------------------------
 
   Subsystem

Shutdown : [Toggle]  on (non-nil)
Run a suitable method at emacs shutdown More

 
---------------------------------------------------------------
 
   Browsing

Keymap :
[INS] [DEL] Keybinding:
            Key: [Value Menu] Sequence: g
            Function: browser-goto-url
[INS] [DEL] Keybinding:
            Key: [Value Menu] Sequence: l
            Function: browser-last-url
[INS] [DEL] Keybinding:
            Key: [Value Menu] Sequence: r
            Function: browser-rebrowse
[INS]
Keymap definition for  browser-mode 

Search Engine : [Value Menu] Engine: https://www.google.fr/advanced_search?hl=fr
Search engine url.

Streamer Engine : [Value Menu] None
Engine to stream sound or video.

To be streamed :
[INS] [DEL] Identifier: \.flv$
[INS]
Identify urls that must be streamed and More

Document handler class  [Open] <untitled>
 Class used to handle opened documents.

Autocreate : [Toggle]  off (nil)
Autocreation of missing nodes or More

 
---------------------------------------------------------------
 

[Accept]   [Apply]   [Reset]   [Cancel]

See the general subsystems setting section for general settings (cf. II.0.3 ,) in particular Loading (cf. II.0.3.1 ,) Subsystem (cf. II.0.3.2 ) and Logging (cf. II.0.3.3 ) sections.

There’s hre a supplementary Browsing section that allows you to customize in particular :

II.1.3.1  The browsing keymap

You can here customize the keymap in particular that allows you having suitable keybindings when browsing. You can map your favorit keys to the available user functions described in II.1.4

II.1.3.2  The search engine

II.1.3.3  The streamer engine

II.1.4  User functions

At the moement j++ browser implements following user functions that are all prefixed with “browser” :

II.1.4.1  browser-goto-url

This is the most important function that open the minibuffer letting you entring a url with completion, that is browsed after you validate. You simply have to issue

M-x browser-goto-url <RET>

from anywhere within Emacs once you have suitably configured the j++ browser. You may also map this function to the your prefered key through the keymap configuration. Anyway this mapping will only be available in browse mode.

II.1.4.2  browser-view

Shows you a structured list of url you browsed in current session.

II.1.4.3  browser-last-url

Leads you to buffer displaying url that was browsed just before that currently displayed. function is currently only available in browse mode.

II.1.4.4  browser-rebrose

Rebrowses currently displayed url. In fact reloads url content from the server and redisplays it.

II.1.4.5  browser-settings

Displays setting buffer.

II.1.5  To do

II.1.5.1  Disconnect from Emacs-W3m and eww

II.1.6  The Html to LATEX converter

II.2  The j++ sound system

II.2.1  Introduction

The j++ sound system is an integrated interface to manage sound playing on your system. It means controlling more basic subsystems dedicated to particular applications like aplay (cf. II.2.2.1 ,) amixer (cf. II.2.2.2 ,) Festival (cf. II.2.2.3 ) or Mplayer (cf. II.2.2.4 .)

II.2.2  Controlling particular applications

II.2.2.1  aplay

II.2.2.2  amixer

II.2.2.3  Festival

II.2.2.4  Mplayer

II.3  The j++ Cdrom

Apache/2.4.7 (Unix) PHP/5.5.10 SVN/1.7.14 Hevea

Previous Up Next