From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dan Espen Newsgroups: gmane.emacs.help Subject: Re: want a file format easily edited and read by emacs that allows (multiple) pictures to be included Date: Sat, 02 Dec 2017 20:24:44 -0500 Organization: A noiseless patient Spider Message-ID: References: <87tvx99t3y.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1512264342 21282 195.159.176.226 (3 Dec 2017 01:25:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 3 Dec 2017 01:25:42 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 03 02:25:36 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLJ2E-0004yU-GN for geh-help-gnu-emacs@m.gmane.org; Sun, 03 Dec 2017 02:25:34 +0100 Original-Received: from localhost ([::1]:37473 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLJ2I-0006vB-GJ for geh-help-gnu-emacs@m.gmane.org; Sat, 02 Dec 2017 20:25:38 -0500 Original-Path: usenet.stanford.edu!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 95 Original-Injection-Info: reader02.eternal-september.org; posting-host="87cce6e7da5597c9846b15f9efa853bc"; logging-data="9743"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/cWit+Uknw6TiOng0hgRusHvxfX4ifrjw=" Cancel-Lock: sha1:9z1OKLvN1UFNeC3GHsRvjcrWf0A= Original-Xref: usenet.stanford.edu gnu.emacs.help:221066 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115177 Archived-At: Dan Hitt writes: > On Sat, Dec 2, 2017 at 5:06 AM, Daian YUE wrote: >> >> On 2017-12-02 08:02, Dan Hitt wrote: >>> For the notes i keep, sometimes i would like to sometimes include a >>> picture (jpg or png or maybe some other format). >>> >>> emacs seems to have no problem displaying a picture but i would like >>> to add words to it. >>> >>> So reading the file in emacs would be something like looking at html, >>> but i would prefer it something to be hot-editable, just like text >>> files are. >>> >>> That is, i would prefer not to have any markup in the file whatsoever, >>> just a block of text, then a picture, then more text, then another >>> picture, and so on. Perhaps an unprintable character could divide the >>> sections, and each section type could be recognized as either starting >>> with the magic words of a jpg or png and be presented as a picture, or >>> otherwise, presented as utf-8. (So i guess the unprintable character >>> would be markup, but certainly i wouldn't want something as lengthy as >>> to appear in the file.) >>> >>> Ideally, emacs would recognize the type of file it was by a >>> mode-defining like at the top, like -*- text -*- (except, of course, >>> not text). >>> >>> Does any file format/mode combo like this exist? >>> >>> TIA for any clues!! :) >>> >>> dan >> >> Hi Dan, >> >> I think Org Mode is what you are looking for. >> >> From what you want, it contains following features: >> - pure text based >> - Emacs built-in, very easy to works with >> - can embed pictures easily [[some_picture.jpg]] >> - has many inline declaration for controlling titles, code blocks etc >> - can be exported to Makrdown, HTML, etc etc >> >> I personally used it to generate development documentation (pictures >> included) in a small project. >> >> It is really handy to edit org file in Emacs, then "C-e h h" to generate >> HTML. The style of generated HTML file can be modified by external CSS >> file. >> >> Also, many people (including me) use Org Mode for task >> scheduling/management, taking notes, writing documentations, blogs, etc. >> >> I highly recommend you to give it a try. :-) >> >> Danny >> > > Thanks Danny!! > > People talk a lot about org-mode but i had never actually used it > until you recommended it. > > It looks very useful, and it can indeed show images > (org-redisplay-inline-images). So i appreciate your introducing it to > me. > > The one aspect of org mode (or html) that is a sort of problem is that > the images it shows cannot exist in the file itself, but rather float > in the file system (or presumably served remotely over http). > > The problem here is breakage. The image can get renamed or deleted, > and then the file.org is broken. > > That's why i would like something where the image is copied directly > into the file. > > Thanks again for the suggestion, which has an appearance close to what > i want, and which will be useful independently of whether i can > actually embed an image inside a file in a way emacs can see and > display it inline. If your images are SVG, HTML lets you code images inline. Emacs shr.el shows SVGs. Especially if your images are line drawings, SVG is pretty neat. Of course SVG is useless for photos. -- Dan Espen