72663

How to write text inside a rectangle in emacs artist-mode?

Question:

I am learning artist-mode in emacs and finding it pretty interesting.

I want to create shapes and write text inside them as we can do with other software where one can draw shapes.

However, when I type some characters inside a rectangle, the shape gets distorted. The vertical line gets shifted by some characters.

Please see attached image. <a href="https://i.stack.imgur.com/ds3ZZ.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/ds3ZZ.png" data-original="https://i.stack.imgur.com/ds3ZZ.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

Is there something I can do to fix it? Or is it a bug in artist-mode. I watched some screencasts and videos and did not remember anyone mentioning anything about this odd behavior.

I am on Mac and my emacs version is

GNU Emacs 25.1.1 (x86_64-apple-darwin16.0.0, NS appkit-1504.00 Version 10.12 (Build 16A323))

Answer1:

There is a workaround I found for this cases.

<ol><li>select <strong>text</strong> mode</li> <li>add the relevant text, RET</li> <li>type <strong>term</strong> RET (here we specify the font)</li> <li>RET (No ARGS for figlet, might also depend upon use-cases)</li> </ol>

Answer2:

It may be a bit clumsy, but I usually do

<ol><li>select text mode</li> <li>press Insert (Ovwrt)</li> <li>add text</li> <li>enter artist mode</li> </ol>

Answer3:

Try this before you type text into a rectangle.

<ol><li>C-x h (Select the whole buffer.)</li> <li>M-x untabify <RET></li> </ol>

This will make you buffer tab free, which should solve the problem when you are typing.

Note that you should <strong>avoid using backspace</strong> for deleting text. Move your cursor and overwrite them instead.

Recommend

  • Where can I find some websites with VB.NET tutorials?
  • Autoscaling continuous Azure WebJobs not working
  • Sorting Json data based on a field
  • Do Vue watched properties cache just like the computed properties?
  • iOS app terminated due to memory pressure
  • IllegalArgumentException: the error message does not make sense
  • wxPython: How to get sizer from wx.StaticText?
  • GData Youtube : obtaining thumbnails
  • RVM not working after installing properly?
  • can't get In-App-Purchase hosted content to be actually hosted
  • Scala Slick Database Views
  • Using web client in Silverlight
  • How to fix this floating point square root algorithm
  • Youtube upload API and cordova / phonegap
  • Grails/Roo for a .Net developer
  • iPhone - UIWebView multiple locks
  • Unable to hide youtube iframes in safari?
  • How to get to older Xcode beta version?
  • Safari PHP form submission -file upload hangs
  • Enable Bootstrap Intellisense using Angular 4 in WebStorm
  • Get localized short date pattern as String?
  • Request response issues in biztalk
  • Compare struct to a constant in C
  • Wrong labels when plotting a time series pandas dataframe with matplotlib
  • How to programatically 'login' a user based on 'remember me' cookie when using j
  • Multicolored edittext hint
  • Android application: how to use the camera and grab the image bytes?
  • Position: fixed nav does not stay fixed
  • Copy to all folders batch file?
  • How can I enlarge video fullscreen without the affected interface project in as3?
  • Python urlparse: small issue
  • FileReader+canvas image loading problem
  • QLineEdit password safety
  • RectangularRangeIndicator format like triangular using dojo
  • swift auto completion not working in Xcode6-Beta
  • Bug in WPF DataGrid
  • TFS: Get latest causes slow project reloading
  • Javascript Callbacks with Object constructor
  • How to make Safari send if-modified-since header?
  • python draw pie shapes with colour filled