From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Brian Adkins Newsgroups: gmane.emacs.help Subject: underline with character e.g. '-' or '=' Date: Tue, 13 May 2008 16:03:34 -0400 Organization: BellSouth Internet Group Message-ID: <871w4655ux.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1210711300 11988 80.91.229.12 (13 May 2008 20:41:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 13 May 2008 20:41:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 13 22:42:16 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jw1Ju-0002HY-2c for geh-help-gnu-emacs@m.gmane.org; Tue, 13 May 2008 22:41:58 +0200 Original-Received: from localhost ([127.0.0.1]:57299 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jw1JB-0003kY-15 for geh-help-gnu-emacs@m.gmane.org; Tue, 13 May 2008 16:41:13 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!bigfeed.bellsouth.net!bigfeed2.bellsouth.net!bignumber.bellsouth.net!news.bellsouth.net!bignews5.bellsouth.net.POSTED!06376b86!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:hBPNdgDJ7pwTT2w03eiJ/hkY3ZY= Original-Lines: 26 Original-X-Complaints-To: abuse@bellsouth.net X-Abuse-Info: Please forward a copy of all headers for proper handling Original-X-Trace: ldjgbllpbapjglppdbdpiflmbcekedmfhojhikkbagflhcbolppeadepelhmhofgjfganofihbbcijimonkcomkhodcncpnjbpeclalcloiihiplahkdanodbajneomahdkacchoafcamaoamkbeggjijcgjbkil Original-NNTP-Posting-Date: Tue, 13 May 2008 16:02:29 EDT Original-Xref: news.stanford.edu gnu.emacs.help:158607 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:53973 Archived-At: I often underline text with a hyphen or equal sign manually. I would appreciate any info regarding how to accomplish this with a small elisp function. Actually, if I had a function to compute the length of the line, I think I would be all set. For example, if I had the following line: Section One I would like to position the the cursor on the 'S' and invoke: M-x underline-line-with-char Which would prompte for a character in the minibuffer. If = was supplied, the result would be: Section One =========== It seems like a simple task: 1) Prompt for a character 2) Compute the length of the line 3) Insert a line below the current line 4) Insert number of characters Thanks, Brian Adkins