| Newsgroups |
gmane.emacs.help |
| Message-ID |
<[email protected]> |
gfp <[email protected]> writes:
>>
>> Once you have entered your printer’s name, click on the
>> ‘Apply’ button to set the value of
>> ‘pr-txt-printer-alist’ for the current session (ONLY!).
>
> why only for the current session?
>
There are two buttons in the Easy Customization that change
the value of a user option: ‘Apply’ and ‘Apply and Save’
If you click on the ‘Apply’ button, then it will set the
value for the current session, only. If you click on the
‘Apply and Save’, then it will write the expression to your
initialization file (which it is possible to specify).
>> You can then click on the ‘State’ button, select ‘Show
>> Saved Lisp Expression’ to see what the Lisp expression
>> is that you can use as the value for your ‘setopt’
>> expression. This expression will have ‘default’ in it,
>> which is all that you need if you have only one printer --
>> your default.
>
> I saved this "default" option in my init.el file.
>
> But if I can set this in my customization
> why do I need it in my init.el file?
>
Your customization file can be your init.el file or it can
be another file. See (info "(emacs) Saving Customizations").
For simplicity, unless you change it, it will be your
initialization file.
>>
>> You can repeat the steps above for each of your ‘setopt’
>> expressions. This will help you to get the form of each
>> expression’s value set correctly. A reason that the Easy
>> Customization was created was to help Emacs users so that
>> they do not need to know the form of the values (which can
>> be complex). You can use it exclusively (discarding the use
>> of ‘setopt’) or you can use it to help you write your
>> ‘setopt’ expressions.
>>
> this part in my init.el file looks now like this:
> I put the old values after the new value
>
> (setopt pr-txt-printer-alist
> '((default "lpr" nil "HP-Officejet-J4500-series")))
>
> ...
>
> my init.el file:
>
> ...
> (setopt pr-txt-name 'prt_06a)
The value that you choose here should be one of the values
that you set in ‘prt-txt-printer-alist’. If you have only
one printer, specified in the association list as ‘default’,
then this value would be ‘default’ instead of ‘prt_06a’:
(setopt pr-txt-name 'default)
Note that because this value is the default that Emacs sets,
you do not have to include this expression at all. Simply
confirm that the value is ‘default’ by typing
C-h v pr-txt-name
> (setq pr-ps-printer-alist ;;bug in emacs
> if warning comes up by setting setopt
> '((lps_06b "lpr" nil "-P" "lps_06b")
> (lps_07c "lpr" nil nil "lps_07c")
> (lps_08c nil nil nil "lps_08c")
> ))
Again, your value for ‘pr-ps-printer-alist’ looks
suspiciously identical to the value in the docstring (*Help*
text) for ‘pr-ps-printer-alist’. Unless you have a separate
printer for printing PostScript files, this expression
should be:
(setopt pr-ps-printer-alist
'((default "lpr" nil "-P" "HP-Officejet-J4500-series")))
And then:
(setopt pr-ps-name 'lps_06b)
would be:
(setopt pr-ps-name 'default)
Note that because this value is the default that Emacs sets,
you do not have to include this expression at all. Simply
confirm that the value is ‘default’ by typing
C-h v pr-ps-name
Again, confirm that each ‘setopt’ expression has the correct
value by placing point after each expression and evaluating
them by typing C-x C-e.
--
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.