[Ipe-discuss] Stylesheet usability

Tim Hutt tdhutt at gmail.com
Tue Apr 30 16:54:00 CEST 2019


Re 2 a), I was thinking something like the following. It *almost* works on
Mac, except the "Waiting for external editor" dialog never disappears.
Haven't tested it on Windows.

if config.platform == "apple" then
  prefs.external_editor = "/usr/bin/open -W -n -e %s"
elseif config.platform == "win" then
  prefs.external_editor = "%WINDIR%\\notepad.exe %s"
else
  if os.getenv("EDITOR") then
    prefs.external_editor = os.getenv("EDITOR") .. " %s"
  else
    prefs.external_editor = nil
  end
end



On Tue, 30 Apr 2019 at 15:32, Tim Hutt <tdhutt at gmail.com> wrote:

> Hi,
>
> I really love IPE, but a long-time usability issue for me is editing
> stylesheets. There are two main issues:
>
> 1. It doesn't seem possible to have an embedded style-sheet - if I want
> just one file to be a weird size I have to make a stylesheet specific to
> that file, and then remember to copy it around with that file. It's a bit
> awkward. An implicit "(embedded)" stylesheet would be great.
>
> 2. In the stylesheets dialog there is a convenient Edit button but I have
> never actually successfully used it because it always tells me there is no
> text editor configured. I assume to do that I have to edit the `prefs.lua`
> file which is ... somewhere... This is usually way more hassle than I want
> to deal with so I give up. I can think of two good solutions:
>
>   a) Use an editor provided by the OS, e.g. using `open` on Mac,
> `xdg-open` on Linux, etc.
>   b) Provide a built-in editor. This can literally just be a dialog box
> with an edit box in it. That is still 100 times better than "Sorry no
> external editor defined"
>
> If there is a sensible default editor you could also make
> `App->Preferences` (or whatever the equivalent on Windows is) open
> `prefs.lua` in that editor so I don't have to go hunting through app
> bundles for it.
>
> Cheers,
>
> Tim
>
> PS: Hope that wasn't too ranty - it's just a small annoyance in an
> otherwise excellent program that I have let build up rather than actually
> fixing it...
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/ipe-discuss/attachments/20190430/e3933ac5/attachment.html>


More information about the Ipe-discuss mailing list